|
From: Dirk M. <dm...@gm...> - 2005-12-09 18:13:22
Attachments:
strict-aliasing.diff
|
Hi, there is a strict aliasing violation in VEX. it tries to print the memory of a "double" by casting it to "ULong" and then reading it as "long long int" for printf. double and ulong however may not alias. The fix is rather simple, just accessing the memory via F64i fixes the issue, since both are a union, and the second one is declared ULong. Below is the patch, would be great if this could be committed to VEX (3_1 and trunk). Thanks, Dirk |
|
From: Julian S. <js...@ac...> - 2005-12-17 12:43:29
|
Dirk, did you detect these problems by compiling with gcc-4.1.0, or how? J On Friday 09 December 2005 18:13, Dirk Mueller wrote: > Hi, > > there is a strict aliasing violation in VEX. it tries to print the memory > of a "double" by casting it to "ULong" and then reading it as "long long > int" for printf. double and ulong however may not alias. > > The fix is rather simple, just accessing the memory via F64i fixes the > issue, since both are a union, and the second one is declared ULong. > > Below is the patch, would be great if this could be committed to VEX (3_1 > and trunk). > > Thanks, > Dirk |
|
From: Dirk M. <dm...@gm...> - 2005-12-19 14:22:10
|
On Saturday 17 December 2005 13:43, Julian Seward wrote: > Dirk, did you detect these problems by compiling with gcc-4.1.0, or how? gcc 4.1 in this case (-Wstrict-aliasing) Dirk |