On Thu, Mar 04, 2021 at 07:02:27AM -0500, Carol Bouchard wrote:
> It's going to require more than removing the hack due to the following:
> 
> /* Storage for the alternate signal stack.  */
> static union
> {
>   char buffer[SIGSTKSZ];
> 
>   /* These other members are for proper alignment.  There's no
>      standard way to guarantee stack alignment, but this seems enough
>      in practice.  */
>   long double ld;
>   long l;
>   void *p;
> } alternate_signal_stack;

A "simple" option is to just stop using SIGSTKSZ here, and define
your own constant - pick it based on worst case real world SIGSTKSZ
that you'll expect. Perhaps stick in an assert in the code too, to
abort the process at runtime if the real value is larger.

A alternative solution is to stop statically allocating the
struct and instead malloc it at startup. If there's no convenient
place todo the alloc, you could possibly use an __attribute__(constructor)
function that will get invoked by the dyn loader at startup for you,
before main() even runs.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to