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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26360</bug_id>
          
          <creation_ts>2014-07-16 22:34:00 +0000</creation_ts>
          <short_desc>&quot;While piece pointer is not zero&quot;</short_desc>
          <delta_ts>2014-07-30 13:47:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>URL</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Albert Wiersch">support</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
    
    <cc>simon.sapin</cc>
          
          <qa_contact>sideshowbarker+urlspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>109027</commentid>
    <comment_count>0</comment_count>
    <who name="Albert Wiersch">support</who>
    <bug_when>2014-07-16 22:34:00 +0000</bug_when>
    <thetext>http://url.spec.whatwg.org/#host-parsing

[[
While piece pointer is not zero
]]

Shouldn&apos;t this be

While piece pointer is not zero and swaps is greater than zero</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109476</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-07-29 09:23:11 +0000</bug_when>
    <thetext>If you could explain why that would help a lot. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109496</commentid>
    <comment_count>2</comment_count>
    <who name="Albert Wiersch">support</who>
    <bug_when>2014-07-29 14:08:05 +0000</bug_when>
    <thetext>I found that my code was swapping too many pieces which also resulted in memory access violations. Adding this change fixed the problem and caused all my IPv6 parse testing to pass.

Also, swaps is the number of pieces that need to be swapped, so when it gets to 0 it doesn&apos;t make any sense to continue swapping, and if swapping continues, will result in corruption.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109573</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-07-30 13:47:06 +0000</bug_when>
    <thetext>Thanks Albert! 

https://github.com/whatwg/url/commit/72e58483bf3cfe2c773ba3b87a710ace0e11ff12</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>