<?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>295780</bug_id>
          
          <creation_ts>2025-07-11 08:34:33 -0700</creation_ts>
          <short_desc>[JSC] Reproducible JSC segfault at allocateMoreOutOfLineStorage on 32-bit ARM</short_desc>
          <delta_ts>2026-01-15 04:20:11 -0800</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>Other</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=279285</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>drobyshevskyi</reporter>
          <assigned_to name="WebKitGTK+ bugs">bugs-noreply</assigned_to>
          <cc>aperez</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>clopez</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>w.vanhauwaert</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2129321</commentid>
    <comment_count>0</comment_count>
    <who name="">drobyshevskyi</who>
    <bug_when>2025-07-11 08:34:33 -0700</bug_when>
    <thetext>We&apos;re using WPEWebKit 2.46.7 via cog 0.18.4 on an embedded i.MX6DL board with wayland backend, provided by yocto scarthgap.

The problem is that occasionally there&apos;s the following:

    (cog:924): Cog-Core-WARNING **: 15:21:59.504: Renderer process terminated, restarting (attempt 1/5)

    Thread 1 &quot;WPEWebProcess&quot; received signal SIGSEGV, Segmentation fault.
    0xb42ed044 in JSC::JSObject::allocateMoreOutOfLineStorage(JSC::VM&amp;, unsigned int, unsigned int) ()
    from /usr/lib/libWPEWebKit-2.0.so.1
    0 0xb42ed044 in JSC::JSObject::allocateMoreOutOfLineStorage(JSC::VM&amp;, unsigned int, unsigned int) ()
    from /usr/lib/libWPEWebKit-2.0.so.1
    1 0xb3e05136 in WTF::ASCIILiteral JSC::JSObject::putDirectInternal&lt;(JSC::JSObject::PutMode)0&gt;(JSC::VM&amp;, JSC::PropertyName, JSC::JSValue, unsigned int, JSC::PutPropertySlot&amp;) () from /usr/lib/libWPEWebKit-2.0.so.1
    2 0xb405f2ec in JSC::putByVal(JSC::JSGlobalObject*, JSC::JSValue, JSC::JSValue, JSC::JSValue, JSC::ArrayProfile*, JSC::ECMAMode)
    () from /usr/lib/libWPEWebKit-2.0.so.1
    3 0xb4060760 in operationPutByValSloppyGeneric () from /usr/lib/libWPEWebKit-2.0.so.1
    4 0xac8107cc in ?? ()
    Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Happens in a very specific scenario that involves switching between heavy HTML/JS pages, quite infrequently.

However, the same fault (similar stack trace) is easily reproducible by just opening https://html5gamepad.com/ and waiting.

With very high probability it crashes within 7 minutes, sometimes also hitting OOM (5-10% of the crashes).

useDFGJIT=0 makes it crash much faster

JSC_useJIT=0 makes it crash much slower

If not fixing it, any advice to toggle some settings to make it crash even less frequently is appreciated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2129385</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-07-11 11:43:38 -0700</bug_when>
    <thetext>&gt; However, the same fault (similar stack trace) is easily reproducible by just opening https://html5gamepad.com/ and waiting.

Is this website functional currently? It just redirects me to a different one.

This failure looks like running out of memory possibly. Can you please watch process memory use before it crashes? I&apos;m not seeing memory growth in Safari on the redirected website.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2129394</commentid>
    <comment_count>2</comment_count>
    <who name="">drobyshevskyi</who>
    <bug_when>2025-07-11 12:08:04 -0700</bug_when>
    <thetext>Yes, the website is correct and is functioning. I found it in an older bug, and luckily it worked. Not sure what&apos;s so special about it though.

The bug is apparently related to memory management, but it&apos;s not simply running out of memory. OOM condition (when kernel kills the browser) is reached very infrequently, most of the time it crashes much sooner.

