-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Setting CONFIG_COMPILER_STATIC_ANALYZER=y causes basic console example to crash (IDFGH-14094) #14905
Comments
Output of
|
Thanks for the detailed report, we can reproduce it as well. AFAICT, it's like a bug introduced by |
As @suda-morris already mentioned, the problem is esp_ringbuf. We return We'll update this. thanks for the report. |
…STATIC_ANALYZER ESP_STATIC_ANALYZER_CHECK was added to remove some static analyzer warning about null pointer dereferences that should never happen, but the logic was wrong. We return pdFALSE if prvReceiveGeneric was called with any of the input pointers as NULL, but pvItem2 and xItemSize2 will only be non-null for split buffers. Closes #14905
We return pdFALSE if prvReceiveGeneric was called with any of the input pointers as NULL, but pvItem2 and xItemSize2 will only be non-null for split buffers. Closes #14905
Answers checklist.
IDF version.
v5.4-dev-4291-g7a305c0284
Espressif SoC revision.
ESP32-S3 (QFN56) (revision v0.2)
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3-DevKitC-1-N8R8
Power Supply used.
USB
What is the expected behavior?
The "basic" esp_console example at https://github.com/espressif/esp-idf/tree/master/examples/system/console/basic executes normally
What is the actual behavior?
The "basic" esp_console example at https://github.com/espressif/esp-idf/tree/master/examples/system/console/basic panics at start if the kconfig option
CONFIG_COMPILER_STATIC_ANALYZER=y
is set (!).Steps to reproduce.
master
branch of esp-idf, run:-fanalyze
to the compiler):Debug Logs.
More Information.
Yes, this is extremely bizarre, but I can 100% reproduce the panic on three different devices: a generic/no-name esp32 chip rev v3.1, and two different esp32s3 boards I have including an an Espressif ESP32-S3-DevKitC-1-N8R8.
The panic is triggered after the
linenoise
library tries on init to send an ANSI escape code to the terminal and read its response.As far as I can tell,
CONFIG_COMPILER_STATIC_ANALYZER=y
just adds the-fanalyzer
flag to GCC when compiling, which I don't think is supposed to change the build artifact. So this could be a compiler bug.The text was updated successfully, but these errors were encountered: