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

src: verify pointer before calling its method #2

Merged
merged 1 commit into from
Oct 1, 2020
Merged

Conversation

gabylb
Copy link
Member

@gabylb gabylb commented Sep 30, 2020

The destructor InstanceMethodCallBaton() calls m_javaObject->Unref() which aborts when m_javaObject is NULL.

Affects at least npm test from node-jdbc npm, which aborts in test test-statement-adjust / testcreatetable:

(abort) [0x26C7C640]
(__cxa_end_catch) [0x2E2CC414]
(InstanceMethodCallBaton::~InstanceMethodCallBaton()+0x140) [0x2E2CD2A4]
(Nan::AsyncWorker::Destroy()@AF61_58+0x28) [0x2E2CCE4C]
(Nan::AsyncWorker::Destroy()+0x18) [0x2E2C9F12]
(Nan::AsyncExecuteComplete(uv_work_s*)+0x4e) [0x27DB5430]
...

The destructor InstanceMethodCallBaton() calls m_javaObject->Unref()
which aborts when m_javaObject is NULL.

Affects at least `npm test` from `node-jdbc` npm, which aborts in
test `testcreatetable`:

(abort) [0x26C7C640]
(__cxa_end_catch) [0x2E2CC414]
(InstanceMethodCallBaton::~InstanceMethodCallBaton()+0x140) [0x2E2CD2A4]
(Nan::AsyncWorker::Destroy()@AF61_58+0x28) [0x2E2CCE4C]
(Nan::AsyncWorker::Destroy()+0x18) [0x2E2C9F12]
(Nan::AsyncExecuteComplete(uv_work_s*)+0x4e) [0x27DB5430]
...
Copy link
Member

@joransiu joransiu left a comment

Choose a reason for hiding this comment

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

LGTM

@gabylb gabylb merged commit 6d38b70 into node14-zos Oct 1, 2020
@gabylb gabylb deleted the destfix branch March 12, 2021 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants