DynamoRIO / drmemory

Memory Debugger for Windows, Linux, Mac, and Android
Other
2.44k stars 262 forks source link

False positive uninits when using RTTI #27

Open derekbruening opened 9 years ago

derekbruening commented 9 years ago

From timurrrr@google.com on August 13, 2010 11:08:52

r33 and v1.2.1 ( r36 ) give 3 uninit reports on the following test:

include

include

template const char *GetTypeName() { return typeid(T).name(); }

int main() { printf("GetTypeName() = \"%s\"\n", GetTypeName()); return 0; }

(Build with "cl /Zi test.cpp")

Original issue: http://code.google.com/p/drmemory/issues/detail?id=27

derekbruening commented 9 years ago

From timurrrr@google.com on August 13, 2010 08:09:10

Error #1: UNINITIALIZED READ: reading register eax @0:00:01.344 in thread 118276 0x0040d375 <test.exe+0xd375> test.exe!UnDecorator::operator char * f:\dd\vctools\langapi\undname\undname.cxx:808
0x0040d601 <test.exe+0xd601> test.exe!unDName f:\dd\vctools\langapi\undname\undname.cxx:628
0x004028c2 <test.exe+0x28c2> test.exe!type_info::_Name_base f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\typname.cpp:124
0x004011b7 <test.exe+0x11b7> test.exe!type_info::name f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\typinfo.cpp:45
0x00401028 <test.exe+0x1028> test.exe!main z:\dr-sandbox\issues\typeid\test.cpp:10
0x00401469 <test.exe+0x1469> test.exe!
tmainCRTStartup f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c:327
0x7c817077 <KERNEL32.dll+0x17077> KERNEL32.dll!RegisterWaitForInputIdle ??:0

Error #2: UNINITIALIZED READ: reading register eflags @0:00:01.344 in thread 118276 0x004093d9 <test.exe+0x93d9> test.exe!DName::isValid f:\dd\vctools\langapi\undname\undname.inl:478
0x0040d601 <test.exe+0xd601> test.exe!unDName f:\dd\vctools\langapi\undname\undname.cxx:628
0x004028c2 <test.exe+0x28c2> test.exe!type_info::_Name_base f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\typname.cpp:124
0x004011b7 <test.exe+0x11b7> test.exe!type_info::name f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\typinfo.cpp:45
0x00401028 <test.exe+0x1028> test.exe!main z:\dr-sandbox\issues\typeid\test.cpp:10
0x00401469 <test.exe+0x1469> test.exe!
tmainCRTStartup f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c:327
0x7c817077 <KERNEL32.dll+0x17077> KERNEL32.dll!RegisterWaitForInputIdle ??:0

Error #3: UNINITIALIZED READ: reading register eflags @0:00:01.344 in thread 118276 0x004093d9 <test.exe+0x93d9> test.exe!DName::isValid f:\dd\vctools\langapi\undname\undname.inl:478
0x0040d3f1 <test.exe+0xd3f1> test.exe!UnDecorator::operator char * f:\dd\vctools\langapi\undname\undname.cxx:825
0x0040d601 <test.exe+0xd601> test.exe!unDName f:\dd\vctools\langapi\undname\undname.cxx:628
0x004028c2 <test.exe+0x28c2> test.exe!type_info::_Name_base f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\typname.cpp:124
0x004011b7 <test.exe+0x11b7> test.exe!type_info::name f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\typinfo.cpp:45
0x00401028 <test.exe+0x1028> test.exe!main z:\dr-sandbox\issues\typeid\test.cpp:10
0x00401469 <test.exe+0x1469> test.exe!
tmainCRTStartup f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c:327
0x7c817077 <KERNEL32.dll+0x17077> KERNEL32.dll!RegisterWaitForInputIdle ??:0