[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:48:19 PDT 2021


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

--- Comment #10 from Daniel Kolesa <dkolesa at igalia.com> ---
(In reply to Mark Lam from comment #9)
> (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.

that won't be true, because that doesn't check for musl, it checks for every c library except glibc and bionic (so also e.g. uclibc and so on)

as i said, the best thing would probably be to use the the code universally, without checking which libc it is; it should work everywhere as is, so there is no need to check for libc here

-- 
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/a4fd4c49/attachment.htm>


More information about the webkit-unassigned mailing list