-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid heap argument reports in spec2006 471.omnetpp #862
Comments
From zhao...@google.com on April 12, 2012 11:57:33 error report from result.txt Error 0 omnetpp_base.gcc43-32bit!cObject::~cObject()1 omnetpp_base.gcc43-32bit!EtherFrameWithLLC::~EtherFrameWithLLC()2 omnetpp_base.gcc43-32bit!EtherMAC::handleEndTxPeriod()3 omnetpp_base.gcc43-32bit!EtherMAC::handleMessage(cMessage_)4 omnetpp_base.gcc43-32bit!cSimulation::doOneEvent(cSimpleModule_)5 omnetpp_base.gcc43-32bit!TCmdenvApp::simulate()6 omnetpp_base.gcc43-32bit!TCmdenvApp::run()7 omnetpp_base.gcc43-32bit!main8 libc.so.6!__libc_start_main [/build/buildd/eglibc-2.11.1/csu/libc-start.c:226]9 omnetpp_base.gcc43-32bit!_startNote: elapsed time = 0:00:00.702 in thread 22669 Error 0 omnetpp_base.gcc43-32bit!EtherMAC::handleEndTxPeriod()1 omnetpp_base.gcc43-32bit!EtherMAC::handleMessage(cMessage_)2 omnetpp_base.gcc43-32bit!cSimulation::doOneEvent(cSimpleModule_)3 omnetpp_base.gcc43-32bit!TCmdenvApp::simulate()4 omnetpp_base.gcc43-32bit!TCmdenvApp::run()5 omnetpp_base.gcc43-32bit!main6 libc.so.6!__libc_start_main [/build/buildd/eglibc-2.11.1/csu/libc-start.c:226]7 omnetpp_base.gcc43-32bit!_startNote: elapsed time = 0:00:00.702 in thread 22669 Error 0 omnetpp_base.gcc43-32bit!cSimulation::doOneEvent(cSimpleModule*)1 omnetpp_base.gcc43-32bit!TCmdenvApp::simulate()2 omnetpp_base.gcc43-32bit!TCmdenvApp::run()3 omnetpp_base.gcc43-32bit!main4 libc.so.6!__libc_start_main [/build/buildd/eglibc-2.11.1/csu/libc-start.c:226]5 omnetpp_base.gcc43-32bit!_startNote: elapsed time = 0:00:00.709 in thread 22669 Error 0 omnetpp_base.gcc43-32bit!EtherAppSrv::handleMessage(cMessage_)1 omnetpp_base.gcc43-32bit!cSimulation::doOneEvent(cSimpleModule_)2 omnetpp_base.gcc43-32bit!TCmdenvApp::simulate()3 omnetpp_base.gcc43-32bit!TCmdenvApp::run()4 omnetpp_base.gcc43-32bit!main5 libc.so.6!__libc_start_main [/build/buildd/eglibc-2.11.1/csu/libc-start.c:226]6 omnetpp_base.gcc43-32bit!_startNote: elapsed time = 0:00:00.714 in thread 22669 Status: Accepted |
From zhao...@google.com on April 12, 2012 12:08:47 Similar error reported by Valgrind too: ==3816== |
From zhao...@google.com on April 12, 2012 12:24:24 More detailed reports from drmemory full mode Error 0 omnetpp_base.gcc43-32bit!cObject::~cObject()1 omnetpp_base.gcc43-32bit!EtherFrameWithLLC::~EtherFrameWithLLC()2 omnetpp_base.gcc43-32bit!EtherMAC::handleEndTxPeriod()3 omnetpp_base.gcc43-32bit!EtherMAC::handleMessage(cMessage_)4 omnetpp_base.gcc43-32bit!cSimulation::doOneEvent(cSimpleModule_)5 omnetpp_base.gcc43-32bit!TCmdenvApp::simulate()6 omnetpp_base.gcc43-32bit!TCmdenvApp::run()7 omnetpp_base.gcc43-32bit!main8 libc.so.6!__libc_start_main [/build/buildd/eglibc-2.11.1/csu/libc-start.c:226]9 omnetpp_base.gcc43-32bit!_startNote: elapsed time = 0:00:01.317 in thread 6950
Error 0 omnetpp_base.gcc43-32bit!EtherMAC::handleEndTxPeriod()1 omnetpp_base.gcc43-32bit!EtherMAC::handleMessage(cMessage_)2 omnetpp_base.gcc43-32bit!cSimulation::doOneEvent(cSimpleModule_)3 omnetpp_base.gcc43-32bit!TCmdenvApp::simulate()4 omnetpp_base.gcc43-32bit!TCmdenvApp::run()5 omnetpp_base.gcc43-32bit!main6 libc.so.6!__libc_start_main [/build/buildd/eglibc-2.11.1/csu/libc-start.c:226]7 omnetpp_base.gcc43-32bit!_startNote: elapsed time = 0:00:01.317 in thread 6950
Error 0 omnetpp_base.gcc43-32bit!cSimulation::doOneEvent(cSimpleModule_)1 omnetpp_base.gcc43-32bit!TCmdenvApp::simulate()2 omnetpp_base.gcc43-32bit!TCmdenvApp::run()3 omnetpp_base.gcc43-32bit!main4 libc.so.6!__libc_start_main [/build/buildd/eglibc-2.11.1/csu/libc-start.c:226]5 omnetpp_base.gcc43-32bit!_startNote: elapsed time = 0:00:01.334 in thread 6950
|
From zhao...@google.com on April 12, 2012 12:50:23 Error report with symbol information: Error 0 omnetpp_base.gcc43-32bit-sym!~EtherFrameWithLLC [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.0000/E\therFrame_m.cc:384] 1 omnetpp_base.gcc43-32bit-sym!EtherMAC::handleMessage(cMessage_) [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-\32bit-sym.0000/EtherMAC.cc:360] 2 omnetpp_base.gcc43-32bit-sym!TCmdenvApp::simulate() [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.00\00/libs/cmdenv/cmdenv.cc:388] 3 omnetpp_base.gcc43-32bit-sym!TCmdenvApp::run() [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.0000/l\ibs/cmdenv/cmdenv.cc:226] 4 omnetpp_base.gcc43-32bit-sym!main [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.0000/l\ibs/envir/main.cc:42] 5 libc.so.6!__libc_start_main [/build/buildd/eglibc-2.11.1/csu/libc-start.c:226]6 omnetpp_base.gcc43-32bit-sym!_startNote: elapsed time = 0:00:01.695 in thread 9775
... Error 0 omnetpp_base.gcc43-32bit-sym!~EtherAppResp [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.0000/E\therApp_m.cc:201] 1 omnetpp_base.gcc43-32bit-sym!~cObject [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.0000/l\ibs/sim/cobject.cc:96] 2 omnetpp_base.gcc43-32bit-sym!~cMessage [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.0000/l\ibs/sim/cmessage.cc:74] 3 omnetpp_base.gcc43-32bit-sym!~EtherFrame [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.0000/E\therFrame_m.cc:29] 4 omnetpp_base.gcc43-32bit-sym!~EtherFrameWithLLC [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.0000/E\therFrame_m.cc:384] 5 omnetpp_base.gcc43-32bit-sym!EtherMAC::handleMessage(cMessage_) [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-\32bit-sym.0000/EtherMAC.cc:360] 6 omnetpp_base.gcc43-32bit-sym!TCmdenvApp::simulate() [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.00\00/libs/cmdenv/cmdenv.cc:388] 7 omnetpp_base.gcc43-32bit-sym!TCmdenvApp::run() [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.0000/l\ibs/cmdenv/cmdenv.cc:226] 8 omnetpp_base.gcc43-32bit-sym!main [/usr/local/google/home/zhaoqin/Benchmarks/spec2k6/SPEC_CPU2006v1.2/benchspec/CPU2006/471.omnetpp/build/build_base_gcc43-32bit-sym.0000/l\ibs/envir/main.cc:42] 9 libc.so.6!__libc_start_main [/build/buildd/eglibc-2.11.1/csu/libc-start.c:226]#10 omnetpp_base.gcc43-32bit-sym!_start
|
From zhao...@google.com on April 12, 2012 14:46:06 C++ makes debugging impossible: Tracking the execution class EtherFrameWithLLC : public EtherFrame 0x8054126 <EtherFrameWithLLC::dup() const>: push %ebp void *cObject::operator new(size_t m) The allocated pointer will be passed into cObject::setOwner and assigned to ownerp->firstchildp sometimes: The firstchildp will then be deleted later using delete (gdb) where That's how the mismatch happens. It seems cObject only implemented new(size_t m), which calls to system new[], which calls to new(size_t m) at heap.cc. It seems that the system new[] will simply convert new[m] to new(size_t m). 0xf7f870a0 <_Znaj>: push %ebp Similarly, the detele[] p will calls to delete p directly (gdb) x/20i _ZdaPv |
From zhao...@google.com on April 12, 2012 14:48:37 After analysis, it is real mismatch. Status: WontFix |
From bruen...@google.com on April 12, 2012 17:01:25 Status: NotABug |
From zhao...@google.com on April 12, 2012 14:47:08
test input, drmemory shadow light mode:
time ~/Workspace/DrMemory/builds/build_x86_rel.svn/bin/drmemory.pl -light -verbose 2 -- ./omnetpp_base.gcc43-32bit omnetpp.ini
ERRORS FOUND:
0 unique, 0 total unaddressable access(es)
55 unique, 589283 total invalid heap argument(s)
0 unique, 0 total warning(s)
DUPLICATE ERROR COUNTS:
Error # 16: 4
Error # 17: 2
Error # 18: 147176
Error # 19: 147176
Error # 20: 258355
Error # 21: 35997
...
Error
#18
: INVALID HEAP ARGUMENT: allocated with operator new[], freed with operator delete#0 omnetpp_base.gcc43-32bit!? (0x080b22f5 <omnetpp_base.gcc43-32bit+0x6a2f5>) modid:1
#1 omnetpp_base.gcc43-32bit!? (0x08051718 <omnetpp_base.gcc43-32bit+0x9718>) modid:1
#2 omnetpp_base.gcc43-32bit!? (0x08059211 <omnetpp_base.gcc43-32bit+0x11211>) modid:1
#3 omnetpp_base.gcc43-32bit!? (0x08059cb8 <omnetpp_base.gcc43-32bit+0x11cb8>) modid:1
#4 omnetpp_base.gcc43-32bit!? (0x080aaf04 <omnetpp_base.gcc43-32bit+0x62f04>) modid:1
#5 omnetpp_base.gcc43-32bit!? (0x08088838 <omnetpp_base.gcc43-32bit+0x40838>) modid:1
#6 omnetpp_base.gcc43-32bit!? (0x08088b8a <omnetpp_base.gcc43-32bit+0x40b8a>) modid:1
#7 omnetpp_base.gcc43-32bit!? (0x0808d4a8 <omnetpp_base.gcc43-32bit+0x454a8>) modid:1
#8 libc.so.6!? (0xf7301bd6 <libc.so.6+0x16bd6>) modid:4
#9 omnetpp_base.gcc43-32bit!? (0x0804a291 <omnetpp_base.gcc43-32bit+0x2291>) modid:1
info: @0:00:00.702 in thread 22669
error end
Error
#19
: INVALID HEAP ARGUMENT: allocated with operator new[], freed with operator delete#0 omnetpp_base.gcc43-32bit!? (0x08059211 <omnetpp_base.gcc43-32bit+0x11211>) modid:1
#1 omnetpp_base.gcc43-32bit!? (0x08059cb8 <omnetpp_base.gcc43-32bit+0x11cb8>) modid:1
#2 omnetpp_base.gcc43-32bit!? (0x080aaf04 <omnetpp_base.gcc43-32bit+0x62f04>) modid:1
#3 omnetpp_base.gcc43-32bit!? (0x08088838 <omnetpp_base.gcc43-32bit+0x40838>) modid:1
#4 omnetpp_base.gcc43-32bit!? (0x08088b8a <omnetpp_base.gcc43-32bit+0x40b8a>) modid:1
#5 omnetpp_base.gcc43-32bit!? (0x0808d4a8 <omnetpp_base.gcc43-32bit+0x454a8>) modid:1
#6 libc.so.6!? (0xf7301bd6 <libc.so.6+0x16bd6>) modid:4
#7 omnetpp_base.gcc43-32bit!? (0x0804a291 <omnetpp_base.gcc43-32bit+0x2291>) modid:1
info: @0:00:00.702 in thread 22669
error end
Error
#20
: INVALID HEAP ARGUMENT: allocated with operator new[], freed with operator delete#0 omnetpp_base.gcc43-32bit!? (0x080aaf04 <omnetpp_base.gcc43-32bit+0x62f04>) modid:1
#1 omnetpp_base.gcc43-32bit!? (0x08088838 <omnetpp_base.gcc43-32bit+0x40838>) modid:1
#2 omnetpp_base.gcc43-32bit!? (0x08088b8a <omnetpp_base.gcc43-32bit+0x40b8a>) modid:1
#3 omnetpp_base.gcc43-32bit!? (0x0808d4a8 <omnetpp_base.gcc43-32bit+0x454a8>) modid:1
#4 libc.so.6!? (0xf7301bd6 <libc.so.6+0x16bd6>) modid:4
#5 omnetpp_base.gcc43-32bit!? (0x0804a291 <omnetpp_base.gcc43-32bit+0x2291>) modid:1
info: @0:00:00.709 in thread 22669
error end
Original issue: http://code.google.com/p/drmemory/issues/detail?id=862
The text was updated successfully, but these errors were encountered: