Hi,

This is just to let you know of a GCC bug in GCC7.4.0 (default in Ubuntu
18.04 LTS) when compiling racketcs.

GCC complains about
vfasl.c:358:134: error: array subscript is above array bounds
[-Werror=array-bounds]

on vfasl.c of Chez sources. However, this is a false positive fixed on
more recent GCC versions. On ubuntu 18.04:
racket/racket/src/ChezScheme/ta6le/c$ apt-get install -y gcc-8
racket/racket/src/ChezScheme/ta6le/c$ gcc  -m64 -msse2 -Wpointer-arith
-Wall -Wextra -Werror -Wno-implicit-fallthrough -O2 -D_REENTRANT
-pthread -march=native -O3 -Wall -DELF_FIND_BOOT_SECTION -pthread -c
-DX86_64 -I../boot/ta6le -I../zlib -I../lz4/lib vfasl.c
vfasl.c: In function ‘S_vfasl’:
vfasl.c:352:134: error: array subscript is above array bounds
[-Werror=array-bounds]
       MAYBE_FIXUP(0);
...
cc1: all warnings being treated as errors
racket/racket/src/ChezScheme/ta6le/c$ gcc-8  -m64 -msse2 -Wpointer-arith
-Wall -Wextra -Werror -Wno-implicit-fallthrough -O2 -D_REENTRANT
-pthread -march=native -O3 -Wall -DELF_FIND_BOOT_SECTION -pthread -c
-DX86_64 -I../boot/ta6le -I../zlib -I../lz4/lib vfasl.c
$

The broken gcc version:
$ gcc --version
gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Fixed:
$ gcc-8 --version
gcc-8 (Ubuntu 8.3.0-6ubuntu1~18.04) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The might have come in long before 8.3.0 but I haven't run further
tests. This is relevant to know because the bug is in the default GCC
for Ubuntu LTS.

If I find more, I will let you know.

Regards,
-- 
Paulo Matos

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-dev+unsubscr...@googlegroups.com.
To post to this group, send email to racket-dev@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/72642853-8f01-61a3-033d-b38be5e71207%40linki.tools.
For more options, visit https://groups.google.com/d/optout.

Reply via email to