fix: valgrind doesn't filter .plt.sec calls#2
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes Valgrind's handling of the .plt.sec (hardened PLT) section, which was previously not being filtered when the --skip-plt option was enabled. The fix adds support for detecting and tracking .plt.sec sections across different architectures and ensures they are treated similarly to regular .plt sections.
Key changes:
- Added new API functions and enum value for
.plt.secsection tracking - Implemented
.plt.secsection detection in ELF reader for multiple architectures (x86, ppc32, ppc64) - Updated callgrind to skip
.plt.secsections when--skip-pltis enabled
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| include/pub_tool_debuginfo.h | Added API functions for .plt.sec section access and new Vg_SectPLTSEC enum value |
| coregrind/m_debuginfo/priv_storage.h | Added fields to track .plt.sec section presence, address, and size |
| coregrind/m_debuginfo/readelf.c | Implemented .plt.sec section detection for x86, ppc32, and ppc64 architectures |
| coregrind/m_debuginfo/debuginfo.c | Implemented getter functions, section kind mapping, and address range checking for .plt.sec |
| callgrind/fn.c | Updated PLT skip logic to include Vg_SectPLTSEC sections |
| callgrind/tests/plt_sec_test.c | Added test program that exercises library calls through .plt.sec |
| callgrind/tests/plt-sec-skip.vgtest | Added test configuration for verifying .plt.sec filtering |
| callgrind/tests/plt-sec-skip.stdout.exp | Added expected stdout output for the test |
| callgrind/tests/plt-sec-skip.stderr.exp | Added expected stderr output for the test |
| callgrind/tests/plt-sec-skip.post.exp | Added expected post-processing output showing filtered function names |
| callgrind/tests/filter_plt_sec | Added shell script to filter and verify callgrind output |
| callgrind/tests/Makefile.am | Updated build configuration to include new test files and compilation flags |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
f51198a to
feb8824
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
feb8824 to
17cd805
Compare
17cd805 to
dd7e028
Compare
No description provided.