Unittest: fix catch_assert for glibc2.41 (#1339)#1348
Open
anordal wants to merge 2 commits into
Open
Conversation
Makes tests not die of SIGABRT (FreeRTOS#1339). I only suspect this to depend on Glibc version: I have not dug in to the Glibc code to verify it, and I can't rule out another library, but that's my nullhypothesis. Tested: * Opensuse Tumbleweed last time I contributed = Good * Ubuntu 24.04 (Glibc 2.39) = Good * OpenSuse Leap 16 (Glibc 2.40) = Good * Ubuntu 25.04 (Glibc 2.41) = Bad * Ubuntu 26.04 (Glibc 2.41) = Bad * Opensuse Tumbleweed now = Bad Hypothesis: Signals are "blocked" (as in put in a queue) while the signal handler runs to avoid recursion. Thus, longjumping out of the signal handler may steer away from the signal unblocking path, thus isn't really supposed to work. This is the minimal but suboptimal change: Unblock the signal. This can be done more elegantly with siglongjmp (next commit).
A more proper fix for FreeRTOS#1339 than the previous commit: siglongjmp also restores signal state. Also take the opportunity to minimize macro state, code and namespace footprint.
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
Fixes unittests dying of SIGABRT. From what I can gather, probably related to glibc version.
Test Steps
Build and run the unittests as described in tests/unit-test/README.md
Checklist:
Related Issue
#1339
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.