| Summary: | running valgrind on a gc-using application causes segfault | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jim Meyering <meyering> |
| Component: | gc | Assignee: | Rex Dieter <rdieter> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | rdieter, sochotni |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-01-31 20:41:49 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
FYI, guile developers would find this useful, too: http://lists.gnu.org/archive/html/guile-devel/2010-11/msg00037.html If valgrind is segfaulting, what makes you suspect gc is to blame here? The link above gives some justification. In particular, follow it's link to this thread: http://comments.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/3788 Thanks, found it just now. :) So, do you have any concrete suggestions yet on how to address this? Consider building gc with -DUSE_GET_STACKBASE_FOR_MAIN or other? Yes, that seems like the way to go. As mentioned in "additional info" above, I've been doing that, and so far it's worked great. I'm wondering if I should also try to grab a fresh snapshot too... hmm... maybe not too fresh. I've just tried the latest from cvs with iwhd, and am now encountering a new memory-exhausted error when running valgrind-wrapped iwhd through "make check". Haven't tracked it down yet. Oh fun. will wait on that then. I'm going to go ahead and import the newish 7.2alpha6 into rawhide and build with the aforementioned -DUSE_GET_STACKBASE_FOR_MAIN option. Thanks. I'll be happy to try it out, if I can get past problems with other iwhd prerequisites. ping, the -DUSE_GET_STACKBASE_FOR_MAIN enabled build made it into f16, is there still any interest in pursuing this further with a newer snapshot or otherwise? Hi Rex, Thanks for the follow-up. I've just confirmed that valgrind on gc-using iwhd now works fine in rawhide, so you're welcome to close this. I saw a hint on the gc mailing list that it's time for a new alpha release, or even a beta. Who knows. Cool, thanks. |
Description of problem: running valgrind on any gc-using program results in a segmentation fault Version-Release number of selected component (if applicable): gc-7.2-0.1.alpha4.fc13.x86_64 How reproducible: always Steps to Reproduce: 1. printf '%s\n' \ '#define GC_THREADS' \ '#include "gc.h"' \ 'int main () { GC_INIT (); return 0; }' > k.c 2. gcc -Wall k.c -lgc && valgrind --log-file=x ./a.out Actual results: zsh: segmentation fault (core dumped) valgrind --log-file=x ./a.out Expected results: it exits with status == 0 Additional info: Currently, I work around this by building my own version of libgc, which is compiled with CPPFLAGS=-DUSE_GET_STACKBASE_FOR_MAIN. If I link an application with *that* libgc.a, then I can use valgrind on it, as usual: no segfault. I've mentioned F14 above, but this also affects F15 and rawhide.