Skip to content

Conversation

krobelus
Copy link
Contributor

Linux' arch/mips/include/uapi/asm/signal.h does not define SIGSTKFLT.
For one MIPS architecture, we define it as 7 for unknown reasons,
but 7 is already SIGEMT. This was confusing and is probably useless.
Remove it.

@neheb
Copy link

neheb commented Oct 17, 2025

Relevant musl commit was:

Subject: [PATCH] fix incorrect SIGSTKFLT on all mips archs

signal 7 is SIGEMT on Linux mips* ABI according to the man pages and
kernel. it's not clear where the wrong name came from but it dates
back to original mips commit.
---
 arch/mips/bits/signal.h    | 2 +-
 arch/mips64/bits/signal.h  | 2 +-
 arch/mipsn32/bits/signal.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/bits/signal.h b/arch/mips/bits/signal.h
index e1d97ac7..1b69e762 100644
--- a/arch/mips/bits/signal.h
+++ b/arch/mips/bits/signal.h
@@ -93,7 +93,7 @@ typedef struct __ucontext {
 #define SIGTRAP   5
 #define SIGABRT   6
 #define SIGIOT    SIGABRT
-#define SIGSTKFLT 7
+#define SIGEMT    7
 #define SIGFPE    8
 #define SIGKILL   9
 #define SIGBUS    10
diff --git a/arch/mips64/bits/signal.h b/arch/mips64/bits/signal.h
index c31ad07e..4f91c9fc 100644
--- a/arch/mips64/bits/signal.h
+++ b/arch/mips64/bits/signal.h
@@ -112,7 +112,7 @@ typedef struct __ucontext {
 #define SIGTRAP   5
 #define SIGABRT   6
 #define SIGIOT    SIGABRT
-#define SIGSTKFLT 7
+#define SIGEMT    7
 #define SIGFPE    8
 #define SIGKILL   9
 #define SIGBUS    10
diff --git a/arch/mipsn32/bits/signal.h b/arch/mipsn32/bits/signal.h
index c31ad07e..4f91c9fc 100644
--- a/arch/mipsn32/bits/signal.h
+++ b/arch/mipsn32/bits/signal.h
@@ -112,7 +112,7 @@ typedef struct __ucontext {
 #define SIGTRAP   5
 #define SIGABRT   6
 #define SIGIOT    SIGABRT
-#define SIGSTKFLT 7
+#define SIGEMT    7
 #define SIGFPE    8
 #define SIGKILL   9
 #define SIGBUS    10

Interestingly enough, on OpenWrt's SDK it only fails under 64-bit MIPS. Sounds like the libc crate is broken.

edit: nvm.

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching this! Yeah, it seems it was introduced mistakenly in the past and has been removed at somewhere. Makes sense.

@JohnTitor JohnTitor enabled auto-merge October 21, 2025 22:25
@JohnTitor JohnTitor added this pull request to the merge queue Oct 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 21, 2025
Linux' arch/mips/include/uapi/asm/signal.h does not define SIGSTKFLT.
For one MIPS architecture, we define it as 7 for unknown reasons,
but 7 is already SIGEMT.  This is confusing and probably useless.
Remove it.

[ squashed JohnTitor's commit deleting the changelog entry - Trevor ]
@tgross35
Copy link
Contributor

It's a tier 3 target and the musl patch was applied (kraj/musl@cabc369) so we can just backport this.

@rustbot label +stable-nominated

(used the CI failure as an opportunity to squash the commit, so we don't get a conflict on backport)

@tgross35 tgross35 added this pull request to the merge queue Oct 22, 2025
Merged via the queue into rust-lang:main with commit bf0ea47 Oct 22, 2025
51 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants