Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: spectre options don't apply to dependent packages #40866
Maybe I am holding things wrong, but it seems like the spectre mitigations are only applying to the main package, not the entire program? (Perhaps this only applies to retpoline, I haven't checked nospec indexing yet).
Below is a minimal repro. I initially discovered this when building a large application and finding repoline calls only in package main, where it is implausible that nothing else in the program would be eligible.
What version of Go are you using (
This seems to apply to the index mitigation as well: