|
From: <sv...@va...> - 2016-10-01 11:54:59
|
Author: mjw
Date: Sat Oct 1 12:54:52 2016
New Revision: 15998
Log:
Don't crash, but warn and return EINVAL on unknown fcntl command.
Bug #369446
LTP: testcases/kernel/syscalls/fcntl/fcntl13
Modified:
trunk/NEWS
trunk/coregrind/m_syswrap/syswrap-linux.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Sat Oct 1 12:54:52 2016
@@ -188,6 +188,7 @@
369383 x86 sys_modify_ldt wrapper crashes on bad ptr
369402 Bad set/get_thread_area pointer crashes valgrind
369441 bad lvec argument crashes process_vm_readv/writev syscall wrappers
+369446 valgrind crashes on unknown fcntl command
n-i-bz Fix incorrect (or infinite loop) unwind on RHEL7 x86 and amd64
n-i-bz massif --pages-as-heap=yes does not report peak caused by mmap+munmap
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-linux.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c Sat Oct 1 12:54:52 2016
@@ -5487,7 +5487,8 @@
default:
PRINT("sys_fcntl[UNKNOWN] ( %lu, %lu, %lu )", ARG1, ARG2, ARG3);
- I_die_here;
+ VG_(umsg)("Warning: unimplemented fcntl command: %lu\n", ARG2);
+ SET_STATUS_Failure( VKI_EINVAL );
break;
}
|