Sarthak-Pandey commented on PR #3859:
URL: https://github.com/apache/nuttx-apps/pull/3859#issuecomment-6629556910

   @casaroli ,
   For the Makefile comment (signal guard):
   
   Thanks for the review @casaroli! Good catch — I've updated the Makefile to 
conditionally enable DUK_CMDLINE_SIGNAL only when CONFIG_ENABLE_ALL_SIGNALS=y:
   
   makefile
   ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y)
   CFLAGS += -DDUK_CMDLINE_SIGNAL
   endif
   
   This ensures that on boards with CONFIG_ENABLE_PARTIAL_SIGNALS or 
CONFIG_DISABLE_ALL_SIGNALS, the signal handler code is excluded entirely and 
duk_cmdline_timeout_check() returns 0 (no-op fallback), so the build won't 
break.
   
   For the Testing comment (runtime log):
   
   You're right, I've updated the testing description. Here's the runtime 
verification:
   
   Built NuttX with Duktape for ESP32 (CONFIG_ENABLE_ALL_SIGNALS=y)
   Started duk interactive REPL
   Ran a long script: while(true) { print("running"); }
   Pressed Ctrl+C — Duktape exited cleanly with code 130 (no crash, no panic)
   Ran duk again immediately — started successfully without any heap corruption
   
   Without this patch, step 5 crashes the board due to leaked heap state.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to