You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of investigating failures with BOLT when upgrading to LLVM
19, I found and fixed a few issues with BOLT.
First, `test_embed` had been segfaulting on BOLT instrumented binaries.
Why I'm not entirely sure. But the segfault only seems to occur in
instrumentation mode. These tests are doing low-level things with the
interpreter. So I suspect some kind of global mutable state issue
or something.
I found the exact tests triggering the segfaults and added annotations
to skip them.
The CPython build system treats the segfault as fatal on 3.13 but
not 3.12. This means that on 3.12 we were only running a subset of tests
and not collecting BOLT instrumentation nor applying optimizations for
all tests after `test_embed`.
The removal of the segfault enables us to enable BOLT on 3.13+.
Second, LLVM 19.x has a hard error when handling PIC compiled functions
containing computed gotos. It appears prior versions of LLVM could
silently have buggy behavior in this scenario. We need to skip functions
with computed gotos to allow LLVM 19.x to work with BOLT. It makes sense
to apply this patch before LLVM 19.x upgrade to prevent bugs with
computed gotos.
Third, I noticed BOLT was complaining about the lack of
`-update-debug-sections` during instrumentation.
The 2nd and 3rd issues require common arguments to both BOLT
instrumentation and application invocations. The patch fixing both
introduces a new configure variable to hold common BOLT arguments.
This patch is a good candidate for upstreaming.
0 commit comments