Complete.Org: Mailing Lists: Archives: freeciv-dev: July 1999:
Re: [Freeciv-Dev] Server hangs on an Alpha
Home

Re: [Freeciv-Dev] Server hangs on an Alpha

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: schaefer@xxxxxx
Subject: Re: [Freeciv-Dev] Server hangs on an Alpha
From: Matthew OConnor <matthew@xxxxxxxxxxxxxx>
Date: Thu, 29 Jul 1999 16:30:46 -0500

Peter Schaefer [schaefer@xxxxxx] said:

> Matthew OConnor wrote:
> > 
> >   Now on the 1st call to makeisland() islemass is zero.  We go through
> >   lines 1127 to 1140 just fine.  Then at line 1141 we "magically" go
> >   back to the beginning of makeisland().  Now remember, I compiled
> >   with -O0.  There is no code optimization going on.
> >
> 
> Thank you, that is a very accurate and helpful report.
> One idea would be to isolate the error and
>  find out if it is really a compiler bug.

I tried to reproduce the "bug" w/ an example but I was unable to do
so.


> What happens if lines L 1141 to L 1145 are moved to the top( below L 1126 ?)

The problem persists.  In fact unless I typecast the "myrands" the
code never gets run at all.  (Or at least it looks like it doesn't
inside of GDB).


> Does the bug also occur if completely different code ( several printf's for 
> example ) 
> is between L1126 and L1127 ?

Yes I replaced each *buck line with:

  x = -myrand(totalmass);
  printf("x is %d", x);
  riverbuck = x;

Where "riverbuck = x" changed for each buck.  And I moved lines 1141
to 1145 to the top of that then-block (just below 1126) and looking at
the code run in GDB it would just either jump right over the line or
go through them and have no effect.  (the value of riverbuck before
and after would be the same).  Likewise for the other *bucks.

That seems odd to me.  Even if it was a casting issue, which IMHO it
shouldn't be, I would think the value of the *bucks would at least
change.

I don't pretend to know how these things work. :/

[Prev in Thread] Current Thread [Next in Thread]