Summary: | We need to leave room on the top of the stack for the FTL TailCall slow path so it doesn't overwrite things we want to retrieve when doing a stack walk when throwing an exception | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Saam Barati <saam> | ||||||
Component: | JavaScriptCore | Assignee: | Saam Barati <saam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | benjamin, commit-queue, fpizlo, ggaren, gskachkov, jfbastien, keith_miller, mark.lam, msaboff, rmorisset, ticaiolima, webkit-bug-importer, ysuzuki | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Safari Technology Preview | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Saam Barati
2017-12-04 11:08:30 PST
I'm wondering if this is needed in the DFG as well. I suspect it is, but I have yet to prove it with a crashing test. (In reply to Saam Barati from comment #1) > I'm wondering if this is needed in the DFG as well. I suspect it is, but I > have yet to prove it with a crashing test. The DFG already handles exactly this via Graph's m_parameterSlots which tracks the maximum outgoing call parameter count. Created attachment 328368 [details]
patch
Comment on attachment 328368 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=328368&action=review > Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:6994 > + m_proc.requestCallArgAreaSizeInBytes( > + WTF::roundUpToMultipleOf(stackAlignmentBytes(), (CallFrame::headerSizeInRegisters + numArgs) * sizeof(EncodedJSValue))); AirCode::requestCallArgAreaSizeInBytes() already takes care of aligning to stackAlignmentBytes(). So, no need to do that here. Comment on attachment 328368 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=328368&action=review >> Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:6994 >> + WTF::roundUpToMultipleOf(stackAlignmentBytes(), (CallFrame::headerSizeInRegisters + numArgs) * sizeof(EncodedJSValue))); > > AirCode::requestCallArgAreaSizeInBytes() already takes care of aligning to stackAlignmentBytes(). So, no need to do that here. I'm going to keep the rounding in to stay consistent w/ other places that do this in FTLLower Comment on attachment 328368 [details]
patch
r=me
Created attachment 328376 [details]
patch for landing
Comment on attachment 328376 [details] patch for landing Clearing flags on attachment: 328376 Committed r225492: <https://trac.webkit.org/changeset/225492> All reviewed patches have been landed. Closing bug. |