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.
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