<?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>282200</bug_id>
          
          <creation_ts>2024-10-28 13:33:05 -0700</creation_ts>
          <short_desc>ASAN_TRAP | Yarr::CharacterClassConstructor::unicodeOpSorted due to out of order Unicode Case Folding</short_desc>
          <delta_ts>2024-10-28 23:01:14 -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>bfulgham</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2071032</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2024-10-28 13:33:05 -0700</bug_when>
    <thetext>We get an ASAN Crash Log on main:
ASSERTION FAILED: ch &gt;= chunkLo
./yarr/YarrPattern.cpp(807) : void JSC::Yarr::CharacterClassConstructor::unicodeOpSorted(const Vector&lt;char32_t&gt; &amp;, const Vector&lt;CharacterRange&gt; &amp;)
1   0x129209648 JSC::Yarr::CharacterClassConstructor::unicodeOpSorted(WTF::Vector&lt;char32_t, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt; const&amp;, WTF::Vector&lt;JSC::Yarr::CharacterRange, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt; const&amp;)
2   0x129206de4 JSC::Yarr::CharacterClassConstructor::performSetOpWithMatches(WTF::Vector&lt;char32_t, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt; const&amp;, WTF::Vector&lt;JSC::Yarr::CharacterRange, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt; const&amp;, WTF::Vector&lt;char32_t, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt; const&amp;, WTF::Vector&lt;JSC::Yarr::CharacterRange, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt; const&amp;)
3   0x12922f330 JSC::Yarr::CharacterClassConstructor::atomClassStringDisjunction(WTF::Vector&lt;WTF::Vector&lt;char32_t, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;)
4   0x12922eae8 JSC::Yarr::YarrPatternConstructor::atomClassStringDisjunction(WTF::Vector&lt;WTF::Vector&lt;char32_t, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;&amp;)
5   0x12922e1cc JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::ClassStringDisjunctionParserDelegate::end()
6   0x12922890c JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::parseClassStringDisjunction(bool&amp;)
7   0x129225234 JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::TokenType JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::parseEscape&lt;(JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::ParseEscapeMode)2, JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::ClassSetParserDelegate&gt;(JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::ClassSetParserDelegate&amp;)
8   0x12920027c JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::parseClassSetEscape(JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::ClassSetParserDelegate&amp;)
9   0x1291e6bec JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::parseClassSet()
10  0x1291e1b6c JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::parseTokens()
11  0x1291dec24 JSC::Yarr::Parser&lt;JSC::Yarr::YarrPatternConstructor, unsigned char&gt;::parse()
12  0x12905b3f0 JSC::Yarr::ErrorCode JSC::Yarr::parse&lt;JSC::Yarr::YarrPatternConstructor&gt;(JSC::Yarr::YarrPatternConstructor&amp;, WTF::StringView, JSC::Yarr::CompileMode, unsigned int, bool)
...

This happens with the two test cases added in https://bugs.webkit.org/show_bug.cgi?id=279780.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2071034</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2024-10-28 13:33:29 -0700</bug_when>
    <thetext>&lt;rdar://138178588&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2071046</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2024-10-28 13:45:17 -0700</bug_when>
    <thetext>Pull request: https://github.com/apple/WebKit/pull/2118</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2071091</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2024-10-28 16:13:25 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/35831</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2071184</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-10-28 23:01:12 -0700</bug_when>
    <thetext>Committed 285819@main (548b60525e35): &lt;https://commits.webkit.org/285819@main&gt;

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

    </bug>

</bugzilla>