DynamoRIO / DynamoRIO/drmemory
cs2bug fails in Cygwin build on bot due to false positive mismatch where new[] == new
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
_From [rnk@google.com](https://code.google.com/u/rnk@google.com/) on December 07, 2011 12:20:29_
Example failing build: http://build.chromium.org/p/client.drmemory/builders/win-7_x64-drm/builds/1768 Mismatch report:
Error `#6`: INVALID HEAP ARGUMENT: allocated with operator new, freed with operator delete[]
#0 cs2bug.exe!test_mismatch+0x131 (0x012618a2 )
e:\b\build\slave\win_7_x64_drm_checkout\drmemory\tests\cs2bug.cpp:188+0xe
#1 cs2bug.exe!main+0x2b (0x0126123c )
e:\b\build\slave\win_7_x64_drm_checkout\drmemory\tests\cs2bug.cpp:205+0x4
#2 cs2bug.exe!__tmainCRTStartup+0x10e (0x01262bff )
f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c:586+0x16
#3 KERNEL32.dll!BaseThreadInitThunk+0x11 (0x7646339a )
??:0
#4 ntdll.dll!RtlInitializeExceptionChain+0x62 (0x77819ed2 )
??:0
#5 ntdll.dll!RtlInitializeExceptionChain+0x35 (0x77819ea5 )
??:0
Note: elapsed time = 0:00:04.578 in thread 3392
Note: memory was allocated here:
Note: # 0 MSVCR90.dll!aligned_offset_recalloc+0x39 (0x012618a2 )
Note: ??:0
Note: # 1 cs2bug.exe!test_mismatch+0x116 (0x0126123c )
Note: e:\b\build\slave\win_7_x64_drm_checkout\drmemory\tests\cs2bug.cpp:187+0x6
Note: # 2 cs2bug.exe!main+0x2b (0x01262bff )
Note: e:\b\build\slave\win_7_x64_drm_checkout\drmemory\tests\cs2bug.cpp:205+0x4
Note: # 3 cs2bug.exe!__tmainCRTStartup+0x10e (0x7646339a )
Note: f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c:586+0x16
Note: # 4 KERNEL32.dll!BaseThreadInitThunk+0x11 (0x77819ed2 )
Note: ??:0
Note: # 5 ntdll.dll!RtlInitializeExceptionChain+0x62 (0x77819ea5 )
Note: ??:0
The relevant source lines in cs2bug.cpp:
/\* not a mismatch, but test debug operator del (issue #500) */
x = new int[7];
delete[] x;
This does not reproduce locally for me, and Cygwin is not a high priority for us. I'm going to send a diff to accept 3, 4, or 5 invalid heap args on any platform and let the results file matching verify that the right reports were generated.
_Original issue: http://code.google.com/p/drmemory/issues/detail?id=707_
Contributor guide
Assessment
This issue has not been assessed yet.