Subject: Re: guile segfaults on 32-bit big-endian targets

From: John David Anglin <[email-masked]>
Date: Sat, 12 Dec 2020 18:22:26 -0500

On 2020-12-12 5:47 p.m., John Paul Adrian Glaubitz wrote:
> And m68k and powerpc most likely.
This could also be a bug on 32-bit targets:
  CC       libguile_3.0_la-hash.lo
../../guile/libguile/hash.c: In function 'narrow_string_hash':
../../guile/libguile/hash.c:118:34: warning: left shift count >= width of type [
-Wshift-count-overflow]
  118 |       ret = (((unsigned long) c) << 32) | b;
\
      |                                  ^~
../../guile/libguile/hash.c:128:3: note: in expansion of macro 'JENKINS_LOOKUP3_
HASHWORD2'
  128 |   JENKINS_LOOKUP3_HASHWORD2 (str, len, ret);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
../../guile/libguile/hash.c: In function 'wide_string_hash':
../../guile/libguile/hash.c:118:34: warning: left shift count >= width of type [-Wshift-count-overflow]
  118 |       ret = (((unsigned long) c) << 32) | b;                            \
      |                                  ^~

Regards,
Dave

-- 
John David Anglin  [email-masked]