Skip to content

Commit 638cdb8

Browse files
authored
Update v8 patch to fix ASAN issue detected by clang-18 (envoyproxy#38610)
This is a workaround to help us migrate to clang-18 for Envoy CI. clang-18 detected a "use-after-free" type of issue in v8 code and that fails Envoy CI ASAN runs. This issue was fixed upstream already (see v8/v8@df459f0) and updating v8 should resolve the problem. However for now I'm working around that with a patch update because: 1. Updating v8 will fix this problem, but might also introduce new issues, so I'd like to finish with clang-18 migration for now and update v8 once clang-18 migration is settled 2. v8 is a bit of special dependency, as Envoy does not use upstream v8 directly but instead relies on some kind of processed version, that's probably one of the reasons why we don't update v8 as often. NOTE: I filed a bug to consider streamlining v8 updates to work on it once we are done with clang-18 migration: envoyproxy#38609 Related to envoyproxy#37911 and fixes one of the issues that block clang-18 adoption in Envoy CI (specifically addresses one of the failures in envoyproxy#38571). Signed-off-by: Mikhail Krinkin <[email protected]>
1 parent 04955ac commit 638cdb8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

bazel/v8.patch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@ index e957c0f..0327669 100644
7171
}),
7272
includes = ["include"],
7373
linkopts = select({
74+
diff --git a/src/compiler/control-equivalence.cc b/src/compiler/control-equivalence.cc
75+
index 4649cf0..6fc6e57 100644
76+
--- a/src/compiler/control-equivalence.cc
77+
+++ b/src/compiler/control-equivalence.cc
78+
@@ -157,8 +157,8 @@ void ControlEquivalence::RunUndirectedDFS(Node* exit) {
79+
// Pop node from stack when done with all inputs and uses.
80+
DCHECK(entry.input == node->input_edges().end());
81+
DCHECK(entry.use == node->use_edges().end());
82+
- DFSPop(stack, node);
83+
VisitPost(node, entry.parent_node, entry.direction);
84+
+ DFSPop(stack, node);
85+
}
86+
}
87+
7488
diff --git a/src/wasm/c-api.cc b/src/wasm/c-api.cc
7589
index 4473e20..65a6ec7 100644
7690
--- a/src/wasm/c-api.cc

0 commit comments

Comments
 (0)