[Webkit-unassigned] [Bug 225099] [WPE][GTK] More correct fixes for stack size issues on musl libc

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 27 10:43:53 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=225099

--- Comment #9 from Mark Lam <mark.lam at apple.com> ---
(In reply to Daniel Kolesa from comment #8)
> > I see this set of conditionals used in more than 1 place (3 in this patch). 
> > Would it be better to define USE_MUSL in PlatformUse.h and check #if
> > USE(MUSL) here (and in the other places)?  Is this code only needed for musl?
> 
> that's the thing - it's technically not needed on glibc/bionic (since the
> pthread api already returns what we expect), but if we also enabled it for
> glibc/bionic, it wouldn't hurt anything
> 
> which is why i'd perhaps like to change the conditional to just '#if
> OS(LINUX)' and use it everywhere, to avoid needless platform checks
> 
> that conditional will obviously catch other libc's than musl as well;
> there's no telling what kind of behavior they will actually have - so we
> should play it safe for those either way
> 
> musl has no test macro of its own, intentionally (in order to encourage
> people to write portable code)

Can't you add this in PlatformUse.h:

#if OS(LINUX) && !defined(__BIONIC__) && !defined(__GLIBC__)
#define USE_MUSL
#endif

... and check USE(MUSL) in all the places instead?  That is unless you intend to use this code for other than musl.  Anyway, I just think it's error prone to always have a long string of conditionals like that that needs to be copy-pasted to multiple places.  That's my $.02.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210427/900fddba/attachment-0001.htm>


More information about the webkit-unassigned mailing list