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

Fix: preserved thread's system error over NativeCallback invocations #790

Merged
merged 1 commit into from
May 10, 2024

Conversation

HexKitchen
Copy link
Contributor

Fix for #789 : NativeCallback unable to leave thread's last error unchanged

Though JavaScript function wrapped as a NativeCallback allows both inspecting and altering the current thread's system error, it wasn't possible to leave the system error as-is. Unless replaced by a value unequal to the original, the system error was being forced to 0 upon return from the NativeCallback. Fixed and tests added.

@oleavr
Copy link
Member

oleavr commented Apr 2, 2024

Thanks, great catch! 🙌

Though JavaScript function wrapped as a NativeCallback allows both
inspecting and altering the current thread's system error, it wasn't
possible to leave the system error as-is. Unless replaced by a value
unequal to the original, the system error was being forced to 0 upon
return from the NativeCallback.
@oleavr oleavr force-pushed the fix-nativecallback-system-error branch from 43126f9 to f545d8d Compare May 10, 2024 20:32
@oleavr oleavr merged commit d0551e6 into frida:main May 10, 2024
32 checks passed
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