Skip to content

Commit a26b8ce

Browse files
authored
fix safe-heap regression with handling of existing imports (#1237)
1 parent 0ebb699 commit a26b8ce

3 files changed

Lines changed: 4050 additions & 2 deletions

File tree

src/passes/SafeHeap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ struct SafeHeap : public Pass {
127127
module->addImport(import);
128128
}
129129
if (auto* existing = ImportUtils::getImport(*module, ENV, SEGFAULT_IMPORT)) {
130-
dynamicTopPtr = existing->name;
130+
segfault = existing->name;
131131
} else {
132132
auto* import = new Import;
133133
import->name = segfault = SEGFAULT_IMPORT;
@@ -138,7 +138,7 @@ struct SafeHeap : public Pass {
138138
module->addImport(import);
139139
}
140140
if (auto* existing = ImportUtils::getImport(*module, ENV, ALIGNFAULT_IMPORT)) {
141-
dynamicTopPtr = existing->name;
141+
alignfault = existing->name;
142142
} else {
143143
auto* import = new Import;
144144
import->name = alignfault = ALIGNFAULT_IMPORT;

0 commit comments

Comments
 (0)