Commit cecedaa
committed
fix(libsodium): disable GCC static analyzer for libsodium
GCC's -fanalyzer flag, enabled by CONFIG_COMPILER_STATIC_ANALYZER=y,
causes the compiler to hang indefinitely when analyzing libsodium's
elliptic curve code (crypto_core/ed25519/ref10/ed25519_ref10.c). The
-fanalyzer pass performs deep interprocedural static analysis, tracking
symbolic state across all function calls within a translation unit.
The complex field element arithmetic in ed25519_ref10.c (multiply,
square, carry propagation) with many static helper functions visible
in the same translation unit causes combinatorial state explosion in
the analyzer, making GCC's cc1 process run at 100% CPU indefinitely.
In a parallel build, this blocks all dependent steps (linking, binary
generation) while independent steps finish normally, making the build
appear stuck at "Completed 'bootloader'" — the last independent ninja
target to complete.
This is the same approach already used by ESP-IDF for mbedtls,
wpa_supplicant, freertos, and other components with complex code that
triggers pathological behavior in GCC's static analyzer.
Closes espressif/esp-idf#18373
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>1 parent 78a1615 commit cecedaa
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
0 commit comments