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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 9 14:49:35 PDT 2018


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

            Bug ID: 187485
           Summary: JavaScriptCore doesn't work with musl-libc
           Product: WebKit
           Version: Other
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Major
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: beb5pft5lz at sqrah.anonbox.net

Hello there,

I wanted to run luakit (a javascript based webbrowser) on Alpine Linux (uses musl libc) and noticed that it wasn't able to evaluate any javascript. After some research I found the following issue in the luakit bugtracker:

* https://github.com/luakit/luakit/issues/550

According to this GitHub issue in the luakit bug tracker this isn't a problem with luakit but instead a problem with webkit itself (or more specific JavaScriptCore). I did some further research and found additional entries in bug trackers of musl-based linux distributions also claiming that this is a bug in webkit:

* https://github.com/voidlinux/void-packages/issues/5360
* https://bugs.alpinelinux.org/issues/8492

Most of these bug reports claim that this might be related to the default stack size for new threads in musl. Which is a lot smaller than the default stack size in glibc (see: https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread-stack-size)

To make sure that this is really a bug in webkit I came up with a little C example evaluating a simple javascript expression using JavaScriptCore. This C program is attached it is mostly based on a code snippet from `Source/JavaScriptCore/API/tests/testapi` (thus I assume that it should work).

I compiled the attached code snippet with `gcc -o test test.c $(pkg-config --cflags webkit2gtk-4.0) $(pkg-config --libs webkit2gtk-4.0)` on Alpine Linux Edge (x86_64) using webkit 2.20.3. Invoking the resulting binary produces the following output: `test: JSEvaluateScript failed`.

I also invoked the binary with valgrind (the output can be found here https://paste42.de/13254/) which makes me believe that this is really an issue regarding the thread stack size since various attempts are made to access memory below the stack pointer. Besides the test program segfaults when started with valgrind which is also strange.

I (and the people who created the bugs linked above) would be very happy if this could be investigated further and (hopefully) be fixed soon. I would also suggest that you run your test suite on a musl-based system as well to prevent these kind of issues in the future.

-- 
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/20180709/94fd18da/attachment-0001.html>


More information about the webkit-unassigned mailing list