Valgrind does not work with WSL?

拈花ヽ惹草 提交于 2019-11-28 06:24:33

问题


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.

回答1:


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



回答2:


I had the same problem, the solution was to install Windows 10 creators update (version 1703), and reinstall Bash/WSL. Valgrind now works fine :)



来源:https://stackoverflow.com/questions/40355474/valgrind-does-not-work-with-wsl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!