Commit eeaf7c86 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[inspector][fuzzer] Fix alloc-dealloc-mismatch

Asan complains about the alloc-dealloc-mismatch because the startup data
is allocated via "new[]" in snapshot.cc and deallocated via "delete" in
inspector-test.cc.
A more failure-proof fix would be to have {StartupData} manage the
lifetime of the contained char*, but since this is in an API object, the
refactoring might be more involved. Since other users also just dealloc
explicitly via "delete[]", this CL just fixes the issue in
inspector-test.cc.

R=szuend@chromium.org

Bug: chromium:1142437, v8:11107
Change-Id: I84438b2f12ce8eb6b653d4861e899a2f003e1227
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2523200
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71045}
parent d94afe66
......@@ -797,7 +797,7 @@ int InspectorTestMain(int argc, char* argv[]) {
backend_runner.Join();
UtilsExtension::ClearAllSessions();
delete startup_data.data;
delete[] startup_data.data;
// TaskRunners go out of scope here, which causes Isolate teardown and all
// running background tasks to be properly joined.
......
......@@ -170,7 +170,6 @@
# There are still memory leaks in some inspector tests
# (https://crbug.com/v8/11107).
'runtime/evaluate-async': [SKIP],
'debugger/step-snapshot': [SKIP],
}], # asan == True
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment