Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1321113

Summary: jsc crash on s390x/ppc64
Product: [Fedora] Fedora Reporter: Than Ngo <than>
Component: webkitgtk4Assignee: Tomas Popela <tpopela>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dan, klember, mcatanzaro+wrong-account-do-not-cc, than, tpopela
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-07 13:37:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1071880    
Attachments:
Description Flags
patch fix the crash in jsc on ppc64/s390x none

Description Than Ngo 2016-03-24 16:59:29 UTC
jsc segfauts on s390x/powerpc. Simple reproduce this issue on ppc64/s390x
start jsc and type: print("hallo")


Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install glib2-2.47.6.19.gad2092b-2.fc24.ppc64 libgcc-6.0.0-0.16.fc24.ppc64 libstdc++-6.0.0-0.16.fc24.ppc64 pcre-8.38-11.fc24.ppc64
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x00003fffb7a2f1b4 in JSC::LLInt::CLoop::execute(JSC::OpcodeID, void*, JSC::VM*, JSC::ProtoCallFrame*, bool) ()
    at /home/than/rpmbuild/BUILD/webkitgtk-2.12.0/ppc64-redhat-linux-gnu/DerivedSources/JavaScriptCore/LLIntAssembly.h:899
#2  0x00003fffb7a2e794 in vmEntryToJavaScript() () at /home/than/rpmbuild/BUILD/webkitgtk-2.12.0/Source/JavaScriptCore/llint/LLIntThunks.cpp:104
#3  0x00003fffb7a1a728 in JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) () at /home/than/rpmbuild/BUILD/webkitgtk-2.12.0/Source/JavaScriptCore/jit/JITCode.cpp:80
#4  0x00003fffb7a1301c in JSC::Interpreter::execute(JSC::ProgramExecutable*, JSC::ExecState*, JSC::JSObject*) ()
    at /home/than/rpmbuild/BUILD/webkitgtk-2.12.0/Source/JavaScriptCore/interpreter/Interpreter.cpp:972
#5  0x00003fffb7b7715c in JSC::evaluate(JSC::ExecState*, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&) ()
    at /home/than/rpmbuild/BUILD/webkitgtk-2.12.0/Source/JavaScriptCore/runtime/Completion.cpp:106
#6  0x0000000020011f28 in runJSC() () at /home/than/rpmbuild/BUILD/webkitgtk-2.12.0/Source/JavaScriptCore/jsc.cpp:1902
#7  0x0000000020011f28 in runJSC() () at /home/than/rpmbuild/BUILD/webkitgtk-2.12.0/Source/JavaScriptCore/jsc.cpp:2052
#8  0x00000000200128e8 in jscmain(int, char**) () at /home/than/rpmbuild/BUILD/webkitgtk-2.12.0/Source/JavaScriptCore/jsc.cpp:2101
#9  0x000000002000b730 in main() () at /home/than/rpmbuild/BUILD/webkitgtk-2.12.0/Source/JavaScriptCore/jsc.cpp:1753
(gdb) p /home/than/rpmbuild/BUILD/webkitgtk-2.12.0/ppc64-redhat-linux-gnu/DerivedSources/JavaScriptCore/LLIntAssembly.h


It seems the wrong pagesize and loadisFromInstruction causes the crash on s390x/ppc64. I created a fix which resolves the crash. The patch will be attached in next comment.

Comment 1 Than Ngo 2016-03-24 17:01:57 UTC
Created attachment 1140057 [details]
patch fix the crash in jsc on ppc64/s390x

Comment 2 Michael Catanzaro 2016-11-18 18:06:27 UTC
(In reply to Ngo Than from comment #1)
> Created attachment 1140057 [details]
> patch fix the crash in jsc on ppc64/s390x

Hi, sorry for the delay in responding to this. Is this still broken? I do not want to carry architecture support patches downstream unless they have first been submitted upstream. Please see https://webkit.org/contributing-code/ for information on contributing code to WebKit. Once you have submitted this upstream, then let me know here and I can review it for inclusion.

Comment 3 Than Ngo 2016-11-28 12:12:47 UTC
yes it's still broken. if i remember correctly i already reported this to upstream last time. I will check and if it's not the case, i will submit it to upstream and let you know. Thanks

Comment 4 Dan HorĂ¡k 2016-11-29 12:28:11 UTC
IIRC Tomas is aware of this issue too.

Comment 5 Tomas Popela 2016-11-29 12:41:31 UTC
I just know that it was/is indeed broken, but it needs to be retested as the JavaScriptCore codebase is changing quite a lot and it could be broken even more that it was.

Comment 6 Michael Catanzaro 2017-01-07 13:37:58 UTC
Hi, looking through these bugs again. This is an upstream bug, not a Fedora bug, so I don't want to keep it open here forever when it seems nobody is working to make JSC work on this architecture. You could report it upstream on bugzilla.webkit.org.