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

Re: Bug#115400: gnucash/gwrapguile/guile on alpha/ia64 bug

Anthony Towns <aj@azure.humbug.org.au> writes:

> The problem now is pretty simple. SCM_UNPACK casts obj (which is basically
> 64 bits of something) to an scm_bits_t, which is a long, and the value
> happens to be ~0 (ULONG_MAX).  ((long)-1) >> 1 == -1 (sign preserving),
> and -1 % n == -1 too (I think n's 31 here, for concreteness, but it
> shouldn't matter), and casting that to an unsigned int gives 2^32-1,
> which is out of range.


> Gwrapguile also has some self tests that show up the bug, but doesn't run
> them at build time. Boo gwrapguile. This should be fixed, hopefully the
> control commands above should remind Monsieur Goerzen to do so sometime.

Yep -- make check isn't run by default, in g-wrap, but that seemed to
be the GNU autoake standard, so that's how I set things up upstream
(or do you mean that the debian package should run make check?)

> It's not clear to me what the fix is as far as guile is concerned.
> Changing scm_bits_t from long to unsigned long would fix it, but would
> probably cause hosts of other issues. Going through and changing all
> the hash functions to have "n" be unsigned long instead of unsigned int
> should work. Otherwise going through and adding explicit casts would be
> a possibility. Upstream probably need to decide on this. It'd also be
> nice if they had some self tests of their own.

I spent some time tracking this down and I believe I fixed this
problem (and some related problems for sure) a little while ago in the
guile 1.5.X branch, (soon to be a 1.6 stable release) and in CVS HEAD,
but I can't recall exactly how extensive the fixes were, and haven't
had time to investigate backporting to 1.4.x.

Since I'm also the guile upstream release manager, I'm spending most
of my guile related cycles trying to get 1.6 out, and then packaging
it for debian (which will be a major overhaul) :<

If someone else wants to see if they can come up with a patch that
works based on guile CVS changes around 2001-09-21 (see
libguile/ChangeLog in CVS and try a 

  cvs diff -u -D 2001-09-20 -D 2001-09-22

I thought I also made some changes to tags.h too, but it's not in the
entry and I can't recall for sure.  If I did, it'd show up in the cvs

Hope this helps.

Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD

Reply to: