results of gnulib tests with -fsanitize=undefined

2017-05-19 Thread Bruno Haible
Out of curiosity, I configured and ran a gnulib testdir with CFLAGS="-ggdb -O -fsanitize=undefined". Here are the results. FAIL: test-get-rusage-data == ../../gltests/test-get-rusage-data.c:60: assertion 'value3 > value1' failed FAIL test-get-rusage-data (exit status: 13

results of gnulib tests with -fsanitize-address-use-after-scope

2017-05-19 Thread Bruno Haible
Results of a gnulib testdir configured with CFLAGS="-O -ggdb -fsanitize-address-use-after-scope": No test failures. Bruno

Re: make coverage

2017-05-19 Thread Tim Rühsen
On 05/18/2017 10:15 PM, Bruno Haible wrote: > Hi Tim, > >>> What do you get if you change the value 500 in >>> tests/test-fprintf-posix2.c to a larger or smaller value? >> >> Both succeed with 5000 (10x higher). > > Good, that's the way I'd like to see it fixed. But a malloc(50 MB) > is e

results of gnulib tests with -fsanitize=leak

2017-05-19 Thread Bruno Haible
Results of a gnulib testdir configured with CFLAGS="-O -ggdb -fsanitize=leak": 32 tests failed (see below). I'm not interested in spending time to make the gnulib tests return all their allocated memory. I think such tests should better be done in packages that use gnulib (e.g. coreutils, wget, ge

Re: select() issue in MinGW build

2017-05-19 Thread Tim Rühsen
On 05/18/2017 07:15 PM, Bruno Haible wrote: >> Currently discussed here: >> https://gitlab.com/gnuwget/wget2/issues/212 > > Note that 'wine' is *not* a supported platform for gnulib. > > It is already time consuming enough to try to support mingw and MSVC. > Supporting 'wine' would mean to additi

results of gnulib tests with -fsanitize=address

2017-05-19 Thread Bruno Haible
Here are the test results of a gnulib testdir configured with CFLAGS="-O -ggdb -fsanitize=address". Most of the memory leaks of -fsanitize=leak are reported here as well. Additionally there are the following failures (see below). Notable ones are: 1) $ ./test-readtokens $ echo $? 1 $ strace ./te

Re: test-copy-file build error on CentOS 6

2017-05-19 Thread Tom G. Christensen
On 18/05/17 22:23, Bruno Haible wrote: Thanks for the report! The cause is that I added a dependency to module 'utimens' on 2017-05-01. This patch should fix it: 2017-05-18 Bruno Haible copy-file tests: Fix link error (regression from 2017-05-01). Reported by Tom G. Christens

results of gnulib tests with -fsanitize=thread

2017-05-19 Thread Bruno Haible
Here are the result of a gnulib testdir with CFLAGS="-O -ggdb -fsanitize=thread". 1) test-*printf-posix[23].sh, test-get-rusage-as fail because the ThreadSanitizer does not have enough memory for its own operation. 2) test-getgroups blows up (quickly uses more than 6 GB of memory) and then gets k

results of gnulib tests with -fcheck-pointer-bounds

2017-05-19 Thread Bruno Haible
Here are the results of running a gnulib testdir with CFLAGS="-O -ggdb -fcheck-pointer-bounds -mmpx" on Linux/x86_64. The interesting finding is in test-argp-2.sh. The message "Saw a #BR!" is a bit cryptic, but is explained in https://github.com/google/sanitizers/wiki/AddressSanitizerIntelMemoryPr

Re: results of gnulib tests with -fsanitize=address

2017-05-19 Thread Paul Eggert
On 05/19/2017 08:02 AM, Bruno Haible wrote: the problem comes from the 'closeout' module: When main() is finished, it closes fd 1 and 2, and the libasan then cannot perform the output it wants to do. Yes, closeout should not close stderr when addresses are being sanitized. I installed the att

Re: results of gnulib tests with -fsanitize=address

2017-05-19 Thread Bruno Haible
Paul Eggert wrote: > I installed the attached patch to work around the problem. Thanks! I confirm that 'test-readtokens.sh' now properly reports a memory leak: FAIL: test-readtokens.sh = ==22965==ERROR: Lea

Re: make coverage

2017-05-19 Thread Bruno Haible
Tim Rühsen wrote: > 1000 works here. Thanks for the testing. I'm applying this workaround: 2017-05-19 Bruno Haible printf-posix tests: Avoid test failure with "gcc --coverage". Reported by Tim Rühsen . * tests/test-printf-posix2.c (main): Test a width of 1000

Re: results of gnulib tests with -fsanitize-address-use-after-scope

2017-05-19 Thread Jim Meyering
On Fri, May 19, 2017 at 12:18 AM, Bruno Haible wrote: > Results of a gnulib testdir configured with > CFLAGS="-O -ggdb -fsanitize-address-use-after-scope": > > No test failures. Thanks for testing with the sanitizers! I've seen -fsanitize-address-use-after-scope catch a few nasty bugs, but usuall

Re: results of gnulib tests with -fcheck-pointer-bounds

2017-05-19 Thread Paul Eggert
On 05/19/2017 08:27 AM, Bruno Haible wrote: The message "Saw a #BR!" is a bit cryptic An understatement to be sure. In my experience, even when you know exactly which machine instruction is trapping and know which source-code statement it corresponds to, it's often tricky to puzzle out why a

[PATCH] fallthrough: update for GCC 7/8

2017-05-19 Thread Jim Meyering
When building diffutils with latest gnulib and gcc.git, the fallthrough-like comments did not suppress warnings, so I've converted most such instances to use the new attribute, via the FALLTHROUGH macro. This has meant adding four more definitions of the FALLTHROUGH macro. Eventually, we should co

[PATCH] dfa: two small simplifications

2017-05-19 Thread Jim Meyering
FYI, I've just pushed the following: Subject: [PATCH] dfa: two small simplifications * lib/dfa.c (build_state): Avoid repeating longer expressions. --- ChangeLog | 5 + lib/dfa.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 807c8ed..2ab