glibc detected error

后端 未结 4 1771
青春惊慌失措
青春惊慌失措 2020-12-22 07:01

Can anybody please help me make sense of this error message?

*** glibc detected *** ./kprank_new3_norm: munmap_chunk(): invalid pointer: 0x00000000096912d0 *         


        
相关标签:
4条回答
  • 2020-12-22 07:10

    It looks like you're calling delete or free on something that has either already been deleted or is invalid/corrupt.

    Try running under valgrind if the cause isn't apparent from the stack trace you already have.

    0 讨论(0)
  • 2020-12-22 07:12

    It appears that code you are writing(?) tries to access memory you don't have rights to.

    ./kprank_new3_norm: munmap_chunk(): invalid pointer: 0x00000000096912d0 ***
    

    And based on your GDB output you are maybe trying to close a file that wasn't open, or maybe already closed due to it not being in scope any more? It's hard for me to say without seeing your code.

    0 讨论(0)
  • 2020-12-22 07:13

    From my experience, sometimes, makefiles that don't resolve for every dependency (e.g. the ones of the sort where entries do not depend on header files) can cause encrypted trouble, i.e. one might change class signatures and not recompile everything that depends on that class, resulting in many sorts of memory trouble.

    So, maybe make clean and recompile?

    0 讨论(0)
  • 2020-12-22 07:28

    The dtor of std::map is crashing on shutdown. Did you fill the map in some invalid way that could have corrupted its internal state?

    0 讨论(0)
提交回复
热议问题