mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibJS: Don't try to merge unterminated BasicBlocks
This was causing a Segfault, trying to access the non-present terminator
This commit is contained in:
parent
1c8adac442
commit
5506951ffb
Notes:
sideshowbarker
2024-07-17 11:33:34 +09:00
Author: https://github.com/Hendiadyoin1
Commit: 5506951ffb
Pull-request: https://github.com/SerenityOS/serenity/pull/17563
Reviewed-by: https://github.com/Popaulol ✅
1 changed files with 3 additions and 0 deletions
|
@ -30,6 +30,9 @@ void MergeBlocks::perform(PassPipelineExecutable& executable)
|
|||
if (executable.exported_blocks->contains(*entry.value.begin()))
|
||||
continue;
|
||||
|
||||
if (!entry.key->is_terminated())
|
||||
continue;
|
||||
|
||||
if (entry.key->terminator()->type() != Instruction::Type::Jump)
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue