public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build
@ 2012-09-24 12:19 markus at trippelsdorf dot de
  2012-09-24 18:45 ` [Bug other/54691] " zsojka at seznam dot cz
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: markus at trippelsdorf dot de @ 2012-09-24 12:19 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

             Bug #: 54691
           Summary: [4.8 Regression] --enable-checking=valgrind doesn't
                    build
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: markus@trippelsdorf.de


--disable-bootstrap --enable-checking=valgrind doesn't build:

...
true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2
-D_GNU_SOURCE" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/
usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644"
"INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c"
"JC1FLAGS=" 
"LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make"
"MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000  " "PICFLAG=" "P
ICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/usr/local"
"infodir=/usr/local/share/info" "libdir=/usr/local/lib" "prefix=/usr/loc
al" "includedir=/usr/local/include" "AR=ar"
"AS=/var/tmp/gcc_build_dir/./gcc/as" "CC=/var/tmp/gcc_build_dir/./gcc/xgcc
-B/var/tmp/gcc_build_dir/./gcc
/ -B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
 /usr/local/x86_64-unknown-linux-gnu/sys-include   "
"CXX=-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isys
tem /usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include   "
"LD=/var/tmp/gcc_build_dir/./gcc/collect
-ld" "LIBCFLAGS=-g -O2" "NM=/var/tmp/gcc_build_dir/./gcc/nm" "PICFLAG="
"RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make
/bin/sh ./libtool --tag=CC   --mode=link /var/tmp/gcc_build_dir/./gcc/xgcc
-B/var/tmp/gcc_build_dir/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/
 -B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-inc
lude    -Wall -g -O2 -version-info `grep -v '^#'
/home/markus/gcc/libssp/libtool-version`
-Wl,--version-script=/home/markus/gcc/libssp/ssp.map   -o l
ibssp.la -rpath /usr/local/lib/../lib64 ssp.lo gets-chk.lo memcpy-chk.lo
memmove-chk.lo mempcpy-chk.lo memset-chk.lo snprintf-chk.lo sprintf-chk.lo s
tpcpy-chk.lo strcat-chk.lo strcpy-chk.lo strncat-chk.lo strncpy-chk.lo
vsnprintf-chk.lo vsprintf-chk.lo  
libtool: link: /var/tmp/gcc_build_dir/./gcc/xgcc
-B/var/tmp/gcc_build_dir/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unkno
wn-linux-gnu/lib/ -isystem /usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include    -shared  .libs/ssp
.o .libs/gets-chk.o .libs/memcpy-chk.o .libs/memmove-chk.o .libs/mempcpy-chk.o
.libs/memset-chk.o .libs/snprintf-chk.o .libs/sprintf-chk.o .libs/stpc
py-chk.o .libs/strcat-chk.o .libs/strcpy-chk.o .libs/strncat-chk.o
.libs/strncpy-chk.o .libs/vsnprintf-chk.o .libs/vsprintf-chk.o     -O2
-Wl,--versi
on-script=/home/markus/gcc/libssp/ssp.map   -Wl,-soname -Wl,libssp.so.0 -o
.libs/libssp.so.0.0.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/ssp.o: requires dynamic R_X86_64_32 reloc which may overf
low at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/ssp.o: requires dynamic R_X86_64_PC32 reloc against '__st
ack_chk_guard' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/gets-chk.o: requires dynamic R_X86_64_PC32 reloc against 
'malloc' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/memcpy-chk.o: requires dynamic R_X86_64_PC32 reloc agains
t '__chk_fail' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/memmove-chk.o: requires dynamic R_X86_64_PC32 reloc again
st '__chk_fail' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/mempcpy-chk.o: requires dynamic R_X86_64_PC32 reloc again
st 'memcpy' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/memset-chk.o: requires dynamic R_X86_64_PC32 reloc agains
t '__chk_fail' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/snprintf-chk.o: requires dynamic R_X86_64_PC32 reloc agai
nst 'vsnprintf' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/sprintf-chk.o: requires dynamic R_X86_64_PC32 reloc again
st 'vsnprintf' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/stpcpy-chk.o: requires dynamic R_X86_64_PC32 reloc agains
t 'strlen' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/strcat-chk.o: requires dynamic R_X86_64_PC32 reloc agains
t '__chk_fail' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/strcpy-chk.o: requires dynamic R_X86_64_PC32 reloc agains
t 'strlen' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/strncat-chk.o: requires dynamic R_X86_64_PC32 reloc again
st '__chk_fail' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/strncpy-chk.o: requires dynamic R_X86_64_PC32 reloc again
st '__chk_fail' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/vsnprintf-chk.o: requires dynamic R_X86_64_PC32 reloc aga
inst '__chk_fail' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: .libs/vsprintf-chk.o: requires dynamic R_X86_64_PC32 reloc agai
nst 'vsnprintf' which may overflow at runtime; recompile with -fPIC
collect2: error: ld returned 1 exit status
make[3]: *** [libssp.la] Error 1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
@ 2012-09-24 18:45 ` zsojka at seznam dot cz
  2012-10-11 18:22 ` hjl.tools at gmail dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: zsojka at seznam dot cz @ 2012-09-24 18:45 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2012-09-24 18:44:51 UTC ---
At x86_64-unknown-linux-gnu, the build fails at a different place:


...
libtool: link:
/home/smatz/build-191654-lto-checking-valgrind-disable-bootstrap-disable-graphite/./gcc/xgcc
-B/home/smatz/build-191654-lto-checking-valgrind-disable-bootstrap-disable-graphite/./gcc/
-B/mnt/svn/gcc-trunk/binary-191654-lto-checking-valgrind-disable-bootstrap-disable-graphite/x86_64-unknown-linux-gnu/bin/
-B/mnt/svn/gcc-trunk/binary-191654-lto-checking-valgrind-disable-bootstrap-disable-graphite/x86_64-unknown-linux-gnu/lib/
-isystem
/mnt/svn/gcc-trunk/binary-191654-lto-checking-valgrind-disable-bootstrap-disable-graphite/x86_64-unknown-linux-gnu/include
-isystem
/mnt/svn/gcc-trunk/binary-191654-lto-checking-valgrind-disable-bootstrap-disable-graphite/x86_64-unknown-linux-gnu/sys-include
   -shared  math/.libs/acoshq.o math/.libs/fmodq.o math/.libs/acosq.o
math/.libs/frexpq.o math/.libs/rem_pio2q.o math/.libs/asinhq.o
math/.libs/hypotq.o math/.libs/remainderq.o math/.libs/asinq.o
math/.libs/rintq.o math/.libs/atan2q.o math/.libs/isinfq.o math/.libs/roundq.o
math/.libs/atanhq.o math/.libs/isnanq.o math/.libs/scalblnq.o
math/.libs/atanq.o math/.libs/j0q.o math/.libs/scalbnq.o math/.libs/cbrtq.o
math/.libs/j1q.o math/.libs/signbitq.o math/.libs/ceilq.o math/.libs/jnq.o
math/.libs/sincos_table.o math/.libs/complex.o math/.libs/ldexpq.o
math/.libs/sincosq.o math/.libs/copysignq.o math/.libs/lgammaq.o
math/.libs/sincosq_kernel.o math/.libs/coshq.o math/.libs/llroundq.o
math/.libs/sinhq.o math/.libs/cosq.o math/.libs/log10q.o math/.libs/sinq.o
math/.libs/cosq_kernel.o math/.libs/log1pq.o math/.libs/sinq_kernel.o
math/.libs/erfq.o math/.libs/logq.o math/.libs/sqrtq.o math/.libs/expm1q.o
math/.libs/lroundq.o math/.libs/tanhq.o math/.libs/expq.o math/.libs/modfq.o
math/.libs/tanq.o math/.libs/fabsq.o math/.libs/nanq.o math/.libs/tgammaq.o
math/.libs/finiteq.o math/.libs/nextafterq.o math/.libs/truncq.o
math/.libs/floorq.o math/.libs/powq.o math/.libs/fmaq.o math/.libs/cacoshq.o
math/.libs/cacosq.o math/.libs/casinhq.o math/.libs/casinq.o
math/.libs/catanhq.o math/.libs/catanq.o math/.libs/cimagq.o math/.libs/conjq.o
math/.libs/cprojq.o math/.libs/crealq.o math/.libs/fdimq.o math/.libs/fmaxq.o
math/.libs/fminq.o math/.libs/ilogbq.o math/.libs/llrintq.o math/.libs/log2q.o
math/.libs/lrintq.o math/.libs/nearbyintq.o math/.libs/remquoq.o
printf/.libs/addmul_1.o printf/.libs/add_n.o printf/.libs/cmp.o
printf/.libs/divrem.o printf/.libs/flt1282mpn.o printf/.libs/fpioconst.o
printf/.libs/lshift.o printf/.libs/mul_1.o printf/.libs/mul_n.o
printf/.libs/mul.o printf/.libs/printf_fphex.o printf/.libs/printf_fp.o
printf/.libs/quadmath-printf.o printf/.libs/rshift.o printf/.libs/submul_1.o
printf/.libs/sub_n.o strtod/.libs/strtoflt128.o strtod/.libs/mpn2flt128.o
strtod/.libs/tens_in_limb.o    -lm 
-Wl,--version-script=/mnt/svn/gcc-trunk/libquadmath/quadmath.map   -Wl,-soname
-Wl,libquadmath.so.0 -o .libs/libquadmath.so.0.0.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/../../../../x86_64-pc-linux-gnu/bin/ld:
math/.libs/fmodq.o: relocation R_X86_64_32S against `.rodata' can not be used
when making a shared object; recompile with -fPIC
math/.libs/fmodq.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[3]: *** [libquadmath.la] Error 1
make[3]: Leaving directory
`/home/smatz/build-191654-lto-checking-valgrind-disable-bootstrap-disable-graphite/x86_64-unknown-linux-gnu/libquadmath'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/smatz/build-191654-lto-checking-valgrind-disable-bootstrap-disable-graphite/x86_64-unknown-linux-gnu/libquadmath'
make[1]: *** [all-target-libquadmath] Error 2
make[1]: Leaving directory
`/home/smatz/build-191654-lto-checking-valgrind-disable-bootstrap-disable-graphite'
make: *** [all] Error 2


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
  2012-09-24 18:45 ` [Bug other/54691] " zsojka at seznam dot cz
@ 2012-10-11 18:22 ` hjl.tools at gmail dot com
  2012-10-12 14:08 ` hjl.tools at gmail dot com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-11 18:22 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-11 18:22:07 UTC ---
Please try ld.bfd from binutils trunk or 2.23.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
  2012-09-24 18:45 ` [Bug other/54691] " zsojka at seznam dot cz
  2012-10-11 18:22 ` hjl.tools at gmail dot com
@ 2012-10-12 14:08 ` hjl.tools at gmail dot com
  2012-10-12 16:48 ` hjl.tools at gmail dot com
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-12 14:08 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-12
                 CC|                            |hjl.tools at gmail dot com
     Ever Confirmed|0                           |1

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-12 14:08:08 UTC ---
PIC detection failed with valgrind:

configure:8446:
/export/build/gnu/gcc-lto-valgrind/build-x86_64-linux/./gcc/xgcc
-B/export/build/gnu/gcc-lto-valgrind/build-x86_64-linux/./gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include  -m32 -c -g -O2 -pthread  -fPIC
-DPIC -DPIC conftest.c >&5
==15652== Invalid read of size 8
==15652==    at 0xEF7C94: search_line_sse42(unsigned char const*, unsigned char
const*) (lex.c:464)
==15652==    by 0xEF7F48: _cpp_clean_line (lex.c:742)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (2 preceding siblings ...)
  2012-10-12 14:08 ` hjl.tools at gmail dot com
