Thread overview
rehash unstability - data.txt
Sep 08, 2003
kw
Sep 08, 2003
Charles Sanders
Sep 08, 2003
kw
Sep 13, 2003
Walter
September 08, 2003
import stream;

void main()
{
int[char[]] esdom;
File f = new File("data.txt");

while(!f.eof())  esdom[f.readLine()] = 0;
f.close();
esdom.rehash;
}

DMD 0.71
With the attached data.txt file, rehash never ends (or takes a looong time).  If
you remove/change the last line of data.txt, rehash does its stuff in a blink.


September 08, 2003
Is this on linux ?  I had a bug that when reading in a file using eof(), if the file did not end in a new line it would seg fault, or just hang forever.

Charles

"kw" <kw_member@pathlink.com> wrote in message news:bjid97$169c$1@digitaldaemon.com...
> import stream;
>
> void main()
> {
> int[char[]] esdom;
> File f = new File("data.txt");
>
> while(!f.eof())  esdom[f.readLine()] = 0;
> f.close();
> esdom.rehash;
> }
>
> DMD 0.71
> With the attached data.txt file, rehash never ends (or takes a looong
time).  If
> you remove/change the last line of data.txt, rehash does its stuff in a
blink.
>
>
>


September 08, 2003
In article <bjikil$1h4t$1@digitaldaemon.com>, Charles Sanders says...
>
>Is this on linux ?  I had a bug that when reading in a file using eof(), if the file did not end in a new line it would seg fault, or just hang forever.

No, Windows.  It also can be reproduced without using files.


September 13, 2003
I have this fixed now. -Walter