Skip to content
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

c18n: New {get,set}context APIs for libunwind #2123

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Commits on Oct 30, 2024

  1. c18n: Compare pointers by converting them to integers first

    Using relational operators to compare pointers to different trusted
    frames is undefined behaviour.
    dpgao committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    5a00523 View commit details
    Browse the repository at this point in the history
  2. c18n: Expose unified unwinding APIs to setjmp/longjmp and libunwind

    Previously, libunwind hard-codes knowledge about the layout of the
    trusted frame and has read access to the trusted stack. This is fragile
    and insecure.
    
    Now, the task of extracting the relevant registers from the trusted
    stack is delegated to RTLD, and libunwind no longer has access to the
    trusted stack.
    
    The unified unwinding APIs are declared as dl_c18n_* functions in
    link.h. setjmp/longjmp have been updated to use them.
    
    The previous API has been retained for compatibility with old libunwind.
    dpgao committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    08300c1 View commit details
    Browse the repository at this point in the history