From 28fb52434aa4bb884967c7de3dc22bf5b6cfc700 Mon Sep 17 00:00:00 2001 From: salh Date: Fri, 17 Apr 2026 23:49:07 +0300 Subject: [PATCH] Fix syntax error with UnresolvedJump isConditional property name --- .../rexglue-sdk/src/codegen/phase_gapfill.cpp | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/thirdparty/rexglue-sdk/src/codegen/phase_gapfill.cpp b/thirdparty/rexglue-sdk/src/codegen/phase_gapfill.cpp index 6eeda28b..be5b7368 100644 --- a/thirdparty/rexglue-sdk/src/codegen/phase_gapfill.cpp +++ b/thirdparty/rexglue-sdk/src/codegen/phase_gapfill.cpp @@ -196,13 +196,28 @@ void cleanupAbsorbedGapFills(CodegenContext& ctx) { continue; // This GAP_FILL is inside another function's blocks - if (otherNode->authority() != FunctionAuthority::GAP_FILL) { - // Absorbed by higher authority - remove - toRemove.push_back(addr); - break; - } else if (otherAddr < addr) { - // Both GAP_FILL, other has lower address - it survives + if (otherNode->authority() != FunctionAuthority::GAP_FILL || otherAddr < addr) { + // Absorbed by higher authority or lower-address GAP_FILL - remove it, but merge first toRemove.push_back(addr); + + for (const auto& block : node->blocks()) { + graph.addBlockToFunction(otherAddr, block); + } + for (auto label : node->labels()) { + graph.addLabelToFunction(otherAddr, label); + } + for (const auto& call : node->calls()) { + graph.addCallToFunction(otherAddr, call.site, call.target); + } + for (const auto& call : node->tailCalls()) { + graph.addTailCallToFunction(otherAddr, call.site, call.target); + } + for (const auto& jt : node->jumpTables()) { + graph.addJumpTableToFunction(otherAddr, jt); + } + for (const auto& jump : node->unresolvedJumps()) { + graph.addUnresolvedJumpToFunction(otherAddr, jump.site, jump.target, jump.isCall, jump.isConditional); + } break; } }