Skip to content

[PW_SID:1125238] selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests#2257

Closed
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1125238
Closed

[PW_SID:1125238] selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests#2257
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1125238

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1125238 applied to workflow__riscv__fixes

Name: selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1125238
Version: 1

Linux RISC-V bot and others added 2 commits July 8, 2026 17:32
The regset_data buffer allocated with calloc() in the parent process
of several vector ptrace tests is never freed before returning,
causing memory leaks in:

- ptrace_v_not_enabled
- ptrace_v_early_debug
- ptrace_v_syscall_clobbering
- v_csr_invalid/ptrace_v_invalid_values
- v_csr_valid/ptrace_v_valid_values

Add free(regset_data) before kill(pid, SIGKILL) to release the
allocated buffer.

Signed-off-by: Wang Yan <wangyan01@kylinos.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 142.38 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1110.54 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1383.69 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 25.92 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.15 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.77 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 85.06 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 1: "selftests/riscv: ptrace: Fix memory leak of regset_data in vector tests"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot
linux-riscv-bot force-pushed the workflow__riscv__fixes branch from 40ba5ca to 2b6a725 Compare July 10, 2026 16:34
@linux-riscv-bot
linux-riscv-bot deleted the pw1125238 branch July 10, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant