-
Notifications
You must be signed in to change notification settings - Fork 418
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
[GLUTEN-1199] Avoid throwing exception from destructor of JavaInputStreamAdaptor #1505
Conversation
Thank you for catching this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the code style, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
And how does this relate to the mentioned memory leak issue? Would you like to explain a bit more about that?
71a8e91
a9b9a76
to
71a8e91
Compare
done |
This pr do not relate to memory leak issue. I will try to found it out and fix it next week. |
@zhztheplayer This pr is related to #1187 and it is a better fix to deal with |
Will merge the patch soon, if there is no more comment. |
What changes were proposed in this pull request?
HINT: Throw an exception in destructor is dangerous and you should never let the exception leave destructors. If there are two exceptions propagating, the program will terminate or yield undefined behavior.
inside function Java_io_glutenproject_vectorized_ShuffleReaderJniWrapper_make
But between step2 and step3, destructor of JavaInputStreamAdaptor is called, then we got another exception, the process terminate.
(Fixes: #1199)
How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)