Skip to content

Add DEFINE_SL_SAFE_STUB support #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 8, 2025
Merged

Add DEFINE_SL_SAFE_STUB support #2

merged 3 commits into from
May 8, 2025

Conversation

Kyle-Ye
Copy link
Member

@Kyle-Ye Kyle-Ye commented May 8, 2025

No description provided.

@Kyle-Ye Kyle-Ye requested a review from Copilot May 8, 2025 14:27
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for safe stubs using the DEFINE_SL_SAFE_STUB macros to improve resilience when symbols cannot be resolved at runtime. Key changes include updating the tests to utilize these macros, adding safe stub definitions in the C source, and updating the header files and documentation accordingly.

  • Added safe stub declarations in Swift tests for unknown symbols.
  • Introduced new safe stub macros in the header to handle symbol resolution failures gracefully.
  • Updated documentation in README to reflect the safe stub usage and limitations.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Tests/SymbolLocatorTests/SymbolLocatorTests.swift Updated test cases to use new safe stub functions.
Sources/SymbolLocatorTestsSupport/SymbolLocatorTestsSupport.c Added safe stub definitions for unknown symbols.
Sources/SymbolLocator/include/SymbolLocator.h Introduced safe stub macros and removed obsolete architecture-specific macro.
Sources/SymbolLocator/SymbolLocatorLog.m Added logging implementation to support error reporting.
README.md Updated documentation to include safe stub usage details.

@Kyle-Ye Kyle-Ye force-pushed the feature/sl_safe branch from 955b88b to cef2a87 Compare May 8, 2025 14:33
@Kyle-Ye Kyle-Ye requested a review from Copilot May 8, 2025 15:25
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for safe stubs that log errors at runtime when a symbol cannot be resolved, along with test and documentation updates.

  • Added safe stub macro definitions in SymbolLocator.h for both SLF and SLPF variants.
  • Updated the C support file to define safe stubs for unknown symbols.
  • Introduced tests and expanded README documentation to explain safe stub usage and its limitations.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Tests/SymbolLocatorTests/SymbolLocatorTests.swift Added tests for safe stub usage and handling of unresolved symbols.
Sources/SymbolLocatorTestsSupport/SymbolLocatorTestsSupport.c Introduced DEFINE_SL_SAFE_STUB_SLF definitions for unknown symbol functions.
Sources/SymbolLocator/include/SymbolLocatorLog.h Provided logging functions for symbol resolution errors.
Sources/SymbolLocator/include/SymbolLocator.h Added safe stub macro definitions along with architecture-specific assembly macros.
Sources/SymbolLocator/SymbolLocatorLog.m Implemented logging functionalities for symbol location errors.
README.md Updated documentation to detail safe stub behavior and limitations.

@Kyle-Ye Kyle-Ye merged commit 1bd1a26 into main May 8, 2025
@Kyle-Ye Kyle-Ye deleted the feature/sl_safe branch May 8, 2025 15:27
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