The bug might be specific to i.MX, no wonder Safari works fine -- would be quite wild for it to crash on a valid website.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2130469</commentid>
    <comment_count>3</comment_count>
    <who name="">drobyshevskyi</who>
    <bug_when>2025-07-16 03:44:40 -0700</bug_when>
    <thetext>Using debug build (DEBUG_BUILD = &quot;1&quot; in yocto) makes it last 3-4 times longer until it crashes, and OOM is hit in the majority (but not all) of cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2130612</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-07-16 12:33:48 -0700</bug_when>
    <thetext>FWIW, it still redirects me to https://hardwaretester.com/gamepad</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2130794</commentid>
    <comment_count>5</comment_count>
    <who name="">drobyshevskyi</who>
    <bug_when>2025-07-17 02:28:13 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #4)
&gt; FWIW, it still redirects me to https://hardwaretester.com/gamepad

Either URL works for reproducing (on i.MX6, doubt it would reproduce with Safari), I should have probably specified https://hardwaretester.com/gamepad from the start to avoid confusion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2143910</commentid>
    <comment_count>6</comment_count>
    <who name="Wouter Vanhauwaert">w.vanhauwaert</who>
    <bug_when>2025-09-18 03:05:07 -0700</bug_when>
    <thetext>Hitting same on imx6q, rdk-vivante backend (no cog)

