nmaggioni opened a new pull request, #16690: URL: https://github.com/apache/nuttx/pull/16690
## Summary The current `setlogmask` call used in `coredump_dump_syslog` specifies a raw log level instead of a bitmask, and this causes erroneous evaluations later on when that value is checked ([here in lib_syslog.c](https://github.com/NuttX/nuttx/blob/76606745d6b7eff6ade2361d61c4ac9a15db1ee8/libs/libc/syslog/lib_syslog.c#L57), for example). ## Impact With this change, `_alert()` calls are now visible before and after coredumps. ```diff [ 2] [ ALERT] test: arm_hardfault: Hard Fault: [ 2] [ ALERT] test: arm_hardfault: IRQ: 3 regs: <...> [ 2] [ ALERT] test: arm_hardfault: PRIMASK: <...> [ 2] [ ALERT] test: arm_hardfault: PANIC!!! Hard fault [ 2] [ ALERT] test: dump_assert_info: Current Version: <...> [ 2] [ ALERT] test: dump_assert_info: Assertion failed panic: at file: <...> [ 2] [ ALERT] test: up_dump_register: R0: <...> [ 2] [ ALERT] test: dump_stackinfo: User Stack: <...> [ 2] [ ALERT] test: stack_dump: 0x2001e6e0: <...> [ 2] [ ALERT] test: sched_dumpstack: backtrace| 2: <...> [ 2] [ ALERT] test: dump_tasks: PID GROUP PRI POLICY TYPE NPX STATE EVENT SIGMASK STACKBASE STACKSIZE COMMAND [ 2] [ ALERT] test: dump_task: 0 0 0 FIFO <...> [ 2] [ ALERT] test: sched_dumpstack: backtrace| 0: <...> +[ 2] [ ALERT] test: coredump_dump_syslog: Start coredump: [ 2] [ EMERG] test: <base64 coredump...> +[ 2] [ ALERT] test: coredump_dump_syslog: Finish coredump (Compression Enabled). base64 formatted ``` ## Testing These changes were tested on a custom Cortex-M0+ (RP2040) board using NuttX v12.8.0 as the baseline. This should still be compatible with the latest additions to the syslog logic (#16493). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org