Closed virgofx closed 8 years ago
V8 aborts the process itself here, there's nothing the extension could do about.
Do you have the JS payload that triggers the crash? Could you please try running mksnapshot
manually with that source code ... I suppose it crashes there as well (if the same source code crashes repeatedly)
... which version of V8 are you using? Maybe just pick a (slighly) newer one
Well I found the single character that was causing the payload to crash. It was currently using "–" Either the symbol or the entity code that is "&" + "ndash;" I believe other entities as well make it crash. I'm reinstalling manually (instead of using precompiled binaries) to test the mksnapshot utility to see if it behaves any differently
I took your advice and upgraded from 5.1.53 to 5.1.256 and it looks like they've fixed a lot of unicode issues (in the change logs) -- which also now work in server side version and allow the entities in JSX (e.g. ampersand + other chracters)
As far as reporting errors, I was just wondering if it were possible to wrap the create snapshot in C-land to prevent the sigfault if possible. If it's not, that's fine too as it's a user issue when the payload is corrupted and this can be closed.
Thanks @stesie
no, there's no way for a caller (V8Js) to handle execution of illegal instructions by a called library (at least not a porable one). After all V8 probably corrupted its memory layout by doing that ... so even if it would like to, V8Js couldn't continue it's work.
and after all, that clearly is a bug within V8 so there shouldn't be facades hiding it
The new snapshot feature works great. Would it be possible to update the API to have
createSnapshot()
throw exception on failure. During testing I have malformed script (or something that doesn't work great on server), yet very hard to debug. It currently throws sigfault crashing PHP with 502.I'm not sure what types of exceptions can be caught during creation of the snapshot; however, the more the better. If this could be done that would be very helpful.
Current Backtrace