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

attempt to fix crashers when initializing the JVM #8380

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pixelflinger
Copy link
Collaborator

  • clarify precondition for VirtualMachineEnv, in particular, JNI_OnLoad() must be called from a thread attached to the VM, and should be called once. This is now enforced internally, subsequent calls are ignored.

  • sVirtualMachine was written and read from potentially different threads without synchronization. It is now mutex protected.

  • added fatal asserts in all locations that we cannot recover from; previously we would stay in an undefined state.

BUGS=[390724273]

- clarify precondition for VirtualMachineEnv, in particular, 
  JNI_OnLoad() must be called from a thread attached to the VM, and
  should be called once. This is now enforced internally, subsequent
  calls are ignored.

- sVirtualMachine was written and read from potentially different 
  threads without synchronization. It is now mutex protected.

- added fatal asserts in all locations that we cannot recover from;
  previously we would stay in an undefined state.

BUGS=[390724273]
@pixelflinger pixelflinger added the internal Issue/PR does not affect clients label Jan 23, 2025
@google google deleted a comment from github-actions bot Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant