How can I get Valgrind working on Mac OS Sierra? I tried installing it but it seems to be incompatible. Or is there an alternative that I can use?
Related
I just updated to Macos Ventura, however when I try to compile my project which was compiling cleanly before I updated, I get the below error message. Here is one of the outputs of the error message:
In file included from /opt/homebrew/include/SDL2/SDL_config.h:33,
from /opt/homebrew/include/SDL2/SDL_stdinc.h:31,
from /opt/homebrew/include/SDL2/SDL_main.h:25,
from /opt/homebrew/include/SDL2/SDL.h:32,
from ../include/gfc_audio.h:4,
from gfc_audio.c:4:
/opt/homebrew/include/SDL2/SDL_platform.h:112:3: error: #error SDL for Mac OS X only supports deploying on 10.7 and above.
112 | # error SDL for Mac OS X only supports deploying on 10.7 and above.
| ^~~~~
Also I am using gcc-12 from homebrew and reinstalled gcc and sdl if that helps.
So after some research, according to this github issue, XCode 14.1 has not been released and is still in release candidate state. After the release of XCode 14.1 it should be working fine.
I'm trying to work PintOS on my Ubuntu 19.10 machine, but I'm getting trouble with this library, did some research and apparently stropts.h part of a POSIX XSR option, which Linux now, says it is not supported.
My question is, I can somehow make this work on my Ubuntu 19.10? trying to figure this out before downgrading to 16.04 that works perfectly fine with PintOS.
I currently have Mac Sierra 10.12.3 and I had the surprise that Valgrind is not compatible despite their latest version.
valgrind: mmap-FIXED(0x0, 253952) failed in UME (load_segment1) with error 12 (Cannot allocate memory).
I wanted to know if there was a solution to solve this problem or another debugger (gdb does not work either).
I prefer not to use XCode because I like to program with a terminal.
Thank you
Use LLDB as described in this article http://www.developerfiles.com/debugging-c-with-clang-compiler-and-lldb/
I was following this exercise. This page has instructions to install Valgrind 3.6.1 but this version of Valgrind is not supported by my current Linux kernel version. So, I installed Valgrind 3.11.0 and followed the instructions there after and on running this command:
$ valgrind ./ex4
got this error:
valgrind: mmap(0x600000, 8192) failed in UME with error 12 (Cannot allocate memory).
How to do I fix it?
I'm using Ubuntu 14.04 LTS with kernel version 4.4.0
The error which you have encountered is actually a kernel bug, which was fixed in the subsequent versions. More details here:
https://bugzilla.redhat.com/show_bug.cgi?id=1301093
To overcome the error, I would suggest you to update the kernel.
Note: I am myself using running Ubuntu 14.04 on kernel version 3.16.0-67 and it runs without any hassles.
Edit: As pointed out by the OP in comments, the bug has been fixed in kernel version 4.5.2.
I've updated my system to OS X Mavericks, just now when I tried to use hashlib module a strange Segmentation fault Raised. I've tried to rebuild the python3.3.2 and reinstall it again but it didn't help. So how could I fix this annoying problem? The out put looks like below:
ZZ:Python-3.3.2 zhangzhao$ python3
Python 3.3.2 (default, Oct 28 2013, 16:27:26)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> a = hashlib.md5()
Segmentation fault: 11
There are known problems with Python 3.3.2 and Mavericks. Please try Python 3.3.3rc1 as this may fix thes problem:
This release fully supports OS X 10.9 Mavericks. In particular, this
release fixes an issue that could cause previous versions of Python to
crash when typing in interactive mode on OS X 10.9
I had the same problem & found the answer here: python3 segmentation fault on osx mavericks
------>
This problem exists because of this bug: http://bugs.python.org/issue18458.
Basically, Python has code in Modules/readline.c that contains a workaround for a bug in libedit, however the bug in libedit was fixed and Mavericks comes with the new version of libedit and the workaround now causes ython to segfault. The quick and dirty fix is to disable deadline processing by running the following command (from the bug document):
curl -O http://bugs.python.org/file32324/patch_readline_issue_18458.sh
openssl sha1 patch_readline_issue_18458.sh
# the digest should be 7cb0ff57820a027dd4ca242eb2418930f8f46b4c
sudo sh ./patch_readline_issue_18458.sh
<------------
This same problem happens with both Python2.7.5 and python3.3.2 for OSX Mavericks 10.9. It was driving me nuts. I couldn't even assign and then invoke a simple variable without crashing the interpreter.
>>> a = 7
>>> a
Segmentation fault: 11
It is bug discussed at issue18458
The patched versions for OSX Mavericks can be found below for Python 2 and 3 respectively.
http://www.python.org/download/releases/2.7.6/
http://www.python.org/download/releases/3.3.3/