Various leak reports under _getptd #275

Open
derekbruening opened this Issue Nov 28, 2014 · 2 comments

Comments

Projects
None yet
1 participant
Contributor

derekbruening commented Nov 28, 2014

From timurrrr@google.com on January 21, 2011 06:23:32

http://build.chromium.org/p/chromium.fyi/builders/Windows%20Tests%20(DrMemory)/builds/1574/steps/memory%20test:%20remoting/logs/stdio EAK 532 direct bytes 0x0808ee18-0x0808f02c + 216 indirect bytes
#1 0x008799a1 _getptd_noexit crt\src\tidtable.c:588
#2 0x00879a2b _getptd crt\src\tidtable.c:641
#3 0x0085e90f _LocaleUpdate::_LocaleUpdate crt\src\setlocal.h:264
#4 0x0088f0d5 _output_s_l crt\src\output.c:1002
#5 0x00867878 _vsnprintf_helper crt\src\vsprintf.c:140
#6 0x00867ac7 _vsprintf_s_l crt\src\vsprintf.c:236
#7 0x0085d0b3 sprintf_s crt\src\sprintf.c:215
#8 0x0043cf5a std::num_put<char,std::ostreambuf_iterator<char,std::char_traits > >::do_put c:\program files\microsoft visual studio 9.0\vc\include\xlocnum:1168
#9 0x00447347 std::num_put<char,std::ostreambuf_iterator<char,std::char_traits > >::put c:\program files\microsoft visual studio 9.0\vc\include\xlocnum:1085
#10 0x00447240 std::basic_ostream<char,std::char_traits >::operator<< c:\program files\microsoft visual studio 9.0\vc\include\ostream:299
#11 0x005c1d3c talk_base::ToString third_party\libjingle\source\talk\base\stringencode.h:146
#12 0x005bf955 talk_base::ToString third_party\libjingle\source\talk\base\stringencode.h:162
#13 0x005b1390 cricket::SessionManager::CreateSession third_party\libjingle\source\talk\p2p\base\sessionmanager.cc:81
#14 0x0081dfb1 remoting::protocol::JingleSessionManager::DoConnect remoting\protocol\jingle_session_manager.cc:250
...
#17 0x007752e0 MessageLoop::RunTask base\message_loop.cc:356
#18 0x00775415 MessageLoop::DeferOrRunPendingTask base\message_loop.cc:365
#19 0x007760ac MessageLoop::DoWork base\message_loop.cc:558
#20 0x008405d7 remoting::JingleThread::JingleMessagePump::OnMessage remoting\jingle_glue\jingle_thread.cc:47
#21 0x006b0e16 talk_base::MessageQueue::Dispatch third_party\libjingle\source\talk\base\messagequeue.cc:372
#22 0x0068cf37 talk_base::Thread::ProcessMessages third_party\libjingle\source\talk\base\thread.cc:492
#23 0x0068c538 talk_base::Thread::Run third_party\libjingle\source\talk\base\thread.cc:359
#24 0x00840124 remoting::JingleThread::Run remoting\jingle_glue\jingle_thread.cc:134
#25 0x0068c4f2 talk_base::Thread::PreRun third_party\libjingle\source\talk\base\thread.cc:352
#26 0x7c80b729 GetModuleFileNameA KERNEL32.dll http://build.chromium.org/p/chromium.fyi/builders/Windows&#37;20Tests&#37;20(DrMemory)/builds/1574/steps/memory&#37;20test:&#37;20base/logs/stdio LEAK 532 direct bytes 0x059a8120-0x059a8334 + 216 indirect bytes
#1 0x0083f191 _getptd_noexit crt\src\tidtable.c:588
#2 0x0083f21b _getptd crt\src\tidtable.c:641
#3 0x0082885b rand crt\src\rand.c:65
#4 0x006d7041 base::MutexLockTestThread::DoStuff base\synchronization\lock_unittest.cc:157
#5 0x006d70c1 base::MutexLockTestThread::ThreadMain base\synchronization\lock_unittest.cc:164
#6 0x00776ec0 base::`anonymous namespace'::ThreadFunc base\threading\platform_thread_win.cc:37
#7 0x7c80b729 GetModuleFileNameA KERNEL32.dll

We saw some magic reports under ThreadSanitizer, e.g. https://code.google.com/p/data-race-test/issues/detail?id=53 http://www.microsoft.com/msj/0799/win32/win320799.aspx "Note that the CRT's _getptd function internally calls the operating system's TlsGetValue function ..."

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

Contributor

derekbruening commented Nov 28, 2014

From timurrrr@google.com on June 03, 2011 08:07:22

One more - with _getptd_noexit in the middle, without _getptd
===test.cpp===
#include <windows.h>
#include <stdio.h>

DWORD CALLBACK Callback(void *param) { return printf("BOO\n"); }

int main(int argc, char **argv) {
if (!QueueUserWorkItem(Callback, NULL, 0)) {
return 1 || printf("QueueUserWorkItem failed\n");
}
Sleep(500);
return 0;
}

Error #1: LEAK 532 direct bytes 0x00144d48-0x00144f5c + 0 indirect bytes
0x0040b39b <test.exe+0xb39b> test.exe!_calloc_impl
f:\dd\vctools\crt_bld\self_x86\crt\src\calloc_impl.c:94
0x0040412a <test.exe+0x412a> test.exe!_calloc_crt
f:\dd\vctools\crt_bld\self_x86\crt\src\crtheap.c:61
0x00403bb2 <test.exe+0x3bb2> test.exe!_getptd_noexit
f:\dd\vctools\crt_bld\self_x86\crt\src\tidtable.c:590
0x00401829 <test.exe+0x1829> test.exe!_output_l
f:\dd\vctools\crt_bld\self_x86\crt\src\output.c:2155
0x00401102 <test.exe+0x1102> test.exe!printf
f:\dd\vctools\crt_bld\self_x86\crt\src\printf.c:63
0x0040102d <test.exe+0x102d> test.exe!Callback
test.cpp:4
0x7c92796d <ntdll.dll+0x2796d> ntdll.dll!RtlGUIDFromString
0x7c9279ab <ntdll.dll+0x279ab> ntdll.dll!RtlGUIDFromString
0x7c927a6d <ntdll.dll+0x27a6d> ntdll.dll!RtlGUIDFromString
0x7c927a44 <ntdll.dll+0x27a44> ntdll.dll!RtlGUIDFromString
0x7c80b729 <KERNEL32.dll+0xb729> KERNEL32.dll!GetModuleFileNameA

Status: New
Owner: ---
Labels: Bug-FalsePositive

derekbruening removed the Type-Bug label Apr 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment