Summary: | Wrong value recovery for DFG try/catch with a getter that throws during an IC miss | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Saam Barati <saam> | ||||
Component: | JavaScriptCore | Assignee: | Saam Barati <saam> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, commit-queue, fpizlo, ggaren, gskachkov, keith_miller, mark.lam, msaboff, oliver, sukolsak, ysuzuki | ||||
Priority: | P2 | ||||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 149409 | ||||||
Attachments: |
|
Description
Saam Barati
2015-10-31 16:22:13 PDT
What I think is happening. The IC misses, but the operationGetByIdOptimize stores the result of the call into the result register. Even though the C call throws, we store the result. And then, we try to recover the base from the register we stored the result into because the result and base are the same register. This is a big bag of fail. (In reply to comment #1) > What I think is happening. > The IC misses, but the operationGetByIdOptimize stores the result > of the call into the result register. Even though the C call throws, > we store the result. And then, we try to recover the base from > the register we stored the result into because the result and base > are the same register. This is a big bag of fail. I've actually realized that the problem is deeper than this. I do think the situation I'm describing is a problem, but I've realized that the result of the call in this example is looking dead to DFG OSR exit when we use PhantomLocal as the liveness preservation mechanism. I'm going to switch the code back to using Flush so that I can land FTL try/catch, and then I will investigate this problem further. (In reply to comment #2) > (In reply to comment #1) > > What I think is happening. > > The IC misses, but the operationGetByIdOptimize stores the result > > of the call into the result register. Even though the C call throws, > > we store the result. And then, we try to recover the base from > > the register we stored the result into because the result and base > > are the same register. This is a big bag of fail. > > I've actually realized that the problem is deeper than this. > I do think the situation I'm describing is a problem, but > I've realized that the result of the call in this example > is looking dead to DFG OSR exit when we use PhantomLocal > as the liveness preservation mechanism. I'm going > to switch the code back to using Flush so that I can > land FTL try/catch, and then I will investigate this problem > further. Let me elaborate: the result of the call looks dead after we do flushRegisters(). Created attachment 264646 [details]
patch
Comment on attachment 264646 [details]
patch
r=me
Attachment 264646 [details] did not pass style-queue:
ERROR: Source/JavaScriptCore/dfg/DFGLiveCatchVariablePreservationPhase.cpp:133: Place brace on its own line for function definitions. [whitespace/braces] [4]
Total errors found: 1 in 3 files
If any of these errors are false positives, please file a bug against check-webkit-style.
landed in: http://trac.webkit.org/changeset/191930 |