Package: valgrind
Version: 1:3.8.1-1
Severity: normal
I believe we should not distribute SGCheck on PPC, ARM or S390X. As per
documentation:
...
Platforms: the stack/global checks won't work properly on PowerPC, ARM or S390X
platforms, only on X86 and AMD64 targets. That's because the stack and global
checking requires tracking function calls and exits reliably, and there's no
obvious way to do it on ABIs that use a link register for function returns.
...
See also attached file for log and way to reproduce:
$ gcc -o bla bla.c
Thanks
-- System Information:
Debian Release: 6.0.6
APT prefers stable
APT policy: (500, 'stable')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.32-5-powerpc
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages valgrind depends on:
ii libc6 2.11.3-4 Embedded GNU C Library: Shared lib
ii libc6-dbg 2.11.3-4 Embedded GNU C Library: detached d
Versions of packages valgrind recommends:
ii gdb 7.0.1-2+b1 The GNU Debugger
ii valgrind-dbg 1:3.8.1-1 instrumentation framework for buil
Versions of packages valgrind suggests:
pn alleyoop <none> (no description available)
pn kcachegrind <none> (no description available)
pn valgrind-mpi <none> (no description available)
pn valkyrie <none> (no description available)
-- no debconf information
int main()
{ int i, a[10]; // both are auto vars
for (i = 0; i <= 10; i++)
a[i] = 42;
return 0;
}
$ valgrind --tool=exp-sgcheck ./bla
==18679== exp-sgcheck, a stack and global array overrun detector
==18679== NOTE: This is an Experimental-Class Valgrind Tool
==18679== Copyright (C) 2003-2012, and GNU GPL'd, by OpenWorks Ltd et al.
==18679== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==18679== Command: ./bla
==18679==
exp-sgcheck: sg_main.c:2324 (sg_instrument_IRStmt): the 'impossible' happened.
==18679== at 0x3800F358: report_and_quit (m_libcassert.c:235)
==18679== by 0x3800F5C7: vgPlain_assert_fail (m_libcassert.c:309)
==18679== by 0x38006A8B: sg_instrument_IRStmt (sg_main.c:2324)
==18679== by 0x38001297: h_instrument (h_main.c:682)
==18679== by 0x380306DB: tool_instrument_then_gdbserver_if_needed
(m_translate.c:226)
==18679== by 0x380D1DF7: LibVEX_Translate (main_main.c:679)
==18679== by 0x3802DC4B: vgPlain_translate (m_translate.c:1559)
==18679== by 0x3806872F: handle_chain_me (scheduler.c:1019)
==18679== by 0x3806A85F: vgPlain_scheduler (scheduler.c:1317)
==18679== by 0x3809FC0F: run_a_thread_NORETURN (syswrap-linux.c:103)
sched status:
running_tid=1
Thread 1: status = VgTs_Runnable
==18679== at 0xFE61BA0: __new_exitfn (cxa_atexit.c:73)
==18679== by 0xFE61DEF: __internal_atexit (cxa_atexit.c:35)
==18679== by 0xFE4285F: (below main) (libc-start.c:105)
Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.
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 OS and version you are using. Thanks.