From 093e7e2a8613f5d1ba563ff7cd4ead1b3098537c Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Tue, 31 Jan 2023 08:46:12 -0500 Subject: [PATCH] Ladybird: Exit Ladybird normally during dump-layout-tree mode Don't use _exit() - this is a forceful exit that will bypass all exit handlers. This includes AddressSanitizer, and will prevent ASan from exiting the app with a fatal error code. --- Ladybird/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Ladybird/main.cpp b/Ladybird/main.cpp index e5107dada1..319dfe1879 100644 --- a/Ladybird/main.cpp +++ b/Ladybird/main.cpp @@ -87,8 +87,11 @@ ErrorOr serenity_main(Main::Arguments arguments) auto dump = view.dump_layout_tree().release_value_but_fixme_should_propagate_errors(); outln("{}", dump); fflush(stdout); - _exit(0); + + event_loop.quit(0); + app.quit(); }; + view.load(url); return app.exec(); }