Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Valgrind does not work with WSL?

When I installed WSL for my computer I was very excited to have a more natively supported Linux system rather than using VirtualBox. However I get this error when I try to run it. Is there a reason why?

I am happy to give more information as required.

--4364:0:aspacem   -1: ANON 0038000000-00383d5fff 4022272 r-x-- SmFixed d=0x000 i=25365   o=0       (0) m=0 /usr/lib/valgrind/memcheck-amd64-linux

--4364:0:aspacem  Valgrind: FATAL: aspacem assertion failed:

--4364:0:aspacem    segment_is_sane

--4364:0:aspacem    at m_aspacemgr/aspacemgr-linux.c:1502 (add_segment)

--4364:0:aspacem  Exiting now.
like image 963
Doggiie Avatar asked Dec 15 '22 02:12

Doggiie


1 Answers

It's definitely possible

I've encountered some problems installing it directly with apt, however it can be installed manually with some very simple steps:

  • Download the source file: wget http://valgrind.org/downloads/valgrind-3.12.0.tar.bz2 (by the time you read this there could be a newer version)
  • Extract the archive: tar -xvjf valgrind-3.12.0.tar.bz2
  • Configure the installation process: cd into the exctracted folder valgrind-3.12.0 and then launch ./configure
  • Make: simply launch make while in the valgrind-3.12.0 folder
  • Check the dependencies: launch make check to see whether all the dependencies necessary for the installation are satisfied (e.g: you'll have to install g++, just launch sudo apt install g++)
  • Install valgrind: type sudo make install to install it
like image 178
Andrea Tulimiero Avatar answered Dec 21 '22 05:12

Andrea Tulimiero