Fix missing return in test function causing SIGILL with GCC 14#330
Merged
yxieca merged 2 commits intosonic-net:masterfrom Apr 3, 2026
Merged
Fix missing return in test function causing SIGILL with GCC 14#330yxieca merged 2 commits intosonic-net:masterfrom
yxieca merged 2 commits intosonic-net:masterfrom
Conversation
setUseWellKnownMacActiveActive() is declared as returning bool but has no return statement. This is undefined behavior in C++ that GCC 13 (bookworm) silently ignores but GCC 14 (trixie) traps with ud2, causing SIGILL in MuxManagerTest.ServerMacActiveActiveBeforeLinkProberInit. Change return type to void to match the underlying MuxManager method. Signed-off-by: Ying Xie <[email protected]> Signed-off-by: Ying Xie <[email protected]>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
lolyu
approved these changes
Apr 3, 2026
yxieca
added a commit
to yxieca/sonic-buildimage
that referenced
this pull request
Apr 3, 2026
Migrate the mux (linkmgrd) docker container from Debian bookworm to trixie, aligning it with other containers already on trixie. Changes: - Update Dockerfile.j2 base image from bookworm to trixie - Update docker-mux.mk references from BOOKWORM to TRIXIE Depends on: sonic-net/sonic-linkmgrd#330 (fixes SIGILL in unit tests caused by GCC 14 catching missing return UB) Signed-off-by: Ying Xie <[email protected]>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
yxieca
added a commit
to yxieca/sonic-buildimage
that referenced
this pull request
Apr 3, 2026
Migrate the mux (linkmgrd) docker container from Debian bookworm to trixie, aligning it with other containers already on trixie. Changes: - Update Dockerfile.j2 base image from bookworm to trixie - Update docker-mux.mk references from BOOKWORM to TRIXIE Depends on: sonic-net/sonic-linkmgrd#330 (fixes SIGILL in unit tests caused by GCC 14 catching missing return UB) Signed-off-by: Ying Xie <[email protected]>
yxieca
added a commit
to yxieca/sonic-buildimage
that referenced
this pull request
Apr 4, 2026
Migrate the mux (linkmgrd) docker container from Debian bookworm to trixie, aligning it with other containers already on trixie. Changes: - Update Dockerfile.j2 base image from bookworm to trixie - Update docker-mux.mk references from BOOKWORM to TRIXIE Depends on: sonic-net/sonic-linkmgrd#330 (fixes SIGILL in unit tests caused by GCC 14 catching missing return UB) Signed-off-by: Ying Xie <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
MuxManagerTest::setUseWellKnownMacActiveActive()is declared as returningboolbut has no return statement. This is undefined behavior in C++.ud2(intentional illegal instruction) to trap the UBThis causes
MuxManagerTest.ServerMacActiveActiveBeforeLinkProberInitto crash with SIGILL (exit code 132) when linkmgrd is built in a trixie environment.Root Cause
The underlying
MuxManager::setUseWellKnownMacActiveActive()returnsvoid, so the test wrapper should too.Fix
Change return type from
booltovoidin both the declaration (.h) and definition (.cpp).How I tested
-g -O0in trixie slave containerud2instruction at function epilogue