Commit a3d4d75
committed
tests: report a compiler diagnostic from a passing cross build
compile_obj and link_bin sent the compiler's stderr to a log and read it
back only when the command failed, so a warning from a build that
succeeded was written to a file and dropped. The cross build is the only
one that compiles a test's arch-gated bodies on their own arch, which
made it the one place a diagnostic could not be seen -- including from
the -Werror= shift and overflow classes, fatal only when they fire as
errors.
The log is now shown whenever it is non-empty, without touching the exit
status: the compiler's verdict stays the compiler's. run_target's output
is collected per target and printed whole, so one header carries the
attribution and the diagnostic keeps its own layout.
With the output visible the flags can matter, so the set the native build
carries applies here too, less three. -Wno-type-limits: the property
generators clamp against per-arch bounds, and a bound that is 0 on s390
makes its comparison tautological there while load-bearing on the other
sixteen. -Wno-unused-function and -Wno-unused-variable: a test binary
links whole shipped translation units and calls part of each, so most of
what it pulls in is legitimately unreached, and silencing that would mean
annotating shipped code to suit a test link. Both are re-enabled for the
two engine translation units, which carry only test code, where they mean
what they mean natively -- a test body no arch reaches. The thirty-five
existing bodies in that position are marked unused, the idiom the file
already uses for helpers reachable from arch-gated tests only.
hardening.c defines all[] in full: only the first nuniq entries carry a
name, but the array is passed to kasld_project_posture as a pointer with
the count as the only bound, and a compiler that cannot prove the read is
count-bounded reports it uninitialised at the empty count.1 parent 765bab7 commit a3d4d75
4 files changed
Lines changed: 111 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
420 | 425 | | |
421 | 426 | | |
422 | 427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
| |||
94 | 111 | | |
95 | 112 | | |
96 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
97 | 130 | | |
98 | 131 | | |
99 | 132 | | |
| |||
109 | 142 | | |
110 | 143 | | |
111 | 144 | | |
| 145 | + | |
112 | 146 | | |
113 | 147 | | |
114 | 148 | | |
| |||
120 | 154 | | |
121 | 155 | | |
122 | 156 | | |
| 157 | + | |
123 | 158 | | |
124 | 159 | | |
125 | 160 | | |
| |||
150 | 185 | | |
151 | 186 | | |
152 | 187 | | |
153 | | - | |
154 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
155 | 196 | | |
156 | 197 | | |
157 | 198 | | |
| |||
0 commit comments