the problem is that the new SIGWORK is defined by CONFIG_SIG_WORK to 17 without condition

but SIGCHLD is configured by CONFIG_SIG_CHLD , but this var depends on SCHED_HAVE_PARENT, this var is not defined in my build and SIGCHLD defaults to 17 in code.

So something is wrong, SIGCHLD shoud not be used at all in the code if SCHED_HAVE_PARENT is not defined


This works:

----------

diff --git a/libs/libc/string/lib_strsignal.c b/libs/libc/string/lib_strsignal.c
index 2237dcf749..741005f262 100644
--- a/libs/libc/string/lib_strsignal.c
+++ b/libs/libc/string/lib_strsignal.c
@@ -113,10 +113,12 @@ FAR char *strsignal(int signum)
         return (FAR char *)"SIGALRM";
 #endif

+#ifdef CONFIG_SCHED_HAVE_PARENT
 #ifdef SIGCHLD
       case SIGCHLD:
         return (FAR char *)"SIGCHLD";
 #endif
+#endif

 #ifdef SIGPOLL
       case SIGPOLL:

----------

Sebastien


On 3/7/23 09:50, alin.jerpe...@sony.com wrote:
Hi Sebastien,

I checked the logs and the lib_strsignal.c is untouched for a long time
I would start debugging with make -j1

Best regards
Alin


-----Original Message-----
From: Sebastien Lorquet <sebast...@lorquet.fr>
Sent: den 7 mars 2023 09:26
To: dev@nuttx.apache.org
Subject: NuttX is broken

What is this?

NuttX is broken.

I ran make distclean, used the same defconfig, and I get this:


CC:  string/lib_strsignal.c string/lib_strsignal.c: In function 'strsignal':
string/lib_strsignal.c:169:7: error: duplicate case value
    169 |       case SIGWORK:
        |       ^~~~
string/lib_strsignal.c:117:7: note: previously used here
    117 |       case SIGCHLD:
        |       ^~~~
make[1]: *** [Makefile:134: bin//lib_strsignal.o] Error 1
make: *** [tools/LibTargets.mk:180: libs/libc/libc.a] Error 2

Please stop the commit race and stop breaking nuttx


While having a look at this file I just found this:

/* We don't know what signals names will be assigned to which signals in
   * advance and we do not want to return a volatile value.  One solution is
   * this silly array of useless names:
   */

static FAR const char *g_default_sigstr[32] = {
    "Signal 0",
    "Signal 1",
    "Signal 2",
    "Signal 3",
    "Signal 4",
    "Signal 5",
    "Signal 6",
    "Signal 7",
    "Signal 8",
    "Signal 9",
    "Signal 10",
    "Signal 11",
    "Signal 12",
    "Signal 13",
    "Signal 14",
    "Signal 15",
    "Signal 16",
    "Signal 17",
    "Signal 18",
    "Signal 19",
    "Signal 20",
    "Signal 21",
    "Signal 22",
    "Signal 23",
    "Signal 24",
    "Signal 25",
    "Signal 26",
    "Signal 27",
    "Signal 28",
    "Signal 29",
    "Signal 30",
    "Signal 31",
};

What the actual FUCK, and I mean it, is THIS?

What does this comment mean? Who is WE?

Who has gigabytes of flash to waste to such garbage?

Who has accepted that commit?

Is anyone aware of the sprintf function?

Sebastien

Reply via email to