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

[Hexagon] Change declaration order of unique_ptr objects to fix crash #8859

Merged
merged 1 commit into from
Aug 27, 2021
Merged

[Hexagon] Change declaration order of unique_ptr objects to fix crash #8859

merged 1 commit into from
Aug 27, 2021

Commits on Aug 26, 2021

  1. [Hexagon] Change declaration order of unique_ptr objects to fix crash

    A crash occurs when automatically deleting an instance of
    CodeGenHexagon because the LLVMContext object has already been
    freed. Objects of both types are created using unique_ptr, but
    the object managed by the LLVMContext unique_ptr is passed to
    CodeGenHexagon object (not as a unique_ptr).
    
    This crash is fixed by moving the declaration of the LLVMContext
    object before the CodeGenHexagon object. I'm not sure if this
    is the best way to fix this, but it does fix the crash. Also,
    in other files, the LLVMContext object is always created first.
    bcahoon authored and Krzysztof Parzyszek committed Aug 26, 2021
    Configuration menu
    Copy the full SHA
    7ff5995 View commit details
    Browse the repository at this point in the history