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

Improve expression evaluator, (non)fatal attribute evaluation, and ORC dogfood #55

Merged
merged 9 commits into from
Jan 3, 2023

Conversation

fosterbrereton
Copy link
Contributor

@fosterbrereton fosterbrereton commented Dec 22, 2022

This PR does a handful of things:

Improved expression evaluation

Some libraries have been found that use new DWARF 5 constructs (DW_OP_stack_value), as well as more complex uses of the DWARF form expression evaluator. This PR improves upon ORC's ability to evaluate DWARF form expressions. This will fix some errors where the attribute is showing as <unhandled>, and may result in an ODRV false positives that read thusly (note the <unhandled> value for the first data_member_location):

warning: ODRV (member:data_member_location); conflict in `NSURL::_baseURL`
    within: libAppAuth.a:
    within: OIDAuthState+IOS.o:
        definition location: /path/to/NSURL.h:22
        name: _baseURL
        type: NSURL*
        data_member_location: <unhandled>
        accessibility: 2 (0x2)

    within: libGTMAppAuth.a:
    within: GTMAppAuthFetcherAuthorization.o:
        definition location: /path/to/NSURL.h:22
        name: _baseURL
        type: NSURL*
        data_member_location: 0 (0x0)
        accessibility: 2 (0x2)

Improved expression evaluation skipping

We have been identifying nonfatal attributes for some time now. This PR includes an optimization where, for some attributes, the value is passed over when we know it is not necessary for detecting for ODRVs.

Dogfood build

The CMake project is modified to add an orc_dogfood target. It is identical to the orc_orc target, except ORC is passed over the dogfood target during link time. This ensures that ORC itself has no ODR violations (at least as far as the tool can detect them.) This addresses a comment made in #20.

@fosterbrereton fosterbrereton changed the title further improve expression evaluator and improved nonfatal passover. Improve expression evaluator and (non)fatal attribute evaluation Dec 22, 2022
@fosterbrereton fosterbrereton changed the title Improve expression evaluator and (non)fatal attribute evaluation Improve expression evaluator, (non)fatal attribute evaluation, and ORC dogfood Dec 22, 2022
Copy link
Contributor

@leethomason leethomason left a comment

Choose a reason for hiding this comment

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

Deep. Looks good and moves the ball down the field.

@fosterbrereton fosterbrereton merged commit 428ae9e into main Jan 3, 2023
@fosterbrereton fosterbrereton deleted the fosterbrereton/blockN-form-support branch January 3, 2023 23:24
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.

None yet

2 participants