[Webkit-unassigned] [Bug 187485] JavaScriptCore doesn't work with musl-libc

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 10 15:15:46 PDT 2018


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

Yusuke Suzuki <utatane.tea at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark.lam at apple.com

--- Comment #3 from Yusuke Suzuki <utatane.tea at gmail.com> ---
Yeah, this is because musl's stack size is very small[1].
So, all the stack overflow checks fail since soft stack limit is smaller than the current stack pointer.

We can make JSC work by changing MinimumReservedZoneSize.h from `static const unsigned minimumReservedZoneSize = 16 * KB;` to `static const unsigned minimumReservedZoneSize = 4 * KB;` or smaller value (At least in my Linux box using glibc, with `ulimit -s 80`).
But it seems dangerous to me. Personally, I think increasing the default stack size of musl is the right way to fix.
When setting `ulimit -s 100` in my Linux box (using glibc), even gdb fails to start.

The difficult thing is that we cannot deploy this tweak for musl, since musl does not provide any macro / definition to detect musl intentionally[1], while musl's behavior is different from glibc (actually stack size is small) :(.

Mark, what do you think of?

[1]: https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread-stack-size
[2]: https://wiki.musl-libc.org/faq.html#Q:-Why-is-there-no-%3Ccode%3E__MUSL__%3C/code%3E-macro?

-- 
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/20180710/03c40857/attachment-0001.html>


More information about the webkit-unassigned mailing list