lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> The  problem was:  in lua-4.0.1,  on 64  bit machines,  forced garbage
> collection via  lua_setgcthreshold(L,0) does not run, while  on 32 bit
> it runs.  Eg. on SGI, cc -32 and cc -64 result in different behaviour.

We are very sory. We knew about that bug :-(  Jeff Petkau reported it
to us in November 2002, but in the context of 4.1w4/5.0a. We corrected it
in 5.0b, but forgot to check 4.0.


> Roberto, Luiz, do you make  a bugfix release to 4.0.1 out of it ? 
> 
> If not, I will publish the patch  on the wiki, but I will do that only
> after knowing your decision.

Maybe we will release a 4.0.2 with this bug fixed, but in the meanwhile
it would be good if you put the patch on the wiki. But note that you
do not need to change the type of the parameter (that is, you do not
need to change lua.h). You can correct all in lapi.c:

++  #define GCscalel(x)              (((x)>>10)) 
    (notice that this is a new macro, different from GCscale)


--  if (newthreshold > GCscale(ULONG_MAX))
++  if ((unsigned long)newthreshold > GCscalel(ULONG_MAX))

-- Roberto