From: Rhys Kidd Date: Mon, 8 Jun 2015 11:07:48 +0000 (+0000) Subject: Memcheck on multithreaded program fails with Assertion 'sizeof(UWord) == sizeof(UInt... X-Git-Tag: svn/VALGRIND_3_11_0~303 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f1f6e7bdc2d840e5611632521c1a4834716874a;p=thirdparty%2Fvalgrind.git Memcheck on multithreaded program fails with Assertion 'sizeof(UWord) == sizeof(UInt)' failed in m_syscall.c bz#302630 == bz#326797 On OS X 10.7 and OS X 10.8 Before: == 598 tests, 201 stderr failures, 12 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures == After: == 598 tests, 200 stderr failures, 12 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures == git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15329 --- diff --git a/NEWS b/NEWS index 98c9537a29..3a91179c77 100644 --- a/NEWS +++ b/NEWS @@ -111,6 +111,9 @@ where XXXXXX is the bug number as listed below. 254164 OS X task_info: UNKNOWN task message [id 3405, to mach_task_self(), reply 0x........] 269360 s390x: Fix addressing mode selection for compare-and-swap +302630 Memcheck on multithreaded program fails with Assertion + 'sizeof(UWord) == sizeof(UInt)' failed in m_syscall.c + == 326797 319274 Fix unhandled syscall: unix:410 (sigsuspend_nocancel) on OS X 333051 mmap of huge pages fails due to incorrect alignment == 339163 diff --git a/coregrind/m_syswrap/syswrap-darwin.c b/coregrind/m_syswrap/syswrap-darwin.c index de2f7db3ce..d065b1cda4 100644 --- a/coregrind/m_syswrap/syswrap-darwin.c +++ b/coregrind/m_syswrap/syswrap-darwin.c @@ -7375,12 +7375,23 @@ PRE(thread_terminate) // and SET_STATUS_Success creates a UNIX-class syscall result. // Hence we have to laboriously construct the full SysRes "by hand" // and use that to set the syscall return status. +#if defined(VGA_x86) SET_STATUS_from_SysRes( VG_(mk_SysRes_x86_darwin)( VG_DARWIN_SYSCALL_CLASS_MACH, False/*success*/, 0, 0 ) ); +#elif defined(VGA_amd64) + SET_STATUS_from_SysRes( + VG_(mk_SysRes_amd64_darwin)( + VG_DARWIN_SYSCALL_CLASS_MACH, + False/*success*/, 0, 0 + ) + ); +#else +#error unknown architecture +#endif *flags &= ~SfMayBlock; // clear flag set by PRE(mach_msg) } else { // Terminating some other thread.