https://bugs.kde.org/show_bug.cgi?id=526974

            Bug ID: 526974
           Summary: mremap03 started crashing valgrind after recent LTP
                    update
    Classification: Developer tools
           Product: valgrind
      Version First 3.27 GIT
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: memcheck
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

After the recent LTP update (Bug526840) mremap03 started crashing valgrind. 
Before the update th behavior was:

$ valgrind --version
valgrind-3.28.0.GIT
$ valgrind ./ltp-full-20260529/testcases/kernel/syscalls/mremap/mremap03
==1818666== Memcheck, a memory error detector
==1818666== Copyright (C) 2002-2026, and GNU GPL'd, by Julian Seward et al.
==1818666== Using Valgrind-3.28.0.GIT and LibVEX; rerun with -h for copyright
info
==1818666== Command:
./ltp-full-20260529/testcases/kernel/syscalls/mremap/mremap03
==1818666== 
mremap03    1  TFAIL  :  mremap03.c:135: mremap() Fails, 'Unexpected errno 22
==1818666== 
==1818666== HEAP SUMMARY:
==1818666==     in use at exit: 0 bytes in 0 blocks
==1818666==   total heap usage: 2 allocs, 2 frees, 1,030 bytes allocated
==1818666== 
==1818666== All heap blocks were freed -- no leaks are possible
==1818666== 
==1818666== For lists of detected and suppressed errors, rerun with: -s
==1818666== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
$


After the update there's a regression:


$ valgrind --version
valgrind-3.28.0.GIT
$ valgrind ./ltp-full-20260930/testcases/kernel/syscalls/mremap/mremap03
==1819656== Memcheck, a memory error detector
==1819656== Copyright (C) 2002-2026, and GNU GPL'd, by Julian Seward et al.
==1819656== Using Valgrind-3.28.0.GIT and LibVEX; rerun with -h for copyright
info
==1819656== Command:
./ltp-full-20260930/testcases/kernel/syscalls/mremap/mremap03
==1819656== 
tst_test.c:2067: TINFO: LTP version: 20260930
tst_test.c:2070: TINFO: Tested kernel: 7.2.7-200.fc44.x86_64 #1 SMP
PREEMPT_DYNAMIC Mon Sep 21 18:25:57 UTC 2026 x86_64
tst_kconfig.c:73: TINFO: Couldn't locate kernel config!
tst_test.c:1895: TINFO: Overall timeout per run is 0h 00m 30s
--1819658-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) -
exiting
--1819658-- si_code=1;  Faulting address: 0x8;  sp: 0x1002eeace0

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

host stacktrace:
==1819658==    at 0x580A978B: do_mremap (syswrap-generic.c:347)
==1819658==    by 0x580A978B: vgSysWrap_generic_sys_mremap_before
(syswrap-generic.c:3167)
==1819658==    by 0x580A359A: vgPlain_client_syscall (syswrap-main.c:2400)
==1819658==    by 0x5809F2EE: handle_syscall (scheduler.c:1214)
==1819658==    by 0x580A1226: vgPlain_scheduler (scheduler.c:1588)
==1819658==    by 0x5810EF6E: thread_wrapper (syswrap-linux.c:102)
==1819658==    by 0x5810EF6E: run_a_thread_NORETURN (syswrap-linux.c:154)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable syscall 25 (lwpid 1819658)
==1819658==    at 0x495FB66: mremap (mremap.c:49)
==1819658==    by 0x40140B: run (mremap03.c:43)
==1819658==    by 0x40BB27: run_tests (tst_test.c:1722)
==1819658==    by 0x40BB27: testrun (tst_test.c:1804)
==1819658==    by 0x40BB27: fork_testrun (tst_test.c:1944)
==1819658==    by 0x40DE3C: tst_run_tcases (tst_test.c:2087)
==1819658==    by 0x4012DD: main (tst_test.h:837)
client stack range: [0x1FFEFFD000 0x1FFF000FFF] client SP: 0x1FFEFFFA60
valgrind stack range: [0x1002DEB000 0x1002EEAFFF] top usage: 17864 of 1048576


Note: see also the FAQ in the source distribution.
It contains workarounds to several common problems.
In particular, if Valgrind aborted or crashed after
identifying problems in your program, there's a good chance
that fixing those problems will prevent Valgrind aborting or
crashing, especially if it happened in m_mallocfree.c.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what OS and version you are using.  Thanks.

tst_test.c:1961: TBROK: Child returned with 1

Summary:
passed   0
failed   0
broken   1
skipped  0
warnings 0
==1819656== 
==1819656== HEAP SUMMARY:
==1819656==     in use at exit: 0 bytes in 0 blocks
==1819656==   total heap usage: 6 allocs, 6 frees, 4,488 bytes allocated
==1819656== 
==1819656== All heap blocks were freed -- no leaks are possible
==1819656== 
==1819656== For lists of detected and suppressed errors, rerun with: -s
==1819656== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
$

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to