Skip to content

Commit

Permalink
Merge pull request #134 from Sonicadvance1/fix_stack_bug
Browse files Browse the repository at this point in the history
Fixes accessing a stack variable post destruction bug
  • Loading branch information
Sonicadvance1 authored Apr 24, 2020
2 parents b2beb6f + 11c341f commit f2f2d9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ void InterpreterCore::ExecuteCode(FEXCore::Core::InternalThreadState *Thread) {
#define GD *GetDest<uint64_t*>(*WrapperOp)
#define GDP GetDest<void*>(*WrapperOp)
auto GetOpSize = [&](IR::OrderedNodeWrapper Node) {
auto Wrapper = CurrentIR->at(Node)();
FEXCore::IR::OrderedNode *RealNode = Wrapper->GetNode(ListBegin);
FEXCore::IR::IROp_Header *IROp = RealNode->Op(DataBegin);
FEXCore::IR::OrderedNode const *RealNode = Node.GetNode(ListBegin);
FEXCore::IR::IROp_Header const *IROp = RealNode->Op(DataBegin);
return IROp->Size;
};

Expand Down
7 changes: 0 additions & 7 deletions External/FEXCore/Source/Interface/Core/JIT/Arm64/JIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,6 @@ void *JITCore::CompileCode([[maybe_unused]] FEXCore::IR::IRListView<true> const

IR::OrderedNode *BlockNode = HeaderOp->Blocks.GetNode(ListBegin);

auto GetOpSize = [&](IR::OrderedNodeWrapper Node) {
auto Wrapper = CurrentIR->at(Node)();
FEXCore::IR::OrderedNode *RealNode = Wrapper->GetNode(ListBegin);
FEXCore::IR::IROp_Header *IROp = RealNode->Op(DataBegin);
return IROp->Size;
};

while (1) {
using namespace FEXCore::IR;
auto BlockIROp = BlockNode->Op(DataBegin)->CW<FEXCore::IR::IROp_CodeBlock>();
Expand Down

0 comments on commit f2f2d9f

Please sign in to comment.