RESOLVED DUPLICATE of bug 148666 147639
jsc-tailcall: Exceptions should properly restore callee save register contents during unwinding
https://bugs.webkit.org/show_bug.cgi?id=147639
Summary jsc-tailcall: Exceptions should properly restore callee save register content...
Michael Saboff
Reported 2015-08-04 11:45:57 PDT
When we unwind to a catch block or uncaught exception code, callee save registers should be restored to their proper values.
Attachments
Patch (37.03 KB, patch)
2015-08-06 14:35 PDT, Michael Saboff
no flags
Michael Saboff
Comment 1 2015-08-06 14:35:15 PDT
Basile Clement
Comment 2 2015-08-06 15:22:50 PDT
Comment on attachment 258398 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=258398&action=review LGTM. > Source/JavaScriptCore/dfg/DFGOSRExitCompiler64.cpp:260 > + m_jit.emitMaterializeTagCheckRegisters(); > + I'd add a comment to state that we need the tag check registers to be materialized for the recoveries below. > Source/JavaScriptCore/jit/AssemblyHelpers.h:228 > + move(TrustedImmPtr(m_vm), temp1); > + addPtr(TrustedImm32(VM::calleeSaveRegistersBufferOffset()), temp1); Why not just move(TrustedImmPtr(m_vm->calleeSaveRegistersBuffer), temp1);? > Source/JavaScriptCore/jit/AssemblyHelpers.h:243 > + move(TrustedImmPtr(m_vm), temp1); > + addPtr(TrustedImm32(VM::calleeSaveRegistersBufferOffset()), temp1); Ditto. > Source/JavaScriptCore/jit/AssemblyHelpers.h:263 > + move(TrustedImmPtr(m_vm), temp1); > + addPtr(TrustedImm32(VM::calleeSaveRegistersBufferOffset()), temp1); Ditto.
Michael Saboff
Comment 3 2015-08-06 15:41:47 PDT
(In reply to comment #2) > Comment on attachment 258398 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=258398&action=review > > LGTM. > > > Source/JavaScriptCore/dfg/DFGOSRExitCompiler64.cpp:260 > > + m_jit.emitMaterializeTagCheckRegisters(); > > + > > I'd add a comment to state that we need the tag check registers to be > materialized for the recoveries below. > > > Source/JavaScriptCore/jit/AssemblyHelpers.h:228 > > + move(TrustedImmPtr(m_vm), temp1); > > + addPtr(TrustedImm32(VM::calleeSaveRegistersBufferOffset()), temp1); > > Why not just move(TrustedImmPtr(m_vm->calleeSaveRegistersBuffer), temp1);? > > > Source/JavaScriptCore/jit/AssemblyHelpers.h:243 > > + move(TrustedImmPtr(m_vm), temp1); > > + addPtr(TrustedImm32(VM::calleeSaveRegistersBufferOffset()), temp1); > > Ditto. > > > Source/JavaScriptCore/jit/AssemblyHelpers.h:263 > > + move(TrustedImmPtr(m_vm), temp1); > > + addPtr(TrustedImm32(VM::calleeSaveRegistersBufferOffset()), temp1); > > Ditto. I made the suggested changes locally.
Michael Saboff
Comment 4 2015-08-06 15:42:02 PDT
Basile Clement
Comment 5 2015-08-31 18:08:17 PDT
*** This bug has been marked as a duplicate of bug 148666 ***
Csaba Osztrogonác
Comment 6 2015-09-14 10:58:49 PDT
Comment on attachment 258398 [details] Patch Cleared review? from attachment 258398 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Note You need to log in before you can comment on or make changes to this bug.