[LTP] [Valgrind-developers] Suggested fix for the mremap03 syscall testcase

Petr Vorel pvorel@suse.cz
Thu Oct 15 10:38:51 CEST 2026


Hi Martin, Andrea, 

> Hi Martin,

> you are right. That’s a bug we didn’t spot during the test rewrite. Thanks.

Good catch, Martin, you're of course right => turned into proper patch and
merged.

valgrind ./mremap03
tst_test.c:1895: TINFO: Overall timeout per run is 0h 00m 30s
--292799-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting
--292799-- si_code=1;  Faulting address: 0x8;  sp: 0x1002ef2cc0

valgrind: the 'impossible' happened:
   Killed by fatal signal

host stacktrace:
==292799==    at 0x580AE3D3: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==292799==    by 0x580A7ED9: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==292799==    by 0x580A387A: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==292799==    by 0x580A58A6: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)
==292799==    by 0x58115088: ??? (in /usr/libexec/valgrind/memcheck-amd64-linux)

BTW testcase after fix still fails, but that's I suppose just expected valgrind
behavior on mmap(PROT_NONE), right?

valgrind ./mremap03
==292941== Memcheck, a memory error detector
==292941== Copyright (C) 2002-2026, and GNU GPL'd, by Julian Seward et al.
==292941== Using Valgrind-3.27.1 and LibVEX; rerun with -h for copyright info
==292941== Command: ./mremap03
==292941==
tst_test.c:2061: TINFO: LTP version: 20260930-20-gd494a8e1c9
...
tst_test.c:1895: TINFO: Overall timeout per run is 0h 00m 30s
mremap03.c:42: TFAIL: mremap(bad_addr, memsize, newsize, MREMAP_MAYMOVE) expected EFAULT: EINVAL (22)

Kind regards,
Petr


More information about the ltp mailing list