Core was generated by `/usr/libexec/wpe-webkit-1.1/WPEWebProcess 23 27 31&apos;.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7419c8ec in JSC::JSObject::allocateMoreOutOfLineStorage(JSC::VM&amp;, unsigned int, unsigned int) () from ./usr/lib/libWPEWebKit-1.1.so.0
[Current thread is 1 (LWP 700)]
(gdb) bt
#0  0x7419c8ec in JSC::JSObject::allocateMoreOutOfLineStorage(JSC::VM&amp;, unsigned int, unsigned int) () from ./usr/lib/libWPEWebKit-1.1.so.0
#1  0x742741c6 in JSC::LiteralParser&lt;unsigned char, (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from ./usr/lib/libWPEWebKit-1.1.so.0
#2  0x7427093c in JSC::LiteralParser&lt;unsigned char, (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from ./usr/lib/libWPEWebKit-1.1.so.0
#3  0x7427093c in JSC::LiteralParser&lt;unsigned char, (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from ./usr/lib/libWPEWebKit-1.1.so.0
#4  0x7426fc60 in JSC::LiteralParser&lt;unsigned char, (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from ./usr/lib/libWPEWebKit-1.1.so.0
#5  0x7427093c in JSC::LiteralParser&lt;unsigned char, (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from ./usr/lib/libWPEWebKit-1.1.so.0
#6  0x7427093c in JSC::LiteralParser&lt;unsigned char, (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from ./usr/lib/libWPEWebKit-1.1.so.0
#7  0x7427a0a0 in JSC::LiteralParser&lt;unsigned char, (JSC::JSONReviverMode)0&gt;::parseRecursivelyEntry(JSC::VM&amp;) () from ./usr/lib/libWPEWebKit-1.1.so.0
#8  0x74192484 in JSC::jsonProtoFuncParse(JSC::JSGlobalObject*, JSC::CallFrame*) () from ./usr/lib/libWPEWebKit-1.1.so.0
#9  0x6c2ff148 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) 

And hit it last year on imx53 too (cog):

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

Both running our same webapp</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2143924</commentid>
    <comment_count>7</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2025-09-18 05:10:09 -0700</bug_when>
    <thetext>*** Bug 275099 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2143925</commentid>
    <comment_count>8</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2025-09-18 05:12:38 -0700</bug_when>
    <thetext>While I do not currently have an idea about how to go about fixing this, I wonder if the higher amount of JSC operations needed to manage a constant stream of gamepad inputs (or periodic WebSocket data as reported in bug #275099) might be making a latent issue easier to reproduce 🤔</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2143929</commentid>
    <comment_count>9</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2025-09-18 05:20:34 -0700</bug_when>
    <thetext>Potentially related to bug #279285 -- that one shows a similar backtrace but on RISC-V, and also mentions that there is no such issue when building with Clang.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2145175</commentid>
    <comment_count>10</comment_count>
    <who name="">drobyshevskyi</who>
    <bug_when>2025-09-23 02:25:51 -0700</bug_when>
    <thetext>I&apos;ve built wpewebkit with Clang by adding
TOOLCHAIN = “clang”
to wpewebkit recipe (haven&apos;t changed TC_CXX_RUNTIME or LIBCPLUSPLUS) and it didn&apos;t help (log.do_compile indeed shows that clang was used).
It ran into out of memory condition most of the time, which is similar behavior to GCC debug build. FWIW, I think it ran into OOM faster than when built with GCC.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2145844</commentid>
    <comment_count>11</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-09-25 04:58:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/161319742&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2149433</commentid>
    <comment_count>12</comment_count>
    <who name="">drobyshevskyi</who>
    <bug_when>2025-10-08 05:16:49 -0700</bug_when>
    <thetext>FWIW, wpewebkit is also crashing on https://browserbench.org/Speedometer3.1/, haven&apos;t checked the stack trace though.

Chromium passes it fine (just saying).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2149438</commentid>
    <comment_count>13</comment_count>
    <who name="Wouter Vanhauwaert">w.vanhauwaert</who>
    <bug_when>2025-10-08 05:30:05 -0700</bug_when>
    <thetext>The memory on epiphany (webkitgtk/2.48.5) is even going through the roof on that page...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2149498</commentid>
    <comment_count>14</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2025-10-08 10:55:08 -0700</bug_when>
    <thetext>How much RAM does have the test device?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2149500</commentid>
    <comment_count>15</comment_count>
    <who name="">drobyshevskyi</who>
    <bug_when>2025-10-08 10:58:57 -0700</bug_when>
    <thetext>1 GB, however in the original test case it rarely hit out-of-memory condition, most of the time it crashed before.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2151564</commentid>
    <comment_count>16</comment_count>
    <who name="Wouter Vanhauwaert">w.vanhauwaert</who>
    <bug_when>2025-10-16 00:49:44 -0700</bug_when>
    <thetext>I did some further investigation by narrowing down webkit versions
webkit 2.38.6 does not run into the issue
webkit 2.40.5 does</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2158221</commentid>
    <comment_count>17</comment_count>
    <who name="Wouter Vanhauwaert">w.vanhauwaert</who>
    <bug_when>2025-11-12 05:13:41 -0800</bug_when>
    <thetext>After some further investigation:
2.40.4 was still ok, so issue introduced leading towards 2.40.5
I git bisected in between them and turned out commit 
https://github.com/WebKit/WebKit/commit/d784299e55fa84c267ca35ed257ef08a500571f7
is introducing the malicious behavior.
I&apos;m not really into the internals of what&apos;s really happening. My understanding that a choice is added to go for a fast or slow path...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2158230</commentid>
    <comment_count>18</comment_count>
    <who name="Wouter Vanhauwaert">w.vanhauwaert</who>
    <bug_when>2025-11-12 07:34:43 -0800</bug_when>
    <thetext>(In reply to Wouter Vanhauwaert from comment #17)
&gt; After some further investigation:
&gt; 2.40.4 was still ok, so issue introduced leading towards 2.40.5
&gt; I git bisected in between them and turned out commit 
&gt; https://github.com/WebKit/WebKit/commit/
&gt; d784299e55fa84c267ca35ed257ef08a500571f7
&gt; is introducing the malicious behavior.
&gt; I&apos;m not really into the internals of what&apos;s really happening. My
&gt; understanding that a choice is added to go for a fast or slow path...

Sorry. It did crash in the end, only took a lot longer then I anticipated. +1h30 in my tests where it&apos;s mostly +- 30min on average. Now I doubt my git bisect in its whole. Will investigate further and come back to it</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2158232</commentid>
    <comment_count>19</comment_count>
    <who name="">drobyshevskyi</who>
    <bug_when>2025-11-12 07:46:52 -0800</bug_when>
    <thetext>FWIW, I don&apos;t think that commit has ever been picked into specifically WPEWebKit, at least it doesn&apos;t show up in git log it seems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2158233</commentid>
    <comment_count>20</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2025-11-12 07:54:11 -0800</bug_when>
    <thetext>That&apos;s a stable branch commit. On the main branch it landed as 266439@main.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2158234</commentid>
    <comment_count>21</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2025-11-12 07:56:05 -0800</bug_when>
    <thetext>Ah, looks like the main branch commit excludes all the code changes. The problem must have been resolved differently on main.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2172152</commentid>
    <comment_count>22</comment_count>
    <who name="Wouter Vanhauwaert">w.vanhauwaert</who>
    <bug_when>2026-01-15 04:20:11 -0800</bug_when>
    <thetext>(In reply to Wouter Vanhauwaert from comment #6)
&gt; Hitting same on imx6q, rdk-vivante backend (no cog)
&gt; 
&gt; Core was generated by `/usr/libexec/wpe-webkit-1.1/WPEWebProcess 23 27 31&apos;.
&gt; Program terminated with signal SIGSEGV, Segmentation fault.
&gt; #0  0x7419c8ec in JSC::JSObject::allocateMoreOutOfLineStorage(JSC::VM&amp;,
&gt; unsigned int, unsigned int) () from ./usr/lib/libWPEWebKit-1.1.so.0
&gt; [Current thread is 1 (LWP 700)]
&gt; (gdb) bt
&gt; #0  0x7419c8ec in JSC::JSObject::allocateMoreOutOfLineStorage(JSC::VM&amp;,
&gt; unsigned int, unsigned int) () from ./usr/lib/libWPEWebKit-1.1.so.0
&gt; #1  0x742741c6 in JSC::LiteralParser&lt;unsigned char,
&gt; (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from
&gt; ./usr/lib/libWPEWebKit-1.1.so.0
&gt; #2  0x7427093c in JSC::LiteralParser&lt;unsigned char,
&gt; (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from
&gt; ./usr/lib/libWPEWebKit-1.1.so.0
&gt; #3  0x7427093c in JSC::LiteralParser&lt;unsigned char,
&gt; (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from
&gt; ./usr/lib/libWPEWebKit-1.1.so.0
&gt; #4  0x7426fc60 in JSC::LiteralParser&lt;unsigned char,
&gt; (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from
&gt; ./usr/lib/libWPEWebKit-1.1.so.0
&gt; #5  0x7427093c in JSC::LiteralParser&lt;unsigned char,
&gt; (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from
&gt; ./usr/lib/libWPEWebKit-1.1.so.0
&gt; #6  0x7427093c in JSC::LiteralParser&lt;unsigned char,
&gt; (JSC::JSONReviverMode)0&gt;::parseRecursively(JSC::VM&amp;, unsigned char*) () from
&gt; ./usr/lib/libWPEWebKit-1.1.so.0
&gt; #7  0x7427a0a0 in JSC::LiteralParser&lt;unsigned char,
&gt; (JSC::JSONReviverMode)0&gt;::parseRecursivelyEntry(JSC::VM&amp;) () from
&gt; ./usr/lib/libWPEWebKit-1.1.so.0
&gt; #8  0x74192484 in JSC::jsonProtoFuncParse(JSC::JSGlobalObject*,
&gt; JSC::CallFrame*) () from ./usr/lib/libWPEWebKit-1.1.so.0
&gt; #9  0x6c2ff148 in ?? ()
&gt; Backtrace stopped: previous frame identical to this frame (corrupt stack?)
&gt; (gdb) 
&gt; 
&gt; And hit it last year on imx53 too (cog):
&gt; 
&gt; https://bugs.webkit.org/show_bug.cgi?id=275099
&gt; 
&gt; Both running our same webapp

Same issue on Rockchip RK3288

So this seems not isolated to a NXP/freescale environment.
All are 32 bit though</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>