Bug 154443

Summary: Callgrind crashes on x86, is fine on ppc32
Product: [Developer tools] valgrind Reporter: Daniel Schnell <daniel.schnell>
Component: callgrindAssignee: Josef Weidendorfer <josef.weidendorfer>
Status: RESOLVED WORKSFORME    
Severity: crash CC: njn
Priority: NOR Keywords: investigated, triaged
Version First Reported In: 3.3.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Daniel Schnell 2007-12-21 16:22:40 UTC
When I run callgrind for my x86 application under Fedora Core 5 (glibc-2.4.1)
the attached crash happens. If running with the cross compiled version (same
source code) of valgrind on ppc32, the program runs fine. On ppc32 I am using
glibc-2.5.

[danielsch@vm-test osa]$ /opt/valgrind/bin/valgrind --trace-children=yes
--run-libc-freeres=no  --tool=callgrind test/testthread
==22145== Callgrind, a call-graph generating cache profiler.
==22145== Copyright (C) 2002-2007, and GNU GPL'd, by Josef Weidendorfer et al.
==22145== Using LibVEX rev 1804, a library for dynamic binary translation.
==22145== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==22145== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==22145== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==22145== For more details, rerun with: -v
==22145==
==22145== For interactive control, run 'callgrind_control -h'.
Results will be in the file testthread.xml
Testing...
Testing the create function     osa_thread_create: Invalid parameter !
osa_thread_create: Invalid parameter !
osa_thread_create: Invalid parameter !
osa_thread_create: Invalid parameter !
[  DONE  ]
==22145==
==22145== Process terminating with default action of signal 11 (SIGSEGV)
==22145==  Access not within mapped region at address 0xEA6694E8
==22145==    at 0x678A11: clone (in /lib/libc-2.4.so)
==22145==    by 0x1ED067: std::string::_M_mutate(unsigned, unsigned, unsigned)
(in /usr/lib/libstdc++.so.6.0.8)
==22145==    by 0x1ED22A: std::string::_M_replace_safe(unsigned, unsigned, char
const*, unsigned) (in /usr/lib/libstdc++.so.6.0.8)
==22145==    by 0x66: ???
==22145==
--22145-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting
--22145-- si_code=1;  Faulting address: 0x10;  sp: 0x6482B06C

valgrind: m_signals.c:1896 (sync_signalhandler): Assertion 'tid != 0' failed.
==22145==    at 0x3801B6DD: report_and_quit (m_libcassert.c:140)
==22145==    by 0xDEADBEEE: ???
==22145==    by 0xDEADBEEE: ???
==22145==    by 0xDEADBEEE: ???
==22145==    by 0xDEADBEEE: ???
==22145==    by 0xDEADBEEE: ???
==22145==    by 0xDEADBEEE: ???
==22145==    by 0x0: ???

sched status:
  running_tid=6


Note: see also the FAQ.txt in the source distribution.
It contains workarounds to several common problems.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what Linux distro you are using.  Thanks.
Comment 1 Josef Weidendorfer 2007-12-21 17:40:53 UTC
Does it work on x86 with memcheck or with tool none?
Comment 2 Daniel Schnell 2007-12-22 02:35:17 UTC
Yes it does work with memcheck.
Comment 3 Nicholas Nethercote 2009-06-26 07:10:16 UTC
Due to this bug's age, I will close it.  If it is still happening with a 
recent version of Valgrind, please reopen it.
Comment 4 Andrew Crouthamel 2018-09-19 04:37:23 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2018-11-12 16:03:27 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!