| Summary: | ScratchRegisterAllocator::preserveReusedRegistersByPushing() should allow room for C helper calls and keep sp properly aligned. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||
| Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | benjamin, fpizlo, ggaren, keith_miller, msaboff, saam, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Local Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 149030 | ||||||
| Attachments: |
|
||||||
|
Description
Mark Lam
2015-08-27 23:29:20 PDT
Created attachment 260136 [details]
the fix.
Comment on attachment 260136 [details] the fix. View in context: https://bugs.webkit.org/attachment.cgi?id=260136&action=review r=me > Source/JavaScriptCore/jit/ScratchRegisterAllocator.cpp:121 > + jit.subPtr(MacroAssembler::TrustedImm32(numberOfPaddingBytes + maxFrameExtentForSlowPathCall), MacroAssembler::stackPointerRegister); You're adding maxFrameExtenetFowSlowPathCall twice: here and line 117. > Source/JavaScriptCore/jit/ScratchRegisterAllocator.cpp:131 > + jit.addPtr(MacroAssembler::TrustedImm32(numberOfPaddingBytes + maxFrameExtentForSlowPathCall), MacroAssembler::stackPointerRegister); ditto. I think this should just be numberOfPaddingBytes. (In reply to comment #3) > You're adding maxFrameExtenetFowSlowPathCall twice: here and line 117. Thanks for catching that bug. Fixed locally and landed in r189103: <http://trac.webkit.org/r189103>. Comment on attachment 260136 [details] the fix. View in context: https://bugs.webkit.org/attachment.cgi?id=260136&action=review > Source/JavaScriptCore/tests/stress/regress-148564.js:1 > +//@ run("regress", "--enableAccessInlining=false") You shouldn't use the run() method directly, since doing so disables the FTL and enables concurrent JIT. That means you're not guaranteed that "test()" will actually get compiled by the DFG, and it guarantees that it won't get compiled by the FTL. It would have been better to use the existing "runNoCJITNoAccessInlining" method in this case, if you don't want FTL testing (which I'm assuming you don't). (In reply to comment #5) > It would have been better to use the existing "runNoCJITNoAccessInlining" > method in this case, if you don't want FTL testing (which I'm assuming you > don't). Applied this in a follow up patch in r189120: <http://trac.webkit.org/r189120>. I think that this was the wrong fix. The bug here is that the barrier slow path isn't calling restoreReusedRegistersByPopping() prior to preserveUsedRegistersToScratchBufferForCall() the way that the allocation slow path does. |