WSL: valgrind doesn't work
# valgrind -v ./test1
--1791:0:aspacem -1: ANON 0038000000-00383d5fff 4022272 r-x-- SmFixed d=0x000 i=205168 o=0 (0) m=0 /usr/lib/valgrind/memcheck-amd64-linux
--1791:0:aspacem Valgrind: FATAL: aspacem assertion failed:
--1791:0:aspacem segment_is_sane
--1791:0:aspacem at m_aspacemgr/aspacemgr-linux.c:1502 (add_segment)
--1791:0:aspacem Exiting now.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Reactions: 19
- Comments: 31 (1 by maintainers)
Hi for me it helped to download sources and compile (./configure, make, make install , make clean , make distclean) in bash. valgrind installed from repositories writed above rubbish.
I found that using this method solved it for me, however it could have been a coincidence/my code was just too simple, but every test I did that involved intentional memory leaks were properly tracked (I have no attachment to my current LSFW install as I haven’t been able to do anything noteworthy in it yet, so I just nuked the whole install and reinstalled it (which is a very quick process btw)) As per this: Turns out they actually did resolve it, just destroy your old linux subsystem and install a new one (I did this as I’ve been having problems when updating packages where it has issues with grub and other functions not being implemented, but those issues were fixed in newer installs of lxsfw), and install the valgrind available from apt – it naturally works To reinstall (using cmd prompt) To uninstall and preserve /home directory on WSL:
To uninstall and trash/home directory on WSL:
To install again:
To install again without user & password (always root):
@byvlstr As per my comment in #1295 I have a dirty hack that at least gets you past the SIGSEGV: https://github.com/Grauniad/valgrind
It’s not perfect - but applying this change to the 3.12.0 release of valgrind gets you going at least. Note that:
…so use it at your own risk 😃
@arthurpham: The callgrind suite passes clean on my machine, but 1 & 2 still apply…
@jbhum nitpick: that’s not a stack trace, it’s an strace, or syscall trace.