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
Optimized x86-64 GNU/Linux builds can perform invalid stack writes in the HACL SHA-2 and BLAKE2 compressors because BOLT's allocation combiner removes their required stack allocation while retaining frame-pointer-relative accesses below the red zone. Extend -skip-funcs for the affected compressor symbols so BOLT leaves these functions intact while continuing to optimize the rest of the interpreter.
I dunno why we'd turn that off broadly instead of skipping the relevant functions, I imagine it would affect performance?
The identified functions are those in which we know that the stack redline is being violated. There could be others. Disabling frame optimization would prevent cases in other, yet unknown, functions.
Codex did not find any other functions with unsafe stack-frame removal resulting from BOLT outside the HACL related one. These function are implemented in assembly verified C so excluding them from additional optimization is reasonable.
FWIW this issue only occurs because frame pointer/leaf from pointer are included (-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer). Prior to this change the functions use stack pointer based access which is detected by BOLT's allocation combiner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Optimized x86-64 GNU/Linux builds can perform invalid stack writes in the HACL SHA-2 and BLAKE2 compressors because BOLT's allocation combiner removes their required stack allocation while retaining frame-pointer-relative accesses below the red zone. Extend
-skip-funcsfor the affected compressor symbols so BOLT leaves these functions intact while continuing to optimize the rest of the interpreter.See #1186