Bug 267342

Summary: segmentation fault on Mac OS 10.6
Product: [Developer tools] valgrind Reporter: mldgodard
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED DUPLICATE    
Severity: crash CC: catrijn
Priority: NOR    
Version: 3.6.0   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: macOS   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description mldgodard 2011-02-28 22:28:40 UTC
Version:           3.6.0
OS:                OS X

I install valgrind-3.6.1 from tar ball. I run ./configure with option --prefix /Application/valgrind-3.6.1, then run command make and last run command "make install". So far so good. When I run valgrind (for instance "valgrind ls -l", I get a segmentation fault.

I tried also to run valgrind with option "-d -v" to get more info:


bash-3.2$ pwd
/Applications/valgrind-3.6.1/bin
bash-3.2$ ll
total 400
-rwxr-xr-x  1 mldgodard  admin  40851 28 fév 21:49 callgrind_annotate
-rwxr-xr-x  1 mldgodard  admin  13662 28 fév 21:49 callgrind_control
-rwxr-xr-x  1 mldgodard  admin  32169 28 fév 21:49 cg_annotate
-rwxr-xr-x  1 mldgodard  admin  10039 28 fév 21:49 cg_diff
-rwxr-xr-x  1 mldgodard  admin  26756 28 fév 21:49 cg_merge
-rwxr-xr-x  1 mldgodard  admin  24211 28 fév 21:49 ms_print
-rwxr-xr-x  1 mldgodard  admin   8868 28 fév 21:49 no_op_client_for_valgrind
-rwxr-xr-x  1 mldgodard  admin  20132 28 fév 21:49 valgrind
-rwxr-xr-x  1 mldgodard  admin  14552 28 fév 21:49 valgrind-listener
bash-3.2$ ./valgrind -d -v ls -l
--85330:1:debuglog DebugLog system started by Stage 1, level 1 logging requested
--85330:1:launcher no tool requested, defaulting to 'memcheck'
--85330:1:launcher valgrind_lib = /Applications/valgrind-3.6.1/lib/valgrind
--85330:1:launcher arch 'x86' IS installed
--85330:1:launcher arch 'amd64' IS installed
--85330:1:launcher arch 'arm' IS NOT installed
--85330:1:launcher arch 'ppc32' IS NOT installed
--85330:1:launcher arch 'ppc64' IS NOT installed
--85330:1:launcher selected arch 'amd64'
--85330:1:launcher launcher_name = /Applications/valgrind-3.6.1/bin/./valgrind
--85330:1:launcher launching /Applications/valgrind-3.6.1/lib/valgrind/memcheck-amd64-darwin
Segmentation fault


Reproducible: Didn't try
Comment 1 mldgodard 2011-02-28 22:30:04 UTC
I forgot to say I am running valgrind on Mac OS Snow Leopard:

bash-3.2$ uname -a
Darwin iMac-de-Daniel-Godard.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386
Comment 2 catrijn 2011-03-07 19:10:18 UTC
I am also experiencing this crash, even for --tool=none.

Building from tarball 3.6.1
./configure --prefix=/Users/catrijn/Installs
make
make install

hg-01781961-dm6:valgrind-3.6.1 catrijn$ valgrind -d -v --tool=none ls
--15415:1:debuglog DebugLog system started by Stage 1, level 1 logging requested
--15415:1:launcher tool 'none' requested
--15415:1:launcher valgrind_lib = /Users/catrijn/Installs/lib/valgrind
--15415:1:launcher arch 'x86' IS installed
--15415:1:launcher arch 'amd64' IS installed
--15415:1:launcher arch 'arm' IS NOT installed
--15415:1:launcher arch 'ppc32' IS NOT installed
--15415:1:launcher arch 'ppc64' IS NOT installed
--15415:1:launcher selected arch 'amd64'
--15415:1:launcher launcher_name = /Users/catrijn/Installs/bin/valgrind
--15415:1:launcher launching /Users/catrijn/Installs/lib/valgrind/none-amd64-darwin
Segmentation fault

Adding --enable-only32bit produces working valgrind (at least against ls, cat, etc.), but doesn't help with 64-bit programs.

My system:
Darwin hg-01781961-dm6.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:11:58 PST 2010; root:xnu-1504.9.26~3/RELEASE_X86_64 x86_64
Comment 3 mldgodard 2011-04-22 09:26:20 UTC
Any news?

FYI, installing valgrind using MacPorts lead to the same behavior. I am using a iMac with a Core i3.

bash-3.2$ sudo port install valgrind
Password:
--->  Computing dependencies for valgrind
--->  Fetching valgrind
--->  Attempting to fetch valgrind-3.6.1.tar.bz2 from http://lil.fr.distfiles.macports.org/valgrind
--->  Verifying checksum(s) for valgrind
--->  Extracting valgrind
--->  Configuring valgrind
--->  Building valgrind
--->  Staging valgrind into destroot
--->  Installing valgrind @3.6.1_0
--->  Activating valgrind @3.6.1_0
--->  Cleaning valgrind

bash-3.2$ which valgrind
/opt/local/bin/valgrind

bash-3.2$ valgrind -d -v ls
--24009:1:debuglog DebugLog system started by Stage 1, level 1 logging requested
--24009:1:launcher no tool requested, defaulting to 'memcheck'
--24009:1:launcher valgrind_lib = /opt/local/lib/valgrind
--24009:1:launcher arch 'x86' IS NOT installed
--24009:1:launcher arch 'amd64' IS installed
--24009:1:launcher arch 'arm' IS NOT installed
--24009:1:launcher arch 'ppc32' IS NOT installed
--24009:1:launcher arch 'ppc64' IS NOT installed
--24009:1:launcher selected arch 'amd64'
--24009:1:launcher launcher_name = /opt/local/bin/valgrind
--24009:1:launcher launching /opt/local/lib/valgrind/memcheck-amd64-darwin
Segmentation fault
Comment 4 Julian Seward 2011-04-22 09:37:53 UTC
This is fixed in the trunk now.

*** This bug has been marked as a duplicate of bug 267997 ***