This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 41a2c9d98 system/uorb: Select the printf extension the format strings 
need.
41a2c9d98 is described below

commit 41a2c9d98224a0fc816abda37e75c88f1a80ee99
Author: Justin Hammond <[email protected]>
AuthorDate: Sun Sep 20 16:53:00 2026 +0800

    system/uorb: Select the printf extension the format strings need.
    
    Every topic's format string is printed through orb_info() or
    orb_fprintf(), and both reach the data through "%pB", which is a NuttX
    extension rather than a standard conversion.  UORB_FORMAT turns that
    code on without turning the extension on, so a configuration that
    enables the listener but not the debug output builds cleanly, runs, and
    prints a pointer where the reading should be:
    
      sensor_voltage(now:4294968998000):0xc0203c98B
    
    The address is the va_format the extension was supposed to expand, and
    the trailing B is the conversion character being taken as ordinary
    text.  Nothing warns, because to the compiler and to printf this is a
    valid format string that means something else.
    
    DEBUG_UORB already selects the extension, so the fault is invisible to
    anyone who turned that on.  The two are independent options and only
    one of them declared what it needed.  Move the select onto UORB_FORMAT,
    which is the option that decides whether the format strings are
    compiled in at all.
    
    Signed-off-by: Justin Hammond <[email protected]>
---
 system/uorb/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/system/uorb/Kconfig b/system/uorb/Kconfig
index 71f06e504..e72ae4f60 100644
--- a/system/uorb/Kconfig
+++ b/system/uorb/Kconfig
@@ -20,6 +20,7 @@ config UORB_STACKSIZE
 
 config UORB_FORMAT
        bool
+       select LIBC_PRINT_EXTENSION
        default n
 
 config UORB_LISTENER

Reply via email to