Zhangshoukui commented on PR #15326: URL: https://github.com/apache/nuttx/pull/15326#issuecomment-2562432837
./netutils/rexec/rexec.c: char cmd[CONFIG_NSH_LINELEN]; ./nshlib/nsh_timcmds.c: char buffer[CONFIG_NSH_LINELEN]; ./nshlib/nsh_timcmds.c: strlcpy(buffer, cmd, CONFIG_NSH_LINELEN); ./nshlib/nsh_parse.c: char sh_arg2[CONFIG_NSH_LINELEN]; ./nshlib/nsh_parse.c: char tracebuf[CONFIG_NSH_LINELEN + 1]; ./nshlib/nsh_parse.c: char sh_arg2[CONFIG_NSH_LINELEN]; ./nshlib/nsh.h:#ifndef CONFIG_NSH_LINELEN ./nshlib/nsh.h:# define CONFIG_NSH_LINELEN 80 ./nshlib/Kconfig:config NSH_LINELEN ./nshlib/nsh_telnetlogin.c: if (readline_fd(pstate->cn_line, CONFIG_NSH_LINELEN, ./nshlib/nsh_telnetlogin.c: ret = readline_fd(pstate->cn_line, CONFIG_NSH_LINELEN, ./nshlib/nsh_session.c: ret = cle_fd(pstate->cn_line, nsh_prompt(), CONFIG_NSH_LINELEN, ./nshlib/nsh_session.c: ret = readline_fd(pstate->cn_line, CONFIG_NSH_LINELEN, ./nshlib/nsh_login.c: ret = readline_fd(pstate->cn_line, CONFIG_NSH_LINELEN, ./nshlib/nsh_login.c: ret = readline_fd(pstate->cn_line, CONFIG_NSH_LINELEN, ./nshlib/nsh_console.h: char cn_line[CONFIG_NSH_LINELEN]; ./nshlib/nsh_script.c: ret = readline_fd(buffer, CONFIG_NSH_LINELEN, vtbl->np.np_fd, -1); ./nshlib/nsh_mmcmds.c: char arg[CONFIG_NSH_LINELEN] = ""; ./nshlib/nsh_mmcmds.c: strlcpy(arg, "used", CONFIG_NSH_LINELEN); ./nshlib/nsh_mmcmds.c: strlcat(arg, argv[i], CONFIG_NSH_LINELEN); ./nshlib/nsh_mmcmds.c: strlcat(arg, " ", CONFIG_NSH_LINELEN); ./examples/lp503x/lp503x_main.c: char buffer[CONFIG_NSH_LINELEN]; ./system/nxlooper/nxlooper_main.c: char buffer[CONFIG_NSH_LINELEN]; ./system/readline/readline.c:#ifndef CONFIG_NSH_LINELEN ./system/readline/readline.c:# define CONFIG_NSH_LINELEN 80 ./system/readline/readline.c: FAR char *line = malloc(CONFIG_NSH_LINELEN); ./system/readline/readline.c: if (readline_fd(line, CONFIG_NSH_LINELEN, ./system/nxrecorder/nxrecorder_main.c: char buffer[CONFIG_NSH_LINELEN]; ./system/taskset/taskset.c: char command[CONFIG_NSH_LINELEN]; ./system/taskset/taskset.c: * NOTE: total length does not exceed CONFIG_NSH_LINELEN ./system/nxcamera/nxcamera_main.c: char buffer[CONFIG_NSH_LINELEN]; ./system/trace/trace.c: char command[CONFIG_NSH_LINELEN]; ./system/nxplayer/nxplayer_main.c: char buffer[CONFIG_NSH_LINELEN]; The main thing is that when CONFIG_NSH_LINELEN is configured to 256, the 2k stack is not enough for some scenarios, such as popen to invoke a simple command on a real device not sim My plan was to removeļ¼ CONFIG_SYSTEM_CLE_CMD_HISTORY_LINELEN CONFIG_SYSTEM_CLE_CMD_HISTORY_LEN CONFIG_NSH_LINELEN CONFIG_PROCFS_LINELEN CONFIG_HELP_LINELEN and use LINE_MAX and lib_get_tempbuffer To save stack consumption and avoid memory fragmentation @anchao -- 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