| Summary: | Repatch write barrier slow path call doesn't align the stack in the presence of saved registers | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Hahnenberg <mhahnenberg> | ||||
| Component: | JavaScriptCore | Assignee: | Mark Hahnenberg <mhahnenberg> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | ||||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 121074 | ||||||
| Attachments: |
|
||||||
|
Description
Mark Hahnenberg
2013-12-20 16:16:35 PST
Correction to the above: the stack must be aligned at the time of the call (i.e. 16-byte aligned, then return address is pushed). Created attachment 220535 [details]
Patch
Comment on attachment 220535 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=220535&action=review r=me > Source/JavaScriptCore/jit/Repatch.cpp:798 > + unsigned desiredAlignment = 16; Please use StackAlignment.h instead. > Source/JavaScriptCore/jit/Repatch.cpp:897 > #if ENABLE(GGC) > - MacroAssembler::Call writeBarrierOperation = writeBarrier(stubJit, baseGPR, scratchGPR1, scratchGPR2, allocator); > + MacroAssembler::Call writeBarrierOperation = writeBarrier(stubJit, baseGPR, scratchGPR1, scratchGPR2, callFrameRegister, allocator); > #endif For #ifdefs like this, I prefer to make the call site unconditional, and make the implementation of writeBarrier() conditional on #ENABLE(GGC). That removes distractions from the code. > For #ifdefs like this, I prefer to make the call site unconditional, and make the implementation of writeBarrier() conditional on #ENABLE(GGC). That removes distractions from the code.
My main reasoning for putting it here rather than in the body is to make so as much code compiles when GGC is disabled.
(In reply to comment #4) > My main reasoning for putting it here rather than in the body is to make so as much code compiles when GGC is disabled. ...as possible? Committed r161450: <http://trac.webkit.org/changeset/161450> |