From: Paul F. <pj...@wa...> - 2025-03-15 20:16:24
|
On 3/12/25 22:40, kiran hardas wrote: > Hi Philippe/Team, > > Thank you Philippe for your suggestions, I was able to resolve the > earlier errors by adding additional valgrind options and loading the > symbol table. > In my application, few variables and a function pointer was > uninitialised which led to previous errors mentioned in earlier email. > > Proceeding further with my earlier activity, right now i am > seeing error related to unhandled syscall no. 395 in valgrind logs. I > thought to bring this up in this mail chain for your suggestions/inputs. > > > # ./usr/test/bin/valgrind --version -v > valgrind-3.24.0-fcdaa47426-20241101 > > GNU/Linux 5.4 > Glibc 2.40 > gcc 14.2 > binutils 2.43 > > > Error snippet: > > --6423-- WARNING: unhandled x86-linux syscall: 395 > ==6423== at 0x1F757398: shmget (in /lib/libc-2.40.so > <http://libc-2.40.so>) > by 0xF597083: <application backtraces> > ... > ... > --6423-- You may be able to write your own handler. > --6423-- Read the file README_MISSING_SYSCALL_OR_IOCTL. > --6423-- Nevertheless we consider this a bug. Please report > --6423-- it at http://valgrind.org/support/bug_reports.html. > > From my analysis of valgrind code, i can see the shmget wrappers are > present in coregrind/m_syswrap area, but still it is throwing such error. > > Any pointers or suggestions would be appreciated, Thanks. > Hi That looks like shmget on x86. Can you confirm that? If so could you build valgrind with this patch diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-l inux.c index 50384817d..5c0b57789 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -1621,6 +1621,8 @@static SyscallTableEntry syscall_table[] = { GENX_(__NR_rseq, sys_ni_syscall), // 386 + LINX_(__NR_shmget, sys_shmget), // 395 + LINXY(__NR_clock_gettime64, sys_clock_gettime64), // 403 LINX_(__NR_clock_settime64, sys_clock_settime64), // 404 and let us know if it works? It's likely that you will also need shmat shmctl and shmdt as well. A+ Paul |