-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
devel/llvm-base: switch to init-all=zero #153
base: main
Are you sure you want to change the base?
Conversation
This is completely untested since I did it on a non-morello system, but I think it's roughly correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With llvm-morello-13.0.d20230914
(the current llvm-morello
version in packages for 23.11) and the suggested fix in wrapper.sh.in
, I get:
$ sh -x /usr/bin/cc -o test test.c
(...)
+ /usr/local64/bin/clang '-ftrivial-auto-var-init=zero' '-march=morello' '-mabi=purecap' -Xclang '-morello-vararg=new' -Xclang '-morello-bounded-memargs=caller-only' -o test test.c
clang-13: error: -ftrivial-auto-var-init=zero hasn't been enabled. Enable it at your own peril for benchmarking purpose only with -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
Note that my llvm-morello version is outdated as we already have a newer version in ports.
I wonder if it makes sense to patch out -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang. I can add the flag in the script, but in the future we'll run into
|
If I understand correctly, Clang 16 and newer don't require With |
Zero bits of the stack the compiler can't prove are initialized before use or escape by default. Issue: CTSRD-CHERI/cheribsd#2045
8a6cdd5
to
59e83af
Compare
I've discussed with @rwatson that we should consider this for the next release but not for the CPM meeting. Once CTSRD-CHERI/cheribsd#2046 is merged into |
I've converted this to a draft as we're not planning to use it now. |
Zero bits of the stack the compiler can't prove are initialized before use or escape by default.
Issue: CTSRD-CHERI/cheribsd#2045
See also: CTSRD-CHERI/cheribsd#2046