| Summary: | [MIPS] webkitgtk crashed if JIT is enabled | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jeffrey <Jeffrey.li> | ||||||
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | NEW --- | ||||||||
| Severity: | Normal | CC: | annulen, cgarcia, fpizlo, guijemont, jbriance, mcatanzaro, ossy, zan | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Other | ||||||||
| OS: | Linux | ||||||||
| Attachments: |
|
||||||||
|
Description
Jeffrey
2015-07-06 02:26:35 PDT
Created attachment 256203 [details]
test case for this issue.
Created attachment 256268 [details]
proposed patch
On MIPS platform, function llint_op_catch() use RA register to compute gp pointor. JSC::CCallHelpers::jumpToExceptionHandler() use T9 register. It will cause a invalid gp pointer when jump to llint_op_catch().
My patch load the function address to RA first. Then copy it to T9 and jump.
Guillaume, this look OK? You didn't run into this issue...? (In reply to comment #1) > Created attachment 256203 [details] > test case for this issue. Great. This should probably be added as a testcase under LayoutTests/js. (In reply to comment #3) > Guillaume, this look OK? You didn't run into this issue...? I did not run into this issue (yet?), maybe because I've mainly worked with jsc only (only compiling WTF/ and JavaScriptCore/). I am a little confused by the patch though. I understand that $gp is computed by the code of .cpload (emitted by offlineasm for each label), which uses $t9. I don't understand how this is different for llint_op_catch(), though I didn't study the exception code/protocol, and I have a feeling that this is not your regular function, and there might be something done with $ra that I did not understand. > (In reply to comment #1) > > Created attachment 256203 [details] > > test case for this issue. > > Great. This should probably be added as a testcase under LayoutTests/js. Comment on attachment 256268 [details]
proposed patch
Jeffrey, could you respond to Guillaume's questions here? Resetting the request flags in the meantime.
(In reply to comment #4) > (In reply to comment #3) > > Guillaume, this look OK? You didn't run into this issue...? > > I did not run into this issue (yet?), maybe because I've mainly worked with > jsc only (only compiling WTF/ and JavaScriptCore/). > I am a little confused by the patch though. I understand that $gp is > computed by the code of .cpload (emitted by offlineasm for each label), > which uses $t9. I don't understand how this is different for > llint_op_catch(), though I didn't study the exception code/protocol, and I > have a feeling that this is not your regular function, and there might be > something done with $ra that I did not understand. > > > (In reply to comment #1) > > > Created attachment 256203 [details] > > > test case for this issue. > > > > Great. This should probably be added as a testcase under LayoutTests/js. The .cpload uses $ra register to compute the $gp value. The jumpToExceptionHandler() uses $t9 as jump register now. Then in llint_op_catch() function, $ra will get a incorrect value. This will cause the $gp value is incorrect too. |