Starting with Clang 17 at commit 54225c457a336b1609c6d064b2b606a9238a28b9, attempting to execute the provided reduced programs compiled with clang using -O2 results in a crash at runtime.
Specifically, the crash occurs in the function void bx::await_suspend when the result of q, a null pointer, is dereferenced to call x().
I have confirmed that both reproducers run without triggering sanitizers in my environment (address, memory, undefined, etc.).
Summary
Starting with Clang 17 at commit 54225c457a336b1609c6d064b2b606a9238a28b9, attempting to execute the provided reduced programs compiled with
clang
using-O2
results in a crash at runtime.Specifically, the crash occurs in the function
void bx::await_suspend
when the result ofq
, a null pointer, is dereferenced to callx()
.I have confirmed that both reproducers run without triggering sanitizers in my environment (address, memory, undefined, etc.).
Reproducers
reduced-Version-A.cpp
-- https://godbolt.org/z/bxEf8Tfc6Here is the same reproducer reduced including headers from glibc 2.35 / glibcxx 3.4.30
reduced-Version-B.cpp
-- https://godbolt.org/z/fsaKof3EEReproduction Steps
Latest Clang -- Crashes
Clang At Bisected Commit -- Crashes
Clang Before Bisected Commit -- Does not crash