Getting munmap_chunk(): invalid pointer

990 views
Skip to first unread message

Rohith R

unread,
Nov 6, 2016, 10:29:01 PM11/6/16
to Sniper simulator
Hi Wim,

I have a module XYZ inside sniper written in C++ and I have placed it in SNIPER_ROOT/common/XYZ
It has some files XYZ.h and XYZ.cpp which sniper automatically compiles. I use this module in scheduler_pinned.cc

But it gives me this error :

*** Error in `/home/n1603031f/sniper/sniper-6.1/lib/sniper': munmap_chunk(): invalid pointer: 0x00000000013ae4e0 ***
[SNIPER] End
[SNIPER] Elapsed time: 103.61 seconds


The simulation works fine. This error doesn't affect the output as I have a valid sim.out file. But this sure looks ugly while seeing the output.

I believe my code for the module is correct and doesn't have any memory leaks as I am not doing anything fancy there.

The module looks something like :

class Helper
{
   
// Some fields
   
// Some member functions
}
class Constants
{
   
static constexpr double C0 = 1.0;
   
// and many such variables
}
class XYZ
{
    vector
<Helper> someVector;

    XYZ
()
   
{    
        someVector
.resize(Sim()->getConfig()->getApplicationCores());
   
}
}

Is there any way to solve this. I know this is very less information. But when I comment out the code which doesn't use this module, I don't get this error.

Any help or advice in this context will be helpful.

Regards,
Rohith R

Wim Heirman

unread,
Nov 13, 2016, 3:55:17 AM11/13/16
to snip...@googlegroups.com
Hi Rohith,

This looks like memory corruption, the most likely cause is that you are accessing the vector out-of-bounds.

Regards,
Wim


--
--
--
You received this message because you are subscribed to the Google
Groups "Sniper simulator" group.
To post to this group, send email to snip...@googlegroups.com
To unsubscribe from this group, send email to
snipersim+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/snipersim?hl=en

---
You received this message because you are subscribed to the Google Groups "Sniper simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snipersim+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages