Skip to content

Commit

Permalink
[1.8>1.9] [MERGE #4667 @pleath] MSFT:15176668: Port remote stack walk…
Browse files Browse the repository at this point in the history
…er fix

Merge pull request #4667 from pleath:15176668
  • Loading branch information
pleath committed Feb 10, 2018
2 parents 5a1a799 + e8738ca commit e7945af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/Runtime/Base/LeaveScriptObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace Js
{
EnterScriptObject::EnterScriptObject(ScriptContext* scriptContext, ScriptEntryExitRecord* entryExitRecord,
void * addrOfReturnAddress, bool doCleanup, bool isCallRoot, bool hasCaller)
void * returnAddress, void * addrOfReturnAddress, bool doCleanup, bool isCallRoot, bool hasCaller)
{
Assert(scriptContext);

Expand Down Expand Up @@ -35,6 +35,7 @@ namespace Js
false;

// Initialize the entry exit record
entryExitRecord->returnAddrOfScriptEntryFunction = returnAddress;
entryExitRecord->addrOfReturnAddrOfScriptEntryFunction = addrOfReturnAddress;
entryExitRecord->hasCaller = hasCaller;
entryExitRecord->scriptContext = scriptContext;
Expand Down
4 changes: 2 additions & 2 deletions lib/Runtime/Base/LeaveScriptObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Js::ScriptEntryExitRecord __entryExitRecord = {0}; \
SAVE_FS0(); \
Js::EnterScriptObject __enterScriptObject = Js::EnterScriptObject(__localScriptContext, &__entryExitRecord, \
_AddressOfReturnAddress(), doCleanup, isCallRoot, hasCaller); \
_ReturnAddress(), _AddressOfReturnAddress(), doCleanup, isCallRoot, hasCaller); \
__localScriptContext->OnScriptStart(isCallRoot, isScript); \
__enterScriptObject.VerifyEnterScript();

Expand Down Expand Up @@ -137,7 +137,7 @@ namespace Js
JavascriptLibrary* library; // stack pin the library.
public:
EnterScriptObject(ScriptContext* scriptContext, ScriptEntryExitRecord* entryExitRecord,
void * addrOfReturnAddress, bool doCleanup, bool isCallRoot, bool hasCaller);
void * returnAddress, void * addrOfReturnAddress, bool doCleanup, bool isCallRoot, bool hasCaller);

void VerifyEnterScript();

Expand Down
1 change: 1 addition & 0 deletions lib/Runtime/Base/ScriptContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ namespace Js
#endif
Js::ImplicitCallFlags savedImplicitCallFlags;

void * returnAddrOfScriptEntryFunction;
void * addrOfReturnAddrOfScriptEntryFunction;
void * frameIdOfScriptExitFunction; // the frameAddres in x86, the return address in amd64/arm_soc
ScriptContext * scriptContext;
Expand Down

0 comments on commit e7945af

Please sign in to comment.