Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #611 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

LLPair for loops coded incorrectly, can cause infinite loop.

Reported by: schveiguy Assigned to: kris
Priority: major Milestone: 0.99.1 RC4
Component: Tango Version: 0.99 RC3 Xammy
Keywords: Cc:

Description

tango/util/collection/impl/LLPair.d contains many incorrect for loops of the following form:

                for (auto p=this; p; p = cast(LLPair)cast(void*)next_)

These should be coded:

                for (auto p=this; p; p = cast(LLPair)cast(void*)p.next_)

Note the incremental statement is changed from "next_" to "p.next_"

the current version can cause an infinite loop if the instance it is called with has a non-null next_ pointer.

Change History

09/04/07 10:37:57 changed by kris

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone changed from 1.0 to 0.99.1 RC4.

Yeah, sorry about that. Fixed in SVN head recently.