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

Merged
merged 1 commit into from
Feb 2, 2025
Merged

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]

@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
- 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 requested review from romainguy, bejado and z3moon and removed request for bejado January 31, 2025 18:50
@pixelflinger pixelflinger marked this pull request as ready for review January 31, 2025 18:50
@pixelflinger pixelflinger merged commit b780cb3 into main Feb 2, 2025
13 checks passed
@pixelflinger pixelflinger deleted the ma/jnienv branch February 2, 2025 06:35
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.

2 participants