Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#40286 closed defect (worksforme)

valgrind @3.8.1_1: prohibits use of --tool=massif

Reported by: barto@… Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc:
Port: valgrind

Description (last modified by larryv (Lawrence Velázquez))

straight up port install of valgrind:

--->  Fetching distfiles for valgrind
--->  Verifying checksums for valgrind
--->  Extracting valgrind
--->  Applying patches to valgrind
--->  Configuring valgrind
--->  Building valgrind
--->  Staging valgrind into destroot
--->  Installing valgrind @3.8.1_1
--->  Activating valgrind @3.8.1_1
--->  Cleaning valgrind
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.
522_ valgrind --tool=massif ./ui3 -j
valgrind: Bad option: --gen-suppressions=yes
valgrind: Can't use --gen-suppressions= with Massif
valgrind: because it doesn't generate errors.
valgrind: Use --help for more information or consult the user manual.

Using the standard tool shows the 'normal' output.

525_ valgrind --tool=memcheck ./ui3 -j
==90467== Memcheck, a memory error detector
==90467== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==90467== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==90467== Command: ./ui3 -j
==90467== 
==90467== WARNING: Support on MacOS 10.8 is experimental and mostly broken.

Change History (6)

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Description: modified (diff)
Keywords: valgrind removed
Owner: changed from macports-tickets@… to raimue@…
Port: valgrind added
Summary: Valgrind prohibits use of --tool=massifvalgrind @3.8.1_1: prohibits use of --tool=massif

Thanks for the ticket. In the future, please Cc relevant port maintainers (port info --maintainers).

comment:2 Changed 11 years ago by raimue (Rainer Müller)

Resolution: worksforme
Status: newclosed

I can't reproduce this issue. Running a command such as valgrind --tool=massif ./foo works fine for me.

From your output in the report it looks to me like the original command being run additonally has the --gen-suppressions=yes parameter. That would only be valid with --tool=memcheck. Do you have any aliases for valgrind in your shell? Please try again using the absolute path /opt/local/bin/valgrind instead.

comment:3 Changed 11 years ago by barto@…

501_ sudo port install valgrind
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
Password:
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
--->  Computing dependencies for valgrind
--->  Fetching archive for valgrind
--->  Attempting to fetch valgrind-3.8.1_1.darwin_12.x86_64.tbz2 from http://packages.macports.org/valgrind
--->  Attempting to fetch valgrind-3.8.1_1.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/valgrind
--->  Attempting to fetch valgrind-3.8.1_1.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/valgrind
--->  Fetching distfiles for valgrind
--->  Verifying checksums for valgrind
--->  Extracting valgrind
--->  Applying patches to valgrind
--->  Configuring valgrind
--->  Building valgrind
--->  Staging valgrind into destroot
--->  Installing valgrind @3.8.1_1
--->  Activating valgrind @3.8.1_1
--->  Cleaning valgrind
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.
502_ which valgrind
/opt/local/bin//valgrind
503_ valgrind --version
valgrind-3.8.1
504_ ls /opt/local/bin/valgrind
48 -rwxr-xr-x  1 root  admin  24164 Sep  4 12:19 /opt/local/bin/valgrind
505_ valgrind --tool=massif true
valgrind: Bad option: --gen-suppressions=yes
valgrind: Can't use --gen-suppressions= with Massif
valgrind: because it doesn't generate errors.
valgrind: Use --help for more information or consult the user manual.
506_ /opt/local/bin/valgrind --tool=massif true
valgrind: Bad option: --gen-suppressions=yes
valgrind: Can't use --gen-suppressions= with Massif
valgrind: because it doesn't generate errors.
valgrind: Use --help for more information or consult the user manual.
507_ 
Last edited 11 years ago by raimue (Rainer Müller) (previous) (diff)

comment:4 Changed 11 years ago by raimue (Rainer Müller)

Please remember to use WikiFormatting.

Thanks for the extended log showing the problem. As said, I can't reproduce this in the same way:

$ port -q installed valgrind
  valgrind @3.8.1_1 (active)
$ /opt/local/bin/valgrind --tool=massif true
==17438== Massif, a heap profiler
==17438== Copyright (C) 2003-2012, and GNU GPL'd, by Nicholas Nethercote
==17438== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==17438== Command: true
==17438==
==17438== WARNING: Support on MacOS 10.8 is experimental and mostly broken.
==17438== WARNING: Expect incorrect results, assertions and crashes.
==17438== WARNING: In particular, Memcheck on 32-bit programs will fail to
==17438== WARNING: detect any errors associated with heap-allocated data.
==17438==
==17438==

However, I get the same message if I add the option mentioned in your output. That is why I assumed you had an alias which included this.

$ /opt/local/bin/valgrind --gen-suppressions=yes --tool=massif true
valgrind: Bad option: --gen-suppressions=yes
valgrind: Can't use --gen-suppressions= with Massif
valgrind: because it doesn't generate errors.
valgrind: Use --help for more information or consult the user manual.

Running with the full path should have avoided any aliases, so I am still not sure why you see this on your system.

comment:5 Changed 11 years ago by neverpanic (Clemens Lang)

Do you happen to have a ~/.valgrindrc? Are there any options in the $VALGRIND_OPTS env variable?

comment:6 Changed 11 years ago by barto@…

Somehow I've got a .valgrindrc that has a --gen-suppressions=all in it.

I've deleted it and everything is fine.

I don't know where the file came from.

Note: See TracTickets for help on using tickets.