Bug 186507 - exp-ptrcheck unhandled syscalls prctl, etc.
Summary: exp-ptrcheck unhandled syscalls prctl, etc.
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: sgcheck (show other bugs)
Version: 3.4.1
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: wanted3.5.0
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-08 02:35 UTC by Mark Harris
Modified: 2012-08-10 14:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
fix (1.97 KB, patch)
2009-03-08 02:35 UTC, Mark Harris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Harris 2009-03-08 02:35:06 UTC
Created attachment 31889 [details]
fix

Using valgrind 3.4.1 exp-ptrcheck on Red Hat Linux Enterprise Edition 4 & 5, many programs cause valgrind to panic due to unhandled syscalls.  I have run into this with the syscalls fstatfs64, getgroups32, getresgid32, personality, prctl, rt_sigsuspend, and vfork.

Since none of these syscalls return pointers, I added them to h_main.c using ADD(0, __NR_*) and that seemed to fix it.

Example panic:
sysno == 157

exp-ptrcheck: the 'impossible' happened:
   unhandled syscall
==5509==    at 0x380107DC: report_and_quit (m_libcassert.c:140)
==5509==    by 0x380108F4: panic (m_libcassert.c:215)
==5509==    by 0x38010939: vgPlain_tool_panic (m_libcassert.c:230)
==5509==    by 0x3800388D: h_post_syscall (h_main.c:2504)
==5509==    by 0x38035BBA: vgPlain_post_syscall (syswrap-main.c:1178)
==5509==    by 0x380365EF: vgPlain_client_syscall (syswrap-main.c:1090)
==5509==    by 0x380342CD: vgPlain_scheduler (scheduler.c:824)
==5509==    by 0x3804641E: run_a_thread_NORETURN (syswrap-linux.c:89)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable
==5509==    at 0x31402D21AA: prctl (in /lib64/libc-2.5.so)
==5509==    by 0x406EB5: (within /usr/bin/kdeinit)
==5509==    by 0x408821: (within /usr/bin/kdeinit)
==5509==    by 0x314021D8B3: (below main) (in /lib64/libc-2.5.so)


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 site_kde 2009-04-10 23:11:26 UTC
I'm seeing similar things on Ubuntu 8.04.1 (x86 32-bit).

I also needed:

__NR_getpriority
__NR_setpriority
__NR_rt_sigtimedwait
Comment 2 Tom Hughes 2009-07-15 18:05:21 UTC
Fixed in r10479.