Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

modified sample to reproduce #379 #443

Closed
wants to merge 1 commit into from
Closed

modified sample to reproduce #379 #443

wants to merge 1 commit into from

Conversation

marandaneto
Copy link
Contributor

just a draft to reproduce #379

paste bin
https://pastebin.com/fy5LmJgv

findings:
when there are an uncaught exception and a segfault at the same time as this example does, the
UncaughtExceptionHandlerIntegration.uncaughtException and the segfault handler try to execute its handlers, but one interferes in the other.

eg UncaughtExceptionHandlerIntegration.uncaughtException probably sends a SIGABRT to the native layer and vice-versa, so sometimes none of them are able to finish its job.

If you add a breakpoint in one of them, the other handler is able to do its job and generate a crash event.

jstring result = (jstring) env->CallStaticObjectMethod(clazz, method);
// if I do a NPE check, it bails out and it works
// if (result == NULL) {
// return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try to see what happens with the uncaught exception handler here if we do env->ExceptionClear(env) before the return.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants