Repository navigation
Check the shared library's exports against hipobj.h - #266
Merged
Merged
Conversation
hipobj-exports checked only that the shared library exports nothing but hipObj* functions, so a function declared with HIPOBJ_API but never defined went unnoticed until a caller failed to link. The test now reads the HIPOBJ_API declarations from include/hipobj.h and fails if the library exports a symbol the header doesn't declare, or doesn't export a function the header declares. It also fails if it can't read a function name from a HIPOBJ_API, or finds none, so a change in the header's style can't make it pass vacuously. Co-Authored-By: Claude <noreply@anthropic.com>
derobins
requested review from
akolliasAMD,
gaoikawa,
jordan-turbofish,
kurtmcmillan,
riley-dixon,
sbates130272 and
zbyrne
as code owners
October 19, 2026 17:20
Contributor
Security scan found no critical or high findings on lines changed by this pull requestView the security scan run for complete reports. “New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused test changes have no identified blocking issues in parsing, symbol comparison, or test registration.
No open issues 🎉
What changed in this PR
Strengthens hipobj-exports to verify that the shared library’s exports match the public API declared in hipobj.h.
Changes:
- Passes the public header to the export checker.
- Detects missing exports, undeclared exports, and unparseable or absent API declarations.
| File | Description |
|---|---|
| test/exports/CMakeLists.txt | Supplies the public header path to the test. |
| test/exports/check-exports.cmake | Parses API declarations and checks for missing or unexpected exports. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hipobj-exports checked only that the shared library exports nothing but hipObj* functions, so a function declared with HIPOBJ_API but never defined went unnoticed until a caller failed to link. The test now reads the HIPOBJ_API declarations from include/hipobj.h and fails if the library exports a symbol the header doesn't declare, or doesn't export a function the header declares. It also fails if it can't read a function name from a HIPOBJ_API, or finds none, so a change in the header's style can't make it pass vacuously.