You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "cederom (via GitHub)" <gi...@apache.org> on 2025/03/17 04:29:02 UTC

[PR] examples/xmlrpc: Fix calls buffers size. [nuttx-apps]

cederom opened a new pull request, #3027:
URL: https://github.com/apache/nuttx-apps/pull/3027

   ## Summary
   
   * examples/xmlrpc/calls.c used 80 bytes call buffers.
   * update buffers to CONFIG_XMLRPC_STRINGSIZE+1 that is build time configurable.
   * this keeps buffers size coherent with configuration.
   
   ## Impact
   
   * xmlrpc strings and buffers are now equal in size that prevents overflows.
   
   ## Testing
   
   Please help in runtime testing :-)
   
   ```
   % uname -a
   FreeBSD octagon 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
   
   % ./tools/configure.sh -B esp32-devkitc:wifinsh
   
   % gmake menuconfig <- enable apps / examples / xmlrpc.
   
   % kconfig-diff
    BASE_DEFCONFIG "esp32-devkitc:wifinsh" -> "esp32-devkitc:wifinsh-dirty"
    EXAMPLES_XMLRPC n -> y
    NETUTILS_XMLRPC n -> y
   +EXAMPLES_XMLRPC_BUFFERSIZE 1024
   +XMLRPC_STRINGSIZE 64
   
   % gmake -j8
   Create version.h
   Cloning Espressif HAL for 3rd Party Platforms
   Clone: chip/esp-hal-3rdparty
   Downloading: v1.7.12.tar.gz
   Unpacking: v1.7.12.tar.gz -> cJSON
   Register: xmlrpc
   Register: renew
   Register: nsh
   Register: ping
   Register: sh
   Register: telnetd
   Register: wapi
   Espressif HAL for 3rd Party Platforms: e5cef265cca9d272c428d210453d574bcc25c5f4
   Espressif HAL for 3rd Party Platforms: initializing submodules...
   Applying patches...
   CPP:  /XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld-> /XXX/nuttx.git/arch/xtensa/src/chip/esp-hal-3rdparty/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld.tmpLD: nuttx
   Memory region         Used Size  Region Size  %age Used
                ROM:      776692 B    4194272 B     18.52%
        iram0_0_seg:      128812 B       168 KB     74.88%
        irom0_0_seg:      580084 B    3342304 B     17.36%
        dram0_0_seg:       73064 B     180736 B     40.43%
        drom0_0_seg:      139276 B    4194272 B      3.32%
       rtc_iram_seg:          0 GB         8 KB      0.00%
       rtc_slow_seg:          0 GB         4 KB      0.00%
         extmem_seg:          0 GB         4 MB      0.00%
   CP: nuttx.hex
   MKIMAGE: ESP32 binary
   esptool.py -c esp32 elf2image --ram-only-header -fs 4MB -fm dio -ff 40m -o nuttx.bin nuttx
   esptool.py v4.8.1
   Creating esp32 image...
   Image has only RAM segments visible. ROM segments are hidden and SHA256 digest is not appended.
   Merged 1 ELF section
   Successfully created esp32 image.
   Generated: nuttx.bin
   
   ```


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] examples/xmlrpc: Fix calls buffers size. [nuttx-apps]

Posted by "cederom (via GitHub)" <gi...@apache.org>.
cederom commented on PR #3027:
URL: https://github.com/apache/nuttx-apps/pull/3027#issuecomment-2741632810

   Variables updated: `lastCommand -> lastcmd; curState -> curstate` :-)
   
   ```
   % gmake -j8
   Create version.h
   Downloading: v1.7.12.tar.gz
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Cloning Espressif HAL for 3rd Party Platforms
   Clone: chip/esp-hal-3rdparty LN: platform/board to /XXX/nuttx-apps.git/platform/dummy
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
   100  340k  100  340k    0     0   473k      0 --:--:-- --:--:-- --:--:--  473k
   Unpacking: v1.7.12.tar.gz -> cJSON
   Register: xmlrpc
   Register: renew
   Register: ping
   Register: nsh
   Register: sh
   Register: telnetd
   Register: wapi
   Espressif HAL for 3rd Party Platforms: e5cef265cca9d272c428d210453d574bcc25c5f4
   Espressif HAL for 3rd Party Platforms: initializing submodules...
   Applying patches...
   (..)
   Memory region         Used Size  Region Size  %age Used
                ROM:      776692 B    4194272 B     18.52%
        iram0_0_seg:      128812 B       168 KB     74.88%
        irom0_0_seg:      580084 B    3342304 B     17.36%
        dram0_0_seg:       73064 B     180736 B     40.43%
        drom0_0_seg:      139276 B    4194272 B      3.32%
       rtc_iram_seg:          0 GB         8 KB      0.00%
       rtc_slow_seg:          0 GB         4 KB      0.00%
         extmem_seg:          0 GB         4 MB      0.00%
   CP: nuttx.hex
   MKIMAGE: ESP32 binary
   esptool.py -c esp32 elf2image --ram-only-header -fs 4MB -fm dio -ff 40m -o nuttx.bin nuttx
   esptool.py v4.8.1
   Creating esp32 image...
   Image has only RAM segments visible. ROM segments are hidden and SHA256 digest is not appended.
   Merged 1 ELF section
   Successfully created esp32 image.
   Generated: nuttx.bin
   ```


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] examples/xmlrpc: Fix calls buffers size. [nuttx-apps]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #3027:
URL: https://github.com/apache/nuttx-apps/pull/3027#issuecomment-2733480912

   @cederom suggestion: lastCommand -> lastcmd; curState -> curstate


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] examples/xmlrpc: Fix calls buffers size. [nuttx-apps]

Posted by "cederom (via GitHub)" <gi...@apache.org>.
cederom commented on PR #3027:
URL: https://github.com/apache/nuttx-apps/pull/3027#issuecomment-2728149647

   Formatting issues, sorry, will fix after a short sleep mode (6AM here) :-)


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] examples/xmlrpc: Fix calls buffers size. [nuttx-apps]

Posted by "lupyuen (via GitHub)" <gi...@apache.org>.
lupyuen merged PR #3027:
URL: https://github.com/apache/nuttx-apps/pull/3027


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org