|
From: Michael D. <mda...@bl...> - 2016-10-22 00:59:48
|
Hello, When running Valgrind on amd64, I believe handleAddrOverrides() is incorrectly truncating the segment base addresses when the address-size override prefix is used. The way I stumbled upon this was having a value over the 4GB boundary in the fs register and hitting this instruction: 0x0000000000052105 <+5>: 64 67 8b 00 mov %fs:(%eax),%eax The final address is truncated, which ends up reading from the wrong location. Intel Developers Manual (Address Calculations in 64-Bit Mode) says that the base is added after the effective address is truncated, and that the base itself does not get truncated. The AMD64 Programmers Manual Vol2 says something similar. I have attached the patch I am currently using to work around it. Thanks, Mike |