I don't use libucontext much, but I finally got around to version 1.1, and since I finally turned on some extra QA output for Gentoo I got this warning.
* QA Notice: The following files contain writable and executable sections
* Files with such sections will not work properly (or at all!) on some
* architectures/operating systems. A bug should be filed at
* https://bugs.gentoo.org/ to make sure the issue is fixed.
* For more information, see:
*
* https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
*
* Please include the following list of files in your report:
* Note: Bugs should be filed for the respective maintainers
* of the package in question and not hardened@gentoo.org.
* !WX --- --- usr/lib64/libucontext_posix.a:arch_x86_64_getcontext.S.o
* !WX --- --- usr/lib64/libucontext_posix.a:arch_x86_64_setcontext.S.o
* !WX --- --- usr/lib64/libucontext_posix.a:arch_x86_64_swapcontext.S.o
* !WX --- --- usr/lib64/libucontext.a:arch_x86_64_getcontext.S.o
* !WX --- --- usr/lib64/libucontext.a:arch_x86_64_setcontext.S.o
* !WX --- --- usr/lib64/libucontext.a:arch_x86_64_swapcontext.S.o
I checked and saw that the assembly files indeed didn't have a note indicating if they needed an executable stack or not.
It seems this only happens when built under glibc.
If you would take a look, and do some more testing to ensure things don't break ( the basic make check passes still under musl, but the second test segfaults on glibc both with and without this change)
I don't use libucontext much, but I finally got around to version 1.1, and since I finally turned on some extra QA output for Gentoo I got this warning.
I checked and saw that the assembly files indeed didn't have a note indicating if they needed an executable stack or not.
It seems this only happens when built under glibc.
If you would take a look, and do some more testing to ensure things don't break ( the basic make check passes still under musl, but the second test segfaults on glibc both with and without this change)
Gentoo bug filed by someone else.