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

Handle failure in ffi_closure_alloc #1378

Commits on Sep 13, 2021

  1. Handle failure in ffi_closure_alloc

    `ffi_closure_alloc` may fail and return `NULL` if, for instance, we're
    running in a locked-down operating system that forbids FFI from
    allocating executable pages of memory in any of the ways that it tries.
    Today we pass this `NULL` on to `ffi_prep_closure_loc` which triggers a
    segmentation fault that takes down the whole JVM. With this change we
    check for a failure in this call and turn it into an
    `UnsupportedOperationException` so that the caller can handle it more
    gracefully.
    
    Relates elastic/elasticsearch#73309
    Relates elastic/elasticsearch#18272
    DaveCTurner committed Sep 13, 2021
    Configuration menu
    Copy the full SHA
    3f5e937 View commit details
    Browse the repository at this point in the history