@ 2012-10-12 16:48 ` hjl.tools at gmail dot com
  2012-10-12 17:06 ` ubizjak at gmail dot com
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-12 16:48 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-12 16:47:58 UTC ---
Please try git hjl/valgrind branch:

http://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/heads/hjl/valgrind


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (3 preceding siblings ...)
  2012-10-12 16:48 ` hjl.tools at gmail dot com
@ 2012-10-12 17:06 ` ubizjak at gmail dot com
  2012-10-12 18:46 ` markus at trippelsdorf dot de
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-10-12 17:06 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #5 from Uros Bizjak <ubizjak at gmail dot com> 2012-10-12 17:06:25 UTC ---
Maybe VALGRIND_DISCARD would come handy here?


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (4 preceding siblings ...)
  2012-10-12 17:06 ` ubizjak at gmail dot com
@ 2012-10-12 18:46 ` markus at trippelsdorf dot de
  2012-10-14 16:23 ` ubizjak at gmail dot com
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: markus at trippelsdorf dot de @ 2012-10-12 18:46 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #6 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-10-12 18:46:14 UTC ---
(In reply to comment #4)
> Please try git hjl/valgrind branch:
> 
> http://gcc.gnu.org/git/?p=gcc.git;a=shortlog;h=refs/heads/hjl/valgrind

It builds fine now. Thank you.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (5 preceding siblings ...)
  2012-10-12 18:46 ` markus at trippelsdorf dot de
@ 2012-10-14 16:23 ` ubizjak at gmail dot com
  2012-10-14 19:23 ` hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-10-14 16:23 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2012-10-14 16:23:04 UTC ---
Created attachment 28445
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28445
Prototype patch that introduces VALGRIND_MAKE_MEM_DEFINED

Attached prototype patch builds on HJ's patch. The patch detects valgrind in
the same way as in gcc directory (actually, it just copies relevant bits) and
changes:

+      memset (to.text + to.len + 1, 0, 16);

to

+      VALGRIND_DISCARD (VALGRIND_MAKE_MEM_DEFINED (to.text + to.len + 1, 16));

(BTW: Probably, we should align end of buffer to 16 byte boundary instead of
hardcoding 16.)

(BTW2: the test in the following code in the patch is obviously wrong:

+if test $enable_checking != no ; then
+  # It is certainly possible that there's valgrind but no valgrind.h.
+  # GCC relies on making annotations so we must have both.
+  AC_MSG_CHECKING(for VALGRIND_DISCARD in <valgrind/memcheck.h>)
+  AC_PREPROC_IFELSE([AC_LANG_SOURCE(
...)


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (6 preceding siblings ...)
  2012-10-14 16:23 ` ubizjak at gmail dot com
@ 2012-10-14 19:23 ` hjl.tools at gmail dot com
  2012-10-15  7:00 ` ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-14 19:23 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-14 19:23:11 UTC ---
(In reply to comment #7)
> Created attachment 28445 [details]
> Prototype patch that introduces VALGRIND_MAKE_MEM_DEFINED
> 
> Attached prototype patch builds on HJ's patch. The patch detects valgrind in
> the same way as in gcc directory (actually, it just copies relevant bits) and
> changes:
> 
> +      memset (to.text + to.len + 1, 0, 16);
> 
> to
> 
> +      VALGRIND_DISCARD (VALGRIND_MAKE_MEM_DEFINED (to.text + to.len + 1, 16));
> 
> (BTW: Probably, we should align end of buffer to 16 byte boundary instead of
> hardcoding 16.)
> 

libcpp will read in advance beyond the end of buffer in
some cases, even without SSE optimization.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (7 preceding siblings ...)
  2012-10-14 19:23 ` hjl.tools at gmail dot com
@ 2012-10-15  7:00 ` ubizjak at gmail dot com
  2012-10-15  7:06 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-10-15  7:00 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #9 from Uros Bizjak <ubizjak at gmail dot com> 2012-10-15 07:00:15 UTC ---
(In reply to comment #8)

> libcpp will read in advance beyond the end of buffer in
> some cases, even without SSE optimization.

I'd call this a bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (8 preceding siblings ...)
  2012-10-15  7:00 ` ubizjak at gmail dot com
@ 2012-10-15  7:06 ` pinskia at gcc dot gnu.org
  2012-10-15  7:19 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-10-15  7:06 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-10-15 07:05:43 UTC ---
(In reply to comment #9)
> (In reply to comment #8)
> 
> > libcpp will read in advance beyond the end of buffer in
> > some cases, even without SSE optimization.
> 
> I'd call this a bug.

No it is not a bug.  Even if the read happens, since a null character is found,
the behavior does not change.  Also it is never on an unaligned read so we can
never hit a page fault due to unmapped pages.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (9 preceding siblings ...)
  2012-10-15  7:06 ` pinskia at gcc dot gnu.org
@ 2012-10-15  7:19 ` hjl.tools at gmail dot com
  2012-11-25 15:52 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-15  7:19 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-15 07:18:45 UTC ---
search_line_acc_char has

  /* Align the buffer.  Mask out any bytes from before the beginning.  */
  p = (word_type *)((uintptr_t)s & -sizeof(word_type));

It is OK to pad the buffer end just to 16-byte aligned.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (10 preceding siblings ...)
  2012-10-15  7:19 ` hjl.tools at gmail dot com
@ 2012-11-25 15:52 ` rguenth at gcc dot gnu.org
  2012-11-25 22:15 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-11-25 15:52 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (11 preceding siblings ...)
  2012-11-25 15:52 ` rguenth at gcc dot gnu.org
@ 2012-11-25 22:15 ` hjl.tools at gmail dot com
  2012-12-03 17:20 ` jakub at gcc dot gnu.org
  2012-12-03 17:29 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-25 22:15 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-25 22:15:22 UTC ---
This patch:

http://gcc.gnu.org/ml/gcc-patches/2012-11/msg01973.html

works.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (12 preceding siblings ...)
  2012-11-25 22:15 ` hjl.tools at gmail dot com
@ 2012-12-03 17:20 ` jakub at gcc dot gnu.org
  2012-12-03 17:29 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-03 17:20 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-03 17:20:01 UTC ---
Author: jakub
Date: Mon Dec  3 17:19:47 2012
New Revision: 194102

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194102
Log:
    PR bootstrap/55380
    PR other/54691
    * files.c (read_file_guts): Allocate extra 16 bytes instead of
    1 byte at the end of buf.  Pass size + 16 instead of size
    to _cpp_convert_input.
    * charset.c (_cpp_convert_input): Reallocate if there aren't
    at least 16 bytes beyond to.len in the buffer.  Clear 16 bytes
    at to.text + to.len.

Modified:
    trunk/libcpp/ChangeLog
    trunk/libcpp/charset.c
    trunk/libcpp/files.c


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug other/54691] [4.8 Regression] --enable-checking=valgrind doesn't build
  2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
                   ` (13 preceding siblings ...)
  2012-12-03 17:20 ` jakub at gcc dot gnu.org
@ 2012-12-03 17:29 ` jakub at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-03 17:29 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54691

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-03 17:29:05 UTC ---
Should be fixed now.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-12-03 17:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-24 12:19 [Bug other/54691] New: [4.8 Regression] --enable-checking=valgrind doesn't build markus at trippelsdorf dot de
2012-09-24 18:45 ` [Bug other/54691] " zsojka at seznam dot cz
2012-10-11 18:22 ` hjl.tools at gmail dot com
2012-10-12 14:08 ` hjl.tools at gmail dot com
2012-10-12 16:48 ` hjl.tools at gmail dot com
2012-10-12 17:06 ` ubizjak at gmail dot com
2012-10-12 18:46 ` markus at trippelsdorf dot de
2012-10-14 16:23 ` ubizjak at gmail dot com
2012-10-14 19:23 ` hjl.tools at gmail dot com
2012-10-15  7:00 ` ubizjak at gmail dot com
2012-10-15  7:06 ` pinskia at gcc dot gnu.org
2012-10-15  7:19 ` hjl.tools at gmail dot com
2012-11-25 15:52 ` rguenth at gcc dot gnu.org
2012-11-25 22:15 ` hjl.tools at gmail dot com
2012-12-03 17:20 ` jakub at gcc dot gnu.org
2012-12-03 17:29 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).