Bug 369446 - valgrind crashes on unknown fcntl command
Summary: valgrind crashes on unknown fcntl command
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-27 21:05 UTC by Mark Wielaard
Modified: 2016-10-01 11:55 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Don't crash, but warn and return EINVAL on unknown fcntl command. (866 bytes, patch)
2016-09-27 21:08 UTC, Mark Wielaard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2016-09-27 21:05:57 UTC
When encountering an unknown fcntl command valgrind crashes with an assertion message: valgrind: m_syswrap/syswrap-linux.c:5490 (vgSysWrap_linux_sys_fcntl_before): Assertion 'Unimplemented functionality' failed.

Valgrind should just warn the user the fcntl command is unimplemented and return EINVAL like the kernel would.

LTP testcases/kernel/syscalls/fcntl/fcntl13

Reproducible: Always
Comment 1 Mark Wielaard 2016-09-27 21:08:22 UTC
Created attachment 101322 [details]
Don't crash, but warn and return EINVAL on unknown fcntl command.
Comment 2 Mark Wielaard 2016-10-01 11:55:35 UTC
valgrind svn r15998