This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: What can a signal handler do with SIGSTKSZ?


* Carlos O'Donell:

> On 1/14/19 11:18 AM, Florian Weimer wrote:
>> * Szabolcs Nagy:
>> 
>>> i think proposing sysconf(_SC_{MIN}SIGSTKSZ) for posix is the
>>> right solution with the kernel providing an upper bound of the
>>> stack frame in AT_MINSIGSTKSZ (as it already does on aarch64).
>> 
>> It's still a bit nasty for process migration, but at least it should for
>> VM migration.  I think that would be a reasonable compromise.
>> 
>> Of course, we'd still need a way to determine how much we should add on
>> top of AT_MINSIGSTKSZ for the application developer's benefit. 8-)
>
> The value of SIGSTKSZ seems to be a "culturally relevant detail" that will
> probably be impossible to pin down to a real value.

The embedded folks have tooling for this: avoid recursive calls,
documenting stack size requirements, all that.  There are few things in
GCC we could use (but I don't think upstream focus is on C/C++ in this
area).  Then we could have some hard numbers and also statically verify
them.

With callbacks, things get more complicated obviously, but I think it
would still be manageable.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]