<?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>273066</bug_id>
          
          <creation_ts>2024-04-22 05:54:01 -0700</creation_ts>
          <short_desc>[Debug] ASSERTION FAILED: v &lt;= 0</short_desc>
          <delta_ts>2024-04-22 14:56:06 -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 Local Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>273048</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="qbtly">qbtly201</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fujii</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2030171</commentid>
    <comment_count>0</comment_count>
    <who name="qbtly">qbtly201</who>
    <bug_when>2024-04-22 05:54:01 -0700</bug_when>
    <thetext>###### Webkit
9e5519436f6b4b766fe205d2adacf6668033e9bb

###### Build platform
Ubuntu 22.04.3

###### Build steps
```sh
./Tools/Scripts/build-jsc --jsc-only --debug --build-dir=&quot;0422_debug&quot; --cmakeargs=&quot;-DENABLE_STATIC_JSC=ON -DCMAKE_C_COMPILER=&apos;/usr/bin/clang&apos; -DCMAKE_CXX_COMPILER=&apos;/usr/bin/clang++&apos; -DCMAKE_CXX_FLAGS=&apos;-fsanitize-coverage=trace-pc-guard -O3 -lrt&apos;&quot;
```

###### Test case
```sh
(&quot;py&quot;).search((&quot;-256&quot;)[0]);
```

###### Execution steps
```sh
./jsc poc.js
```

###### Output
```sh
ASSERTION FAILED: v &lt;= 0
WTF/Headers/wtf/MathExtras.h(787) : typename std::enable_if_t&lt;std::is_integral_v&lt;T&gt; &amp;&amp; std::is_signed_v&lt;T&gt;, std::make_unsigned_t&lt;T&gt;&gt; WTF::negate(T) [T = int]

Thread 1 &quot;jsc&quot; received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.

pwndbg&gt; bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff5aa3859 in __GI_abort () at abort.c:79
#2  0x00000000004277ca in WTFCrashWithInfo () at WTF/Headers/wtf/Assertions.h:862
#3  0x0000000002415c18 in WTF::negate&lt;int&gt; (v=&lt;optimized out&gt;) at WTF/Headers/wtf/MathExtras.h:787
#4  JSC::MacroAssemblerX86Common::sub32 (this=&lt;optimized out&gt;, this@entry=0xc0, src=JSC::X86Registers::esi, imm=..., imm@entry=..., dest=JSC::X86Registers::eax) at ../../../Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h:908
#5  0x0000000002404d65 in JSC::MacroAssembler::sub32 (this=&lt;optimized out&gt;, src=&lt;optimized out&gt;, src@entry=JSC::X86Registers::esi, imm=..., imm@entry=..., dest=&lt;optimized out&gt;, dest@entry=JSC::X86Registers::eax) at ../../../Source/JavaScriptCore/assembler/MacroAssembler.h:2167
#6  0x00000000023f57da in JSC::Yarr::YarrGenerator&lt;JSC::Yarr::YarrJITDefaultRegisters&gt;::generate (this=&lt;optimized out&gt;, this@entry=0x7fffffff9b88) at ../../../Source/JavaScriptCore/yarr/YarrJIT.cpp:2752
#7  0x00000000023d3196 in JSC::Yarr::YarrGenerator&lt;JSC::Yarr::YarrJITDefaultRegisters&gt;::compile (this=&lt;optimized out&gt;, this@entry=0x7fffffff9b88, codeBlock=...) at ../../../Source/JavaScriptCore/yarr/YarrJIT.cpp:4786
#8  0x00000000023d22c2 in JSC::Yarr::jitCompile (pattern=..., patternString=..., charSize=&lt;optimized out&gt;, charSize@entry=JSC::Yarr::CharSize::Char8, sampleString=..., vm=&lt;optimized out&gt;, vm@entry=0x7fffa9000000, codeBlock=..., mode=&lt;optimized out&gt;) at ../../../Source/JavaScriptCore/yarr/YarrJIT.cpp:5351
#9  0x0000000001e25c9f in JSC::RegExp::compileMatchOnly (this=this@entry=0x7fffeb0575d8, vm=vm@entry=0x7fffa9000000, charSize=JSC::Yarr::CharSize::Char8, sampleString=std::optional&lt;WTF::StringView&gt; = {...}) at ../../../Source/JavaScriptCore/runtime/RegExp.cpp:323
#10 0x0000000001e35ab3 in JSC::RegExp::compileIfNecessaryMatchOnly (this=this@entry=0x7fffeb0575d8, vm=..., charSize=JSC::Yarr::CharSize::Char8, sampleString=std::optional&lt;WTF::StringView&gt; = {...}) at ../../../Source/JavaScriptCore/runtime/RegExpInlines.h:242
#11 0x0000000001e2602b in JSC::RegExp::matchInline&lt;(JSC::Yarr::MatchFrom)0&gt; (this=0x7fffeb0575d8, nullOrGlobalObject=0x7fffa941a088, vm=..., s=..., startOffset=0) at ../../../Source/JavaScriptCore/runtime/RegExpInlines.h:253
#12 0x0000000000c8caff in JSC::RegExpGlobalData::performMatch (this=this@entry=0x7fffa941a888, owner=owner@entry=0x7fffa941a088, regExp=regExp@entry=0x7fffeb0575d8, string=string@entry=0x7fffa9462240, input=..., startOffset=startOffset@entry=0) at ../../../Source/JavaScriptCore/runtime/RegExpGlobalDataInlines.h:80
#13 0x0000000001e42a6a in JSC::regExpProtoFuncSearchFast (globalObject=0x7fffa941a088, callFrame=&lt;optimized out&gt;) at ../../../Source/JavaScriptCore/runtime/RegExpPrototype.cpp:394
#14 0x00007fffaabf0038 in ?? ()
#15 0x00007fffffffd370 in ?? ()
#16 0x00000000025240fa in llint_op_call ()
#17 0x0000000000000000 in ?? ()

```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2030365</commentid>
    <comment_count>1</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2024-04-22 14:56:06 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 273048 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>