<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>159880</bug_id>
          
          <creation_ts>2016-07-18 10:13:39 -0700</creation_ts>
          <short_desc>JSC JIT Broken on ARMv7 Traditional (without Thumb2)</short_desc>
          <delta_ts>2016-07-20 00:31:52 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>108645</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Csaba Osztrogonác">ossy</assigned_to>
          <cc>berto</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>commit-queue</cc>
    
    <cc>gustavo</cc>
    
    <cc>mario</cc>
    
    <cc>ossy</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>tpopela</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1212005</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2016-07-18 10:13:39 -0700</bug_when>
    <thetext>When building WebKitGTK+ for ARMv7 (armhf) with traditional ARM intruction set (-marm) instead of building with Thumb2 instruction set (-mthumb) the JSC JIT fails at run-time. It builds fine, but then any webpage with JavaScript will make the WebProcess crash.

I have been able to reproduce this with 2.12.3. Not sure if its reproducible with current trunk, I will try to reproduce it there also.

It seems that GNU/Linux armhf distributions build with Thumb2 (-mthumb) by default. At least on Debian the default toolchain (gcc compiler) is built with --with-mode=thumb on armhhf. Therefore the GTK+ ARM buildbot (that runs on Debian) is only testing the ARMv7 Thumb2 build.

Related: https://bugzilla.yoctoproject.org/show_bug.cgi?id=9474</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1212252</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2016-07-18 20:25:33 -0700</bug_when>
    <thetext>It seems the issue is also reproducible on current trunk (tried with r203370).

The command line jsc interpreter also crashes:

root@raspberrypi3:~# jsc
&gt;&gt;&gt; 1 + 1
Segmentation fault


Not sure if this only affects the GTK+ port or EFL/JSCOnly are also affected?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1212314</commentid>
    <comment_count>2</comment_count>
    <who name="Tomas Popela">tpopela</who>
    <bug_when>2016-07-19 02:32:43 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Not sure if this only affects the GTK+ port or EFL/JSCOnly are also affected?

JSCOnly affected as well. Crashing with SIGILL, Illegal instruction. Also I cannot obtain anything useful from the backtrace..

Core was generated by `./jsc&apos;.
Program terminated with signal SIGILL, Illegal instruction.
#0  0xb62049ba in JSC::slow_path_enter (exec=0xb6fb5a28, pc=0xb6fb5be0) at ../../Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:592
592     ../../Source/JavaScriptCore/runtime/CommonSlowPaths.cpp: No such file or directory.
[Current thread is 1 (Thread 0xb2d6e220 (LWP 29498))]
(gdb) bt full
#0  0xb62049ba in JSC::slow_path_enter (exec=0xb6fb5a28, pc=0xb6fb5be0) at ../../Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:592
        vm = @0xb6fb5a28: &lt;error reading variable&gt;
        tracer = {&lt;No data fields&gt;}
        codeBlock = 0xb6fb5be0
#1  0xb60a347c in llint_entry () at ../../Source/JavaScriptCore/runtime/Butterfly.h:58
No symbol table info available.
#2  0x00000000 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1212319</commentid>
    <comment_count>3</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-07-19 03:10:34 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; Not sure if this only affects the GTK+ port or EFL/JSCOnly are also affected?
&gt; 
&gt; JSCOnly affected as well. Crashing with SIGILL, Illegal instruction. Also I
&gt; cannot obtain anything useful from the backtrace..
&gt; 
&gt; Core was generated by `./jsc&apos;.
&gt; Program terminated with signal SIGILL, Illegal instruction.
&gt; #0  0xb62049ba in JSC::slow_path_enter (exec=0xb6fb5a28, pc=0xb6fb5be0) at
&gt; ../../Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:592
&gt; 592     ../../Source/JavaScriptCore/runtime/CommonSlowPaths.cpp: No such
&gt; file or directory.
&gt; [Current thread is 1 (Thread 0xb2d6e220 (LWP 29498))]
&gt; (gdb) bt full
&gt; #0  0xb62049ba in JSC::slow_path_enter (exec=0xb6fb5a28, pc=0xb6fb5be0) at
&gt; ../../Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:592
&gt;         vm = @0xb6fb5a28: &lt;error reading variable&gt;
&gt;         tracer = {&lt;No data fields&gt;}
&gt;         codeBlock = 0xb6fb5be0
&gt; #1  0xb60a347c in llint_entry () at
&gt; ../../Source/JavaScriptCore/runtime/Butterfly.h:58
&gt; No symbol table info available.
&gt; #2  0x00000000 in ?? ()
&gt; No symbol table info available.
&gt; Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Did you get it on ARMv7 hardware? 
Could you provide a disassembly near this illegal instruction?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1212366</commentid>
    <comment_count>4</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-07-19 08:06:34 -0700</bug_when>
    <thetext>After digging it with Tomas, it seems we ran into a GNU gold linker bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=19410

