mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Today in the uncaught exception handler, we attempt to halt the virtual machine on fatal errors. Yet, halting the virtual machine requires privileges which might not be granted to the caller when the exception is thrown for example from a scripting engine. This means that if an OutOfMemoryError or another fatal error is hit inside a script, the virtual machine will not exit because the halt call will be denied for securiry privileges. In this commit, we mark this halt call as trusted so that the virtual machine can be halted if a fatal error is encountered in a script. Relates #19923