This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26360 - "While piece pointer is not zero"
Summary: "While piece pointer is not zero"
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+urlspec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-16 22:34 UTC by Albert Wiersch
Modified: 2014-07-30 13:47 UTC (History)
2 users (show)

See Also:


Attachments

Description Albert Wiersch 2014-07-16 22:34:00 UTC
http://url.spec.whatwg.org/#host-parsing

[[
While piece pointer is not zero
]]

Shouldn't this be

While piece pointer is not zero and swaps is greater than zero
Comment 1 Anne 2014-07-29 09:23:11 UTC
If you could explain why that would help a lot. Thanks.
Comment 2 Albert Wiersch 2014-07-29 14:08:05 UTC
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't make any sense to continue swapping, and if swapping continues, will result in corruption.