Bug 269641

Summary: valgrind segfaults immediately (segmentation fault)
Product: [Developer tools] valgrind Reporter: Pete Stevenson <jpeter>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED DUPLICATE    
Severity: crash CC: mike
Priority: NOR    
Version: 3.6.0   
Target Milestone: ---   
Platform: MacPorts   
OS: macOS   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Pete Stevenson 2011-03-28 22:21:22 UTC
Version:           3.6.0
OS:                OS X

valgrind segfaults immediately on start.  This does not have to do with my program under test.  Using either:
1) valgrind --leak-check=yes myprog myargs
2) valgrind
Produces:
"Segmentation fault"
and nothing else.

Reproducible: Always

Steps to Reproduce:
1. Get a Mac w/ 64 bit kernel (I have 8GB RAM so it's certainly a 64 bit kernel)
2. Install using valgrind using "sudo port install valgrind"
3. Attempt to run valgrind in any way
4. segfault ensues



Results of "uname -a"
Darwin Pete-Stevensons-MacBook-Pro.local 10.7.1 Darwin Kernel Version 10.7.1: Mon Jan 31 14:55:53 PST 2011; root:xnu-1504.10.48~4/RELEASE_X86_64 x86_64
Comment 1 Mike McQuaid 2011-03-29 09:49:02 UTC
It's not certainly a 64-bit kernel. Looks like a dupe of http://bugs.kde.org/show_bug.cgi?id=267997, can you reproduce the same output with the same flags?
Comment 2 Julian Seward 2011-03-29 10:14:24 UTC
Are you using XCode 4.0.x to build Valgrind?
Comment 3 Mike McQuaid 2011-03-29 10:17:26 UTC
I can reproduce this problem using Xcode 4 (outside of Macports).
Comment 4 Julian Seward 2011-03-29 11:46:32 UTC
Reason I ask is, this is not the first time I've heard of this.
My working theory is that is segfaults when built by Xcode 4
but not Xcode 3.  However, I don't have a copy of 4, so it would
be good if someone who does, can verify this theory.
Comment 5 Mike McQuaid 2011-03-29 11:48:49 UTC
I've just uninstalled Xcode 4, installed Xcode 3 and it compiles and works fine. It's definitely that, even when you force it to use GCC rather than LLVM. If you have an OSX box then I'll Paypal you the cost of Xcode 4 if you want?
Comment 6 Pete Stevenson 2011-03-29 18:42:18 UTC
I will confirm that I am using Xcode 4.
Comment 7 Julian Seward 2011-03-31 10:40:06 UTC
I can reproduce this with xcode 4.0.1.  Investigating.
Comment 8 Julian Seward 2011-03-31 13:53:22 UTC

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