I&apos;m going to prepare a workaround to use the BFD linker on ARM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1212384</commentid>
    <comment_count>5</comment_count>
      <attachid>284011</attachid>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2016-07-19 09:10:09 -0700</bug_when>
    <thetext>Created attachment 284011
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1212385</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-07-19 09:11:17 -0700</bug_when>
    <thetext>Attachment 284011 did not pass style-queue:


ERROR: Source/cmake/OptionsCommon.cmake:76:  The parentheses after the last listitem &quot;#if !defined(thumb2) &amp;&amp; !defined(__thumb2__&quot; should be in a new line.  [list/parentheses] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1212660</commentid>
    <comment_count>7</comment_count>
    <who name="Tomas Popela">tpopela</who>
    <bug_when>2016-07-19 22:45:39 -0700</bug_when>
    <thetext>I can confirm that the patch provided by Ossy fixes the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1212677</commentid>
    <comment_count>8</comment_count>
      <attachid>284011</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-07-20 00:31:48 -0700</bug_when>
    <thetext>Comment on attachment 284011
Patch

Clearing flags on attachment: 284011

Committed r203446: &lt;http://trac.webkit.org/changeset/203446&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1212678</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2016-07-20 00:31:52 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>284011</attachid>
            <date>2016-07-19 09:10:09 -0700</date>
            <delta_ts>2016-07-20 00:31:48 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-159880-20160719090912.patch</filename>
            <type>text/plain</type>
            <size>2123</size>
            <attacher name="Csaba Osztrogonác">ossy</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjAzNDA3CmRpZmYgLS1naXQgYS9Tb3VyY2UvY21ha2UvT3B0
aW9uc0NvbW1vbi5jbWFrZSBiL1NvdXJjZS9jbWFrZS9PcHRpb25zQ29tbW9uLmNtYWtlCmluZGV4
IGJkZjJhOWY1MGZkOGQ4Njc1YmRkMDAzMGRmNDYyNmE0M2E4ZGJmYjkuLmVhMDYwZGI2MmM0NDY1
MDY5MmEyNzFhYTEwNGU5MDBiMWJiMjMzYWEgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9jbWFrZS9PcHRp
b25zQ29tbW9uLmNtYWtlCisrKyBiL1NvdXJjZS9jbWFrZS9PcHRpb25zQ29tbW9uLmNtYWtlCkBA
IC02OSwxMCArNjksMjkgQEAgZW5kaWYgKCkKIAogRVhQT1NFX1ZBUklBQkxFX1RPX0JVSUxEKFdU
Rl9DUFVfQVJNNjRfQ09SVEVYQTUzKQogCitzZXQoQVJNX1RSQURJVElPTkFMX0RFVEVDVEVEIEZB
TFNFKQoraWYgKFdURl9DUFVfQVJNKQorICAgIHNldChBUk1fVEhVTUIyX1RFU1RfU09VUkNFCisg
ICAgIgorICAgICNpZiAhZGVmaW5lZCh0aHVtYjIpICYmICFkZWZpbmVkKF9fdGh1bWIyX18pCisg
ICAgI2Vycm9yIFwiVGh1bWIyIGluc3RydWN0aW9uIHNldCBpc24ndCBhdmFpbGFibGVcIgorICAg
ICNlbmRpZgorICAgIGludCBtYWluKCkge30KKyAgICIpCisKKyAgICBpbmNsdWRlKENoZWNrQ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