Skip to content

Check the shared library's exports against hipobj.h - #266

Merged
derobins merged 1 commit into
developfrom
derobins/check_exports
Oct 19, 2026
Merged

derobins merged 1 commit into
developfrom
derobins/check_exports

Conversation

@derobins

Copy link
Copy Markdown
Collaborator

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.

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>
@github-actions

Copy link
Copy Markdown
Contributor
Security scan found no critical or high findings on lines changed by this pull request

View 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@derobins
derobins merged commit 682d8fb into develop Oct 19, 2026
32 checks passed
@derobins
derobins deleted the derobins/check_exports branch October 19, 2026 17:29
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.

2 participants