write_suppress_pattern can write too-long msg for dr_fprintf
#29 geöffnet am 28. Nov. 2014
Repository-Metriken
- Stars
- (2.727 Stars)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
From derek.br...@gmail.com on August 18, 2010 16:30:21
this is in the middle of my issue #26 fix, so operator delete was raising unaddr errors, but this could happen w/ any C++ app or other app w/ very long symbol names:
% bin/drmemory.exe -dr e:/derek/dr/win32/exports -dr_debug -batch -- e:/derek/ issue251 /base_unittests.exe --gtest_filter="*.NewFile"
ChildEBP RetAddr
00 228c8a28 1523ccfc ntdll!ZwRaiseHardError+0x12
01 228c8a78 1520eef4 dynamorio!nt_messagebox+0xec [e:\derek\dr\win32\opensource\core\win32\ntdll.c @ 3205]
02 228c8a8c 150dd5b8 dynamorio!debugbox+0x54 [e:\derek\dr\win32\opensource\core\win32\os.c @ 3434]
03 228c8da8 150dd965 dynamorio!notify+0x1d8 [e:\derek\dr\win32\opensource\core\utils.c @ 1852]
04 228c8e14 150dc9a1 dynamorio!report_dynamorio_problem+0x355 [e:\derek\dr\win32\opensource\core\utils.c @ 2066]
05 228c9140 151fd4db dynamorio!do_file_write+0xb1 [e:\derek\dr\win32\opensource\core\utils.c @ 1648]
06 228c9158 100b0e9c dynamorio!dr_fprintf+0x1b [e:\derek\dr\win32\opensource\core\x86\instrument.c @ 2884]
07 228c9258 100b029a drmemorylib!write_suppress_pattern+0xbac [e:\derek\dr\win32\oss-clients\drmemory\drmemory\report.c @ 439]
08 228c9378 100abbbf drmemorylib!on_suppression_list+0x145a [e:\derek\dr\win32\oss-clients\drmemory\drmemory\report.c @ 563]
09 228c95c0 100ab418 drmemorylib!report_error+0x79f [e:\derek\dr\win32\oss-clients\drmemory\drmemory\report.c @ 1132]
0a 228c95ec 1001bfc3 drmemorylib!report_unaddressable_access+0x28 [e:\derek\dr\win32\oss-clients\drmemory\drmemory\report.c @ 1235]
0b 228c9878 10018a9c drmemorylib!handle_mem_ref+0x31c3 [e:\derek\dr\win32\oss-clients\drmemory\drmemory\readwrite.c @ 2769]
0c 228c99d0 1000ecb1 drmemorylib!check_mem_opnd+0x184c [e:\derek\dr\win32\oss-clients\drmemory\drmemory\readwrite.c @ 2536]
0d 228c9f44 2296008f drmemorylib!slow_path+0x1f41 [e:\derek\dr\win32\oss-clients\drmemory\drmemory\readwrite.c @ 1699]
WARNING: Frame IP not in any known module. Following frames may be wrong.
0e 0012fce0 0042e507 0x2296008f
0f 0012fcf0 0042e00b base_unittests!std::allocator<wchar_t>::deallocate+0x17 [c:\program files (x86)\microsoft visual studio 9.0\vc\include\xmemory @ 140]
10 0012fd08 0042dcca base_unittests!std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::_Tidy+0x6b [c:\program files (x86)\microsoft visual studio 9.0\vc\include\xstring @ 2158]
11 0012fd1c 004fd5d9 base_unittests!std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >+0x1a [c:\program files (x86)\microsoft visual studio 9.0\vc\include\xstring @ 907]
12 0012fd28 004fd5a9 base_unittests!std::pairstd::basic_string<char,std::char_traits<char,std::allocator > const ,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >::_Treestd::_Tmap_traits<std::basic_string<char,std::char_traits<char,std::allocator >,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::lessstd::basic_string<char,std::char_traits<char,std::allocator > >,std::allocator<std::pair<std::basic_string<char,s"pairstd::basic_string<char,std::char_traits<char,std::allocator > const ,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > >+0x19
13 0012fd34 004fd516 base_unittests!std::_Tree_nodstd::_Tmap_traits<std::basic_string<char,std::char_traits<char,std::allocator >,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::lessstd::basic_string<char,std::char_traits<char,std::allocator > >,std::allocatorstd::pair<std::basic_string<char,std::char_traits<char,std::allocator > const ,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,0> >::_Node::_Node+0x19
0:000> .frame 5
05 228c9140 151fd4db dynamorio!do_file_write+0xb1 [e:\derek\dr\win32\opensource\core\utils.c @ 1648]
0:000> dv
f = 0x00000344
fmt = 0x10149dac "%.*s???"
ap = 0x228c9168 "c???"
size = 0xffffffff
logbuf = char [768] "base_unittests.exe!std::_Treestd::_Tmap_traits<std::basic_string<char,std::char_traits<char,std::allocator >,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::lessstd::basic_string<char,std::char_traits<char,std::allocator > >,std::allocatorstd::pair<std::basic_string<char,std::char_traits<char,std::allocator > const ,std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,0> >::
Original issue: http://code.google.com/p/drmemory/issues/detail?id=29