From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6435 Path: news.gmane.org!not-for-mail From: =?UTF-8?B?6buE5bu65b+g?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: Webkit/JavascriptCore did not work with musl libc Date: Tue, 04 Nov 2014 10:29:32 +0800 Message-ID: <54583A0C.6030700@i-soft.com.cn> References: <543E0D12.2010903@i-soft.com.cn> <20141015120211.42a4f0db@ncopa-desktop.alpinelinux.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1415068207 19818 80.91.229.3 (4 Nov 2014 02:30:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Nov 2014 02:30:07 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6448-gllmg-musl=m.gmane.org@lists.openwall.com Tue Nov 04 03:30:01 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1XlTse-0005Nb-P9 for gllmg-musl@m.gmane.org; Tue, 04 Nov 2014 03:30:00 +0100 Original-Received: (qmail 32243 invoked by uid 550); 4 Nov 2014 02:29:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32222 invoked from network); 4 Nov 2014 02:29:58 -0000 X-QQ-mid: bizesmtp9t1415068176t703t109 X-QQ-SSF: 01400000000000F0F412B00A0000000 X-QQ-FEAT: qxIXKiOekeiJe9bID5vXXvEX3v8ROm3Gk+mlTAjdRyH5e4UbagF1EcuOLGfEQ gnCw4gcXYh6t/Jfgejvtitb7q3bWhM0cM+XzLAl2GZ1/KFlq5UFjSGCputvrxDwt/ibJHhd 3wHyNIYRoJZYK8EwYd9X3oQaYUUod2RP46mpApbUa10gPlNvuF4dGlSrSaS1KwTIoXHR//A 2n648FqKYMXzN6eipKtZM X-QQ-GoodBg: 2 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 In-Reply-To: <20141015120211.42a4f0db@ncopa-desktop.alpinelinux.org> X-QQ-SENDSIZE: 520 X-QQ-Bgrelay: 1 Xref: news.gmane.org gmane.linux.lib.musl.general:6435 Archived-At: Since it's a open issue in this maillist, I think it's better to have a feed back. JsCore range error problem fixed for webkitgtk-2.4.x and webkit bundled in Qt(Qt 5.3.x, Qt4 should works but not tested now.). - const size_t requiredStack = 128 * KB; - const size_t errorModeRequiredStack = 64 * KB; + const size_t requiredStack = 32 * KB; + const size_t errorModeRequiredStack = 16 * KB; For ewebkit/webkitgtk-2.6(AKA, webkitgtk4), they all use the latest codebase of webkit, and had the same issue but different from webkitgtk-2.4.x. I will try to fix it later since webkitgtk-2.4 is enough from my system. Alpine guys can check this patch and have a try. By the way, QSslSocket in alpine linux still had a problem about loading libssl. In qsslsocket_openssl_symbols.cpp: #ifdef Q_OS_OPENBSD libcrypto->setLoadHints(QLibrary::ExportExternalSymbolsHint); #endif + libcrypto->setLoadHints(QLibrary::ExportExternalSymbolsHint); + libssl->setLoadHints(QLibrary::ExportExternalSymbolsHint); Otherwise, the symbol resolving of libssl will fail, at least with libressl, I think it's same for openssl. 在 10/15/14 18:02, Natanael Copa 写道: > On Wed, 15 Oct 2014 13:58:42 +0800 > *** wrote: > >> Hi, all, >> I build webkitgtk-2.4.4 and ewebkit2 under musl libc with >> gcc-4.9.1(patched) and clang-3.5, the javascriptCore js engine did not >> work as expected(with JIT enable or disable.) >> >> for webkitgtk, jsc just output "Exception:" when run any js codes. >> for ewebkit2, jsc just segfault with below backtrace: >> >> #0 0x00000000008cf0c4 in WTFCrash () >> #1 0x000000000065bb72 in WTF::PassRefPtr >> JSC::parse(JSC::VM*, JSC::SourceCode const&, >> JSC::FunctionParameters*, JSC::Identifier const&, >> JSC::JSParserStrictness, JSC::JSParserMode, JSC::ParserError&, >> JSC::JSTextPosition*, bool) () >> #2 0x000000000077c6f0 in >> JSC::BuiltinExecutables::createBuiltinExecutable(JSC::SourceCode const&, >> JSC::Identifier const&) () >> #3 0x000000000077cc73 in >> JSC::BuiltinExecutables::functionPrototypeApplyCodeExecutable() () >> #4 0x000000000076ee90 in >> JSC::functionPrototypeApplyCodeGenerator(JSC::VM&) () >> #5 0x00000000007c1a78 in >> JSC::FunctionPrototype::addFunctionProperties(JSC::ExecState*, >> JSC::JSGlobalObject*, JSC::JSFunction**, JSC::JSFunction**) () >> #6 0x0000000000682f89 in JSC::JSGlobalObject::reset(JSC::JSValue) () >> #7 0x00000000004f68c1 in JSC::JSGlobalObject::finishCreation(JSC::VM&) () >> #8 0x00000000004f600c in GlobalObject::finishCreation(JSC::VM&, >> WTF::Vector const&) () >> #9 0x00000000004f01b8 in jscmain(int, char**) () >> #10 0x00000000004eff5d in main () >> >> The JSCore codes is too complex and I even can not figure out the buggy >> codes quickly. >> >> My environment is a customized linux with musl libc/wayland >> only/gcc/clang/systemd and so on. >> >> can Anybody who use a musl libc based distribution try and check it? for >> webkitgtk2, there is no need to build it completely, just: >> configure and "make jsc" then try it. > Alpine Linux, x86_64, musl-1.1.5, gcc (Alpine 4.8.3) 4.8.3 > > > ncopa-desktop:~$ apk version webkitgtk > Installed: Available: > webkitgtk-2.4.5-r1 = 2.4.5-r1 > > ncopa-desktop:~$ jsc-3 > "hello" >>>> Exception: RangeError: Maximum call stack size exceeded. > > Maybe the thread stack needs to be increased? > >> I am also working on it. >> > -nc > -- Huang JianZhong