https://bugs.kde.org/show_bug.cgi?id=480706
Bug ID: 480706 Summary: Unhandled syscall 325 (mlock2) Classification: Developer tools Product: valgrind Version: 3.18.1 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: jsew...@acm.org Reporter: martin.i.olive...@gmail.com Target Milestone: --- SUMMARY Valgrind reports unhandled syscall 325 (mlock2), which is used internally by OpenSSL STEPS TO REPRODUCE Sample program. Compile with "gcc a.c -lcrypto" #include <openssl/crypto.h> int main() { CRYPTO_secure_malloc_init(1<<20, 8); CRYPTO_secure_malloc_done(); return 0; } OBSERVED RESULT ==3390928== Memcheck, a memory error detector ==3390928== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==3390928== Using Valgrind-3.18.1-42b08ed5bd-20211015 and LibVEX; rerun with -h for copyright info ==3390928== Command: ./a.out ==3390928== --3390928-- Valgrind options: --3390928-- -v --3390928-- Contents of /proc/version: --3390928-- Linux version 5.15.0-91-generic (buildd@lcy02-amd64-045) (gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 --3390928-- --3390928-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed --3390928-- Page sizes: currently 4096, max supported 4096 --3390928-- Valgrind library directory: /usr/libexec/valgrind --3390928-- Reading syms from /tmp/a.out --3390928-- Reading syms from /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --3390928-- Considering /usr/lib/debug/.build-id/15/921ea631d9f36502d20459c43e5c85b7d6ab76.debug .. --3390928-- .. build-id is valid --3390928-- Reading syms from /usr/libexec/valgrind/memcheck-amd64-linux --3390928-- object doesn't have a symbol table --3390928-- object doesn't have a dynamic symbol table --3390928-- Scheduler: using generic scheduler lock implementation. --3390928-- Reading suppressions file: /usr/libexec/valgrind/default.supp ==3390928== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-3390928-by-martin.oliveira-on-zeta ==3390928== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-3390928-by-martin.oliveira-on-zeta ==3390928== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-3390928-by-martin.oliveira-on-zeta ==3390928== ==3390928== TO CONTROL THIS PROCESS USING vgdb (which you probably ==3390928== don't want to do, unless you know exactly what you're doing, ==3390928== or are doing some strange experiment): ==3390928== /usr/bin/vgdb --pid=3390928 ...command... ==3390928== ==3390928== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==3390928== /path/to/gdb ./a.out ==3390928== and then give GDB the following command ==3390928== target remote | /usr/bin/vgdb --pid=3390928 ==3390928== --pid is optional if only one valgrind process is running ==3390928== --3390928-- REDIR: 0x402aa40 (ld-linux-x86-64.so.2:strlen) redirected to 0x580bcec2 (???) --3390928-- REDIR: 0x402a810 (ld-linux-x86-64.so.2:index) redirected to 0x580bcedc (???) --3390928-- Reading syms from /usr/libexec/valgrind/vgpreload_core-amd64-linux.so --3390928-- object doesn't have a symbol table --3390928-- Reading syms from /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so --3390928-- object doesn't have a symbol table ==3390928== WARNING: new redirection conflicts with existing -- ignoring it --3390928-- old: 0x0402aa40 (strlen ) R-> (0000.0) 0x580bcec2 ??? --3390928-- new: 0x0402aa40 (strlen ) R-> (2007.0) 0x0484ee30 strlen --3390928-- REDIR: 0x4027220 (ld-linux-x86-64.so.2:strcmp) redirected to 0x484fcd0 (strcmp) --3390928-- REDIR: 0x402afa0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4853840 (mempcpy) --3390928-- Reading syms from /usr/lib/x86_64-linux-gnu/libcrypto.so.3 --3390928-- object doesn't have a symbol table --3390928-- Reading syms from /usr/lib/x86_64-linux-gnu/libc.so.6 --3390928-- Considering /usr/lib/debug/.build-id/c2/89da5071a3399de893d2af81d6a30c62646e1e.debug .. --3390928-- .. build-id is valid ==3390928== WARNING: new redirection conflicts with existing -- ignoring it --3390928-- old: 0x04d5bc60 (memalign ) R-> (1011.0) 0x0484e080 memalign --3390928-- new: 0x04d5bc60 (memalign ) R-> (1017.0) 0x0484e050 aligned_alloc ==3390928== WARNING: new redirection conflicts with existing -- ignoring it --3390928-- old: 0x04d5bc60 (memalign ) R-> (1011.0) 0x0484e080 memalign --3390928-- new: 0x04d5bc60 (memalign ) R-> (1017.0) 0x0484e020 aligned_alloc ==3390928== WARNING: new redirection conflicts with existing -- ignoring it --3390928-- old: 0x04d5bc60 (memalign ) R-> (1011.0) 0x0484e080 memalign --3390928-- new: 0x04d5bc60 (memalign ) R-> (1017.0) 0x0484e050 aligned_alloc ==3390928== WARNING: new redirection conflicts with existing -- ignoring it --3390928-- old: 0x04d5bc60 (memalign ) R-> (1011.0) 0x0484e080 memalign --3390928-- new: 0x04d5bc60 (memalign ) R-> (1017.0) 0x0484e020 aligned_alloc --3390928-- REDIR: 0x4d5e720 (libc.so.6:strnlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5e9e0 (libc.so.6:strpbrk) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5e2e0 (libc.so.6:strcmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d7ccd0 (libc.so.6:wcsnlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5f6d0 (libc.so.6:memset) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d7b540 (libc.so.6:wcslen) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5fc10 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d7b370 (libc.so.6:wcschr) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5e260 (libc.so.6:index) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5e960 (libc.so.6:rindex) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5f5a0 (libc.so.6:memmove) redirected to 0x483f220 (_vgnU_ifunc_wrapper) ==3390928== Preferring higher priority redirection: --3390928-- old: 0x04e567c0 (__memcpy_avx_unalign) R-> (2018.0) 0x04850f90 __memcpy_avx_unaligned_erms --3390928-- new: 0x04e567c0 (__memcpy_avx_unalign) R-> (2018.1) 0x04852880 memmove --3390928-- REDIR: 0x4d7b3f0 (libc.so.6:wcscmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5f9e0 (libc.so.6:stpncpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d7b9b0 (libc.so.6:wmemchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5e830 (libc.so.6:strncmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5fa70 (libc.so.6:strcasecmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5e420 (libc.so.6:strcspn) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d7b470 (libc.so.6:wcscpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5e1d0 (libc.so.6:strcat) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5fb60 (libc.so.6:strncasecmp_l) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5f480 (libc.so.6:bcmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d67570 (libc.so.6:memrchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d61010 (libc.so.6:strchrnul) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5e390 (libc.so.6:strcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5fb10 (libc.so.6:strcasecmp_l) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5e6a0 (libc.so.6:strlen) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5e8d0 (libc.so.6:strncpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5f950 (libc.so.6:stpcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5f3f0 (libc.so.6:memchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5eb00 (libc.so.6:strspn) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5f7d0 (libc.so.6:mempcpy) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5fac0 (libc.so.6:strncasecmp) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d60f80 (libc.so.6:rawmemchr) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4dea280 (libc.so.6:__memcpy_chk) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4d5f310 (libc.so.6:strstr) redirected to 0x483f220 (_vgnU_ifunc_wrapper) --3390928-- REDIR: 0x4e53610 (libc.so.6:__strrchr_avx2) redirected to 0x484e810 (rindex) --3390928-- REDIR: 0x4e537e0 (libc.so.6:__strlen_avx2) redirected to 0x484ed10 (strlen) --3390928-- REDIR: 0x4d5b0a0 (libc.so.6:malloc) redirected to 0x4848820 (malloc) --3390928-- REDIR: 0x4e56f80 (libc.so.6:__memset_avx2_unaligned_erms) redirected to 0x4852770 (memset) --3390928-- WARNING: unhandled amd64-linux syscall: 325 ==3390928== at 0x4DD488D: syscall (syscall.S:38) ==3390928== by 0x4A30957: CRYPTO_secure_malloc_init (in /usr/lib/x86_64-linux-gnu/libcrypto.so.3) ==3390928== by 0x10917F: main (in /tmp/a.out) --3390928-- You may be able to write your own handler. --3390928-- Read the file README_MISSING_SYSCALL_OR_IOCTL. --3390928-- Nevertheless we consider this a bug. Please report --3390928-- it at http://valgrind.org/support/bug_reports.html. --3390928-- REDIR: 0x4d5b3e0 (libc.so.6:free) redirected to 0x484b210 (free) ==3390928== ==3390928== HEAP SUMMARY: ==3390928== in use at exit: 0 bytes in 0 blocks ==3390928== total heap usage: 4 allocs, 4 frees, 32,960 bytes allocated ==3390928== ==3390928== All heap blocks were freed -- no leaks are possible ==3390928== ==3390928== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) SOFTWARE/OS VERSIONS Linux Ubuntu 22.04: Linux nike 5.15.0-92-generic #102-Ubuntu SMP Wed Jan 10 09:33:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux -- You are receiving this mail because: You are watching all bug changes.