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

jit: fix assertion in GDBJITRegistrationListener #13864

Merged
merged 1 commit into from Jun 18, 2023

Conversation

oltolm
Copy link
Contributor

@oltolm oltolm commented May 15, 2023

This fixes the assertion Second attempt to perform debug registration. which happens in GDBJITRegistrationListener. It happens on Linux if compiled in debug mode.

auto cache = ObjectCache::load(path);

This variable contains the code. A reference to it is added to the JIT compiler and then it is destroyed at the end of the function jit_compiler::add and the JIT compiler now has a reference to destroyed code.

I changed it to pass the ownership of the code to the JIT compiler.

@oltolm
Copy link
Contributor Author

oltolm commented Jun 18, 2023

@Nekotekina ping

@Nekotekina Nekotekina merged commit 37bc738 into RPCS3:master Jun 18, 2023
5 checks passed
@oltolm
Copy link
Contributor Author

oltolm commented Jun 18, 2023

Thank you. There is something I don't understand. If my analysis was correct and the JIT compiler used a reference to destroyed code, how did it even work and why did I only get the assertion on Linux and not on Windows?

@oltolm oltolm deleted the jit_fix branch June 18, 2023 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants