[gcmole] Add regression test with multiple safepoints
Bug: v8:13536 Change-Id: I1cac6a34b6948f7e5365c5454ad6d3f928d906d4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4134164 Commit-Queue: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#85111}
This commit is contained in:
parent
ca3a939da8
commit
43fd63554e
@ -349,5 +349,15 @@ void TestGuardedDeadVarAnalysisMidFunction2(Isolate* isolate) {
|
|||||||
raw_obj.Print();
|
raw_obj.Print();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TestGuardedDeadVarAnalysisMultipleSafepoints(Isolate* isolate) {
|
||||||
|
// TODO(https://crbug.com/v8/13536): The analysis points to this safepoint,
|
||||||
|
// while it should point to the one below.
|
||||||
|
Safepoint();
|
||||||
|
JSObject raw_obj = *isolate->factory()->NewJSObjectWithNullProto();
|
||||||
|
DisallowGarbageCollection no_gc;
|
||||||
|
Safepoint();
|
||||||
|
raw_obj.Print();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
} // namespace v8
|
} // namespace v8
|
||||||
|
@ -214,4 +214,13 @@ tools/gcmole/gcmole-test.cc:345:3: note: Call might cause unexpected GC.
|
|||||||
tools/gcmole/gcmole-test.cc:27:1: note: GC call here.
|
tools/gcmole/gcmole-test.cc:27:1: note: GC call here.
|
||||||
Object CauseGCRaw(Object obj, Isolate* isolate) {
|
Object CauseGCRaw(Object obj, Isolate* isolate) {
|
||||||
^
|
^
|
||||||
24 warnings generated.
|
tools/gcmole/gcmole-test.cc:359:3: warning: Possibly stale variable due to GCs.
|
||||||
|
raw_obj.Print();
|
||||||
|
^
|
||||||
|
tools/gcmole/gcmole-test.cc:355:3: note: Call might cause unexpected GC.
|
||||||
|
Safepoint();
|
||||||
|
^
|
||||||
|
tools/gcmole/gcmole-test.cc:19:1: note: GC call here.
|
||||||
|
void Safepoint() { LocalHeap::Current()->Safepoint(); }
|
||||||
|
^
|
||||||
|
25 warnings generated.
|
||||||
|
Loading…
Reference in New Issue
Block a user