Heap corruption not detected by Valgrind or Electric Fence. Should I be suspicious? (C++)

前端 未结 3 1937
孤街浪徒
孤街浪徒 2021-01-02 23:08

I recently encountered my first battle (solved) with heap corruption. On my linux machine at home the culprit code exits without error using valgrind and e

3条回答
  •  Happy的楠姐
    2021-01-03 00:03

    If you're getting good results on one machine and bad results on another using the same tool, it'd be a really good idea to run some memory tests on the development machine. Bootable images for memtest86 can be obtained easily, and certain memory errors could explain your issue neatly.

    On the other hand, if you're using different operating systems on each machine it's also possible (maybe even more likely) that a bug exists in the windows versions of whatever crossplatform libraries you're using.

提交回复
热议问题