Re: init.sh: enable MALLOC_PERTURB_
On 05/16/2010 02:05 PM, Bruno Haible wrote: enum { a, b, c }; int function (int n) { extern int (* verify_function5 (void)) [(!!sizeof (struct { unsigned int verify_error_if_negative_size__: (c == 2) ? 1 : -1; }))]; return 0; } What version of GCC? I think you should report it to the suse bugzilla, as I cannot reproduce it with either Fedora 12 or upstream GCC 4.5.0. Paolo
Re: init.sh: enable MALLOC_PERTURB_
Hi Paolo, What version of GCC? ... I cannot reproduce it with either Fedora 12 or upstream GCC 4.5.0. gcc -v says: gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux) I think you should report it to the suse bugzilla, I would do so if there was reasonable hope that it changes anything. But openSUSE 11.0 is already marked as discontinued on the ftp servers, and in other distributions the bug is already fixed. Bruno
Re: init.sh: enable MALLOC_PERTURB_
Hi, A week ago, Jim wrote: + init.sh: enable MALLOC_PERTURB_ + * tests/init.sh: Enable glibc's malloc-perturbing option. This triggers a SKIP for test-verify.sh on openSUSE Linux 11.0 systems: test-verify.sh: skipped test: cannot compile error-free SKIP: test-verify.sh The reason is that it runs in a compiler bug: $ $MAKE test-verify.o gcc -DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib -Wall -g -O2 -MT test-verify.o -MD -MP -MF .deps/test-verify.Tpo -c -o test-verify.o test-verify.c test-verify.c: In function ‘function’: test-verify.c:46: internal compiler error: Speicherzugriffsfehler Please submit a full bug report, with preprocessed source if appropriate. See http://bugs.opensuse.org/ for instructions. make: *** [test-verify.o] Fehler 1 The minimal test case is this: === bug.c = enum { a, b, c }; int function (int n) { extern int (* verify_function5 (void)) [(!!sizeof (struct { unsigned int verify_error_if_negative_size__: (c == 2) ? 1 : -1; }))]; return 0; } === $ MALLOC_PERTURB_=87 /usr/bin/gcc -O -S bug.c bug.c: In function ‘function’: bug.c:3: internal compiler error: Speicherzugriffsfehler Please submit a full bug report, with preprocessed source if appropriate. See http://bugs.opensuse.org/ for instructions. The bug is fixed in gcc 4.3.4 and other GCC versions. But there's no point for us to try to trigger compiler bugs as part of the gnulib test suite. I'm applying this as a workaround: 2010-05-16 Bruno Haible br...@clisp.org verify: Avoid skipping the test on openSUSE 11.0. * tests/test-verify.sh: Unset MALLOC_PERTURB_. diff --git a/tests/test-verify.sh b/tests/test-verify.sh index 11b7311..3e76761 100755 --- a/tests/test-verify.sh +++ b/tests/test-verify.sh @@ -1,6 +1,10 @@ #!/bin/sh . ${srcdir=.}/init.sh +# We are not interested in triggering bugs in the compilers and tools +# (such as gcc 4.3.1 on openSUSE 11.0). +unset MALLOC_PERTURB_ + # Rather than figure out how to invoke the compiler with the right # include path ourselves, we let make do it: (cd $initial_cwd_ rm -f test-verify.o \
Re: init.sh: enable MALLOC_PERTURB_
On Sun, May 09, 2010 at 10:47:07PM +0200, Jim Meyering wrote: +# Enable glibc's malloc-perturbing option. +# This is cheap and useful for exposing code that depends on the fact that +# malloc-related functions often return memory that is mostly zeroed. +# If you have the time and cycles, use valgrind to do an even better job. +${MALLOC_PERTURB_=87} +export MALLOC_PERTURB_ PASS: test-verify 87: not found PASS: test-verify.sh Maybe you want: : ${MALLOC_PRETURB_=87} Peter -- Peter O'Gorman po...@thewrittenword.com
Re: init.sh: enable MALLOC_PERTURB_
Peter O'Gorman wrote: On Sun, May 09, 2010 at 10:47:07PM +0200, Jim Meyering wrote: +# Enable glibc's malloc-perturbing option. +# This is cheap and useful for exposing code that depends on the fact that +# malloc-related functions often return memory that is mostly zeroed. +# If you have the time and cycles, use valgrind to do an even better job. +${MALLOC_PERTURB_=87} +export MALLOC_PERTURB_ PASS: test-verify 87: not found PASS: test-verify.sh Maybe you want: : ${MALLOC_PRETURB_=87} Pfaw ;-) Yes. Thanks.
Re: init.sh: enable MALLOC_PERTURB_
Peter O'Gorman wrote: On Sun, May 09, 2010 at 10:47:07PM +0200, Jim Meyering wrote: +# Enable glibc's malloc-perturbing option. +# This is cheap and useful for exposing code that depends on the fact that +# malloc-related functions often return memory that is mostly zeroed. +# If you have the time and cycles, use valgrind to do an even better job. +${MALLOC_PERTURB_=87} +export MALLOC_PERTURB_ PASS: test-verify 87: not found PASS: test-verify.sh Maybe you want: : ${MALLOC_PRETURB_=87} Thanks again. Here's what I have pushed: From f0f1414d0d1f5a904940fac105b8838f132b946b Mon Sep 17 00:00:00 2001 From: Peter O'Gorman po...@thewrittenword.com Date: Mon, 10 May 2010 17:23:08 +0200 Subject: [PATCH] init.sh: fix a typo * tests/init.sh: Correct typo in MALLOC_PERTURB_ initialization. --- ChangeLog |5 + tests/init.sh |2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5510f68..8c762cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-05-10 Peter O'Gorman po...@thewrittenword.com + + init.sh: fix a typo + * tests/init.sh: Correct typo in MALLOC_PERTURB_ initialization. + 2010-05-10 Jim Meyering meyer...@redhat.com maint.mk: avoid using a temporary file in the always-defined-macros check diff --git a/tests/init.sh b/tests/init.sh index 1c0b4b4..05a983a 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -98,7 +98,7 @@ test -n $EXEEXT shopt -s expand_aliases # This is cheap and useful for exposing code that depends on the fact that # malloc-related functions often return memory that is mostly zeroed. # If you have the time and cycles, use valgrind to do an even better job. -${MALLOC_PERTURB_=87} +: ${MALLOC_PERTURB_=87} export MALLOC_PERTURB_ # We use a trap below for cleanup. This requires us to go through -- 1.7.1.189.g07419