Bug 369446

Summary: valgrind crashes on unknown fcntl command
Product: [Developer tools] valgrind Reporter: Mark Wielaard <mark>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Don't crash, but warn and return EINVAL on unknown fcntl command.

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