-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Segfault when calling a method when this
is null
#106
Comments
Hi Jean-Claude,
Thank you for the bug reporting!
Yes, this is a good idea to throw a JavaScript exception back to the
script, instead of the host application crashing.
If you already have a fix for this issue, I would happy to merge it.
вт, 26 мар. 2019 г., 16:35 Jean-Claude Monnin <notifications@github.com>:
… See test case: ***@***.***
<jcmonnin@8c9db45>
When this doesn't reference the actual instance, v8pp resolves the unwarp
to a nullptr and the calls the method on the null pointer which causes a
segfault.
The script shouldn't be able to crash the host application, so I think
there should be a runtime check that results in a JavaScript error.
Let me know if you prefer to have a full patch proposal instead of just
this incomplete test case.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#106>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABEgUiQiqpN8hihKQV7HXg6XvC_uHYAkks5vaj5cgaJpZM4cLxAE>
.
|
Hi Pavel, I currently don't have a fix that is ready, but I can try to make one. I keep you updated. |
jcmonnin
added a commit
to jcmonnin/v8pp
that referenced
this issue
May 1, 2019
jcmonnin
added a commit
to jcmonnin/v8pp
that referenced
this issue
May 1, 2019
jcmonnin
added a commit
to jcmonnin/v8pp
that referenced
this issue
May 1, 2019
Previously this was giving a segfault Fixes pmed#106
pmed
added a commit
that referenced
this issue
May 3, 2019
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
See test case: jcmonnin/v8pp@8c9db45
When
this
doesn't reference the actual instance, v8pp resolves the unwarp to a nullptr and then calls the method on the null pointer which causes a segfault.The script shouldn't be able to crash the host application, so I think there should be a runtime check that results in a JavaScript error.
Let me know if you prefer to have a full patch proposal instead of just this incomplete test case.
The text was updated successfully, but these errors were encountered: