masayuki2009 commented on pull request #3698:
URL: https://github.com/apache/incubator-nuttx/pull/3698#issuecomment-848340527


   >we have to merge this PR and apache/incubator-nuttx-apps#710 together. And 
watch the potential(unlikely) build break.
   
   @xiaoxiang781216 
   I tried both branches with sabre-6quad:smp (QEMU).
   
   ```
   CC:  task/task_spawn.c
   In file included from 
/mnt/m2ssd/opensource/github_xiang/nuttx-xiang/include/nuttx/mm/shm.h:30,
                    from 
/mnt/m2ssd/opensource/github_xiang/nuttx-xiang/include/nuttx/sched.h:41,
                    from 
/mnt/m2ssd/opensource/github_xiang/nuttx-xiang/include/sched.h:36,
                    from task/task_spawn.c:28:
   task/task_spawn.c: In function 'task_spawn':
   task/task_spawn.c:321:9: warning: format '%p' expects argument of type 'void 
*', but argument 3 has type 'int' [-Wformat=]
     321 |   sinfo("pid=%p name=%s entry=%p file_actions=%p attr=%p argv=%p\n",
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     322 |         pid, name, entry, file_actions, attr, argv);
         |         ~~~
         |         |
         |         int
   task/task_spawn.c:321:15: note: format string is defined here
     321 |   sinfo("pid=%p name=%s entry=%p file_actions=%p attr=%p argv=%p\n",
         |              ~^
         |               |
         |               void *
         |              %d
   task/task_spawn.c:332:32: warning: passing argument 1 of 'nxtask_spawn_exec' 
makes pointer from integer without a cast [-Wint-conversion]
     332 |       return nxtask_spawn_exec(pid, name, entry, attr, argv);
         |                                ^~~
         |                                |
         |                                pid_t {aka short int}
   task/task_spawn.c:87:41: note: expected 'pid_t *' {aka 'short int *'} but 
argument is of type 'pid_t' {aka 'short int'}
      87 | static int nxtask_spawn_exec(FAR pid_t *pidp, FAR const char *name,
         |                                  ~~~~~~~^~~~
   task/task_spawn.c:332:14: warning: 'pid' may be used uninitialized in this 
function [-Wmaybe-uninitialized]
     332 |       return nxtask_spawn_exec(pid, name, entry, attr, argv);
         |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ```
   
   ```
   nsh> ps
     PID CPU PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK   STACK   USED 
 FILLED COMMAND
       0   0   0 FIFO     Kthread N-- Assigned           00000000 001024 000392 
 38.2%  CPU0 IDLE
       1   1   0 FIFO     Kthread N-- Running            00000000 001024 000208 
 20.3%  CPU1 IDLE
       2   2   0 FIFO     Kthread N-- Running            00000000 001024 000208 
 20.3%  CPU2 IDLE
       3   3   0 FIFO     Kthread N-- Running            00000000 001024 000208 
 20.3%  CPU3 IDLE
       5 --- 192 RR       Kthread --- Waiting  Signal    00000000 002032 000192 
  9.4%  hpwork
       6   0 100 RR       Task    --- Running            00000000 002032 000992 
 48.8%  init
   nsh> hello
   arm_dataabort: Data abort. PC: 10813ca8 DFAR: 00001081 DFSR: 0000080d
   up_assert: Assertion failed CPU0 at file:armv7-a/arm_dataabort.c line: 160 
task: init
   up_registerdump: R0: 00000007 00000000 00000000 00000000 00000000 10832808 
00001081 108229ba
   up_registerdump: R8: 1081766c 1081766c 10832808 fffffff1 1082ea60 10832798 
108024a0 10813ca8
   up_registerdump: CPSR: 20000053
   up_dumpstate: Current sp: 10832670
   up_dumpstate: Interrupt stack:
   up_dumpstate:   base: 1082aa38
   up_dumpstate:   size: 00000800
   up_dumpstate:   used: 000000d8
   up_dumpstate: User stack:
   up_dumpstate:   base: 108321c0
   up_dumpstate:   size: 000007f0
   up_dumpstate:   used: 0000042c
   up_dumpstate: ERROR: Stack pointer is not within the interrupt stack
   ```


-- 
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.

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


Reply via email to