Closed
Bug 925604
Opened 11 years ago
Closed 11 years ago
Crash when calling back into javascript repeatedly
Categories
(Core :: js-ctypes, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: bdahl, Unassigned)
Details
Attachments
(4 files)
This was first observed in the libadb add-on when we were busy waiting. I've created a minimal extension and shared library that reproduces the crash. The shared library basically just calls back into js code in a loop and eventually crashes with the attached backtrace.
Reporter | ||
Comment 1•11 years ago
|
||
Reporter | ||
Comment 2•11 years ago
|
||
Reporter | ||
Comment 3•11 years ago
|
||
Comment 4•11 years ago
|
||
I'm pretty sure bug 915613 fixed this. Which build are you running on?
Reporter | ||
Comment 5•11 years ago
|
||
Debug build, updated yesterday 40c7c53fe9b0
Comment 6•11 years ago
|
||
Oh, I misinterpreted the stack. What's happening is that the |cinfo| that gets passed from your native code to the JS callback points to freed JS heap memory. The most likely reason is that you're letting the callback object be collected in JS before you invoke it. See the second warning here: https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/js-ctypes_reference/Callbacks
Reporter | ||
Comment 7•11 years ago
|
||
That was it. Looks like it happens multiple places in the libadb code. Thanks for the help!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•