On Wed, 22 Nov 2017, Marc Glisse wrote:
On Wed, 22 Nov 2017, Christophe Lyon wrote:
Since you committed this patch (r255021), my cross-builds of GCC for
aarch64-linux-gnu fail while building glibc:
/tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/bin/aarch64-none-linux-gnu-gcc
fetch-value.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wundef
-Wwrite-string
s -fmerge-all-constants -frounding-math -g -Wstrict-prototypes -fPIC
-I../include
-I/tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-linux-gnu/gl
ibc-1/nptl_db
-I/tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-linux-gnu/glibc-1
-I../sysdeps/unix/sysv/linux/aarch64/nptl -I../sysdeps/unix/sysv/lin
ux/aarch64 -I../sysdeps/unix/sysv/linux/generic
-I../sysdeps/unix/sysv/linux/wordsize-64
-I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread
-I../sysdeps/pthread -I
../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/inet
-I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv
-I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps
/posix -I../sysdeps/aarch64/fpu -I../sysdeps/aarch64/nptl
-I../sysdeps/aarch64 -I../sysdeps/wordsize-64
-I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64/wordsize-6
4 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32
-I../sysdeps/aarch64/soft-fp -I../sysdeps/ieee754
-I../sysdeps/generic -I../nptl -I.. -I../libio -I. -nostdinc -i
system
/tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/tools/lib/gcc/aarch64-none-linux-gnu/8.0.0/include
-isystem /tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc
/tools/lib/gcc/aarch64-none-linux-gnu/8.0.0/include-fixed -isystem
/tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/sysroot-aarch64-none-linux-gnu/usr/include
-D_LIBC_REE
NTRANT -include ../include/libc-symbols.h -DPIC -DSHARED
-DNOT_IN_libc=1 -DIS_IN_libthread_db=1 -DIN_LIB=libthread_db -o
/tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccs
rc/obj-aarch64-none-linux-gnu/glibc-1/nptl_db/fetch-value.os -MD -MP
-MF
/tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-linux-gnu/glibc-1/nptl_db/fetch-
value.os.dt -MT
/tmp/6857183_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-linux-gnu/glibc-1/nptl_db/fetch-value.os
during GIMPLE pass: vrp
fetch-value.c: In function '_td_locate_field':
fetch-value.c:44:1: internal compiler error: Segmentation fault
_td_locate_field (td_thragent_t *ta,
^~~~~~~~~~~~~~~~
0xb87c75 crash_signal
/tmp/6857183_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/toplev.c:325
0x5b1934 contains_struct_check
/tmp/6857183_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree.h:3459
0x5b1934 wi::to_wide(tree_node const*)
/tmp/6857183_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree.h:5247
0xf05557 vr_values::two_valued_val_range_p(tree_node*, tree_node**,
tree_node**)
/tmp/6857183_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/vr-values.c:4051
0xf0ee48 vr_values::simplify_stmt_using_ranges(gimple_stmt_iterator*)
/tmp/6857183_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/vr-values.c:4115
0xd7068f
substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
/tmp/6857183_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-ssa-propagate.c:1073
0x1204860 dom_walker::walk(basic_block_def*)
/tmp/6857183_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/domwalk.c:308
0xd6e805 substitute_and_fold_engine::substitute_and_fold()
/tmp/6857183_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-ssa-propagate.c:1173
0xe71b0b vrp_prop::vrp_finalize(bool)
/tmp/6857183_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vrp.c:6788
0xe81667 execute_vrp
/tmp/6857183_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/tree-vrp.c:6864
Please submit a full bug report,
Looks like PR 83104.
(I am a bit curious what the code looks like, since the testcase in the PR is
rather on the undefined side of things, though ok for something embedded)
if (idx != 0 && DB_DESC_NELEM (desc) != 0
&& idx - (psaddr_t) 0 > DB_DESC_NELEM (desc))
"idx - (psaddr_t) 0": glibc should probably avoid doing pointer arithmetic
with a null pointer, "(ptrdiff_t) idx" looks equivalent.
--
Marc Glisse