<?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>273426</bug_id>
          
          <creation_ts>2024-04-29 12:44:09 -0700</creation_ts>
          <short_desc>[JSC] ASSERTION FAILED: pos &gt;= negativePositionOffest in char32_t JSC::Yarr::Interpreter&lt;unsigned char&gt;::InputStream::readChecked(unsigned int)</short_desc>
          <delta_ts>2024-04-30 22:27:47 -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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2031967</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2024-04-29 12:44:09 -0700</bug_when>
    <thetext>The following regex causes a crash: /(?&lt;!(ab*?))c/i.

DYLD_FRAMEWORK_PATH=./ ./jsC ~/Development/LASER/bugshelf/main-687cffbf9f06590db52690f62dd4b64ac43de4f42bb1b29a34de9d2948683497.js 
ASSERTION FAILED: pos &gt;= negativePositionOffest
./yarr/YarrInterpreter.cpp(279) : char32_t JSC::Yarr::Interpreter&lt;unsigned char&gt;::InputStream::readChecked(unsigned int) [CharType = unsigned char]
1   0x11c8b0778 WTFCrash
2   0x11eef82a8 WTFCrashWithInfo(int, char const*, char const*, int)
3   0x124b9916c JSC::Yarr::Interpreter&lt;unsigned char&gt;::InputStream::readChecked(unsigned int)
4   0x124b8c8d0 JSC::Yarr::Interpreter&lt;unsigned char&gt;::checkCasedCharacter(JSC::Yarr::ByteTerm&amp;, unsigned int)
5   0x124b84fec JSC::Yarr::Interpreter&lt;unsigned char&gt;::matchDisjunction(JSC::Yarr::ByteDisjunction*, JSC::Yarr::Interpreter&lt;unsigned char&gt;::DisjunctionContext*, bool)
6   0x124b4c70c JSC::Yarr::Interpreter&lt;unsigned char&gt;::interpret()
7   0x124b4231c JSC::Yarr::interpret(JSC::Yarr::BytecodePattern*, WTF::StringView, unsigned int, unsigned int*)
8   0x1215d79f4 int JSC::RegExp::matchInline&lt;WTF::Vector&lt;int, 32ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;, (JSC::Yarr::MatchFrom)0&gt;(JSC::JSGlobalObject*, JSC::VM&amp;, WTF::String const&amp;, unsigned int, WTF::Vector&lt;int, 32ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;)
9   0x12152b25c JSC::createRegExpMatchesArray(JSC::VM&amp;, JSC::JSGlobalObject*, JSC::JSString*, WTF::String const&amp;, JSC::RegExp*, unsigned int, JSC::MatchResult&amp;)
10  0x121528bc8 JSC::RegExpObject::execInline(JSC::JSGlobalObject*, JSC::JSString*)
11  0x123985884 JSC::RegExpObject::exec(JSC::JSGlobalObject*, JSC::JSString*)

The problem is that the function backtrackPatternCasedCharacter() doesn&apos;t have the string position checks that backtrackPatternCharacter() has.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2031968</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2024-04-29 12:44:43 -0700</bug_when>
    <thetext>&lt;rdar://127013077&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2032344</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2024-04-30 14:05:58 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/27951</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2032423</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-04-30 22:27:46 -0700</bug_when>
    <thetext>Committed 278204@main (a330a52f59a8): &lt;https://commits.webkit.org/278204@main&gt;

Reviewed commits have been landed. Closing PR #27951 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>