[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnuastro] Sorry, false alarm on make crashes

From: Mohammad Akhlaghi
Subject: Re: [bug-gnuastro] Sorry, false alarm on make crashes
Date: Fri, 2 Dec 2016 01:32:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0

Hi Christopher,

Thank you very much, these kinds of bugs that only pop up with optimizations are the hardest to fix. When there is no optimization, Valgrind will report the exact line number of the bad memory read/write. But with optimizations, it can only report the function name.

Thanks to the reports you kindly supplied, it is now clear that there is an invalid read size of 8 bytes in the `preparearrays' function (which is in `bin/imgcrop/ui.c'). From the tests that failed, it is clear that this only happens in WCS mode. I tried going through it, but since I can't reproduce the problem, it is really hard to see what is causing this problem.

So, I am resorting to a brute force check: In the tarball available at the following URL, before every step in this function, a statment will be printed, so the step that causes this segmentation error will be the last printed line.

(will be removed after this bug is fixed.)

Could you simply `./configure' (without the `--disable-shared, and CFLAGS options), make and make check this tarball, and send the `tests/test-suite.log'?

I really appreciate your help in fixing this problem,
Thank you,

On 12/01/2016 07:49 PM, Christopher Willmer wrote:
Hello Mohammad,

I ran make check  after including the valgrind commands;
The configure script was

./configure --prefix=/home/cnaw/bin LDFLAGS=-L/home/cnaw/bin/lib
CPPFLAGS=-I/home/cnaw/bin/include --disable-shared CFLAGS="-g -O0"

and the good news is that all tests pass:

Testsuite summary for GNU Astronomy Utilities 0.2
# TOTAL: 48
# PASS:  47
# SKIP:  1
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
make[4]: Leaving directory `/home/cnaw/gnuastro-0.2/tests'
make[3]: Leaving directory `/home/cnaw/gnuastro-0.2/tests'
make[2]: Leaving directory `/home/cnaw/gnuastro-0.2/tests'
make[2]: Entering directory `/home/cnaw/gnuastro-0.2'
make  check-local
make[3]: Entering directory `/home/cnaw/gnuastro-0.2'

Your build of Gnuastro 0.2 didn't fail on any tests.
To install Gnuastro, please run the commands below:

    make install

(The following "Leaving directory" notices can be ignored.)

Now, if I run configure as

./configure --prefix=/home/cnaw/bin LDFLAGS=-L/home/cnaw/bin/lib
CPPFLAGS=-I/home/cnaw/bin/include --disable-shared

make check will fail, and I am appending the errors, obtained using:
valgrind --leak-check=full --show-reachable=yes

(this is after I had used valgrind --leak-check=yes following your
suggestion; valgrind actually suggests using this command).

make check works when

./configure --prefix=/home/cnaw/bin LDFLAGS=-L/home/cnaw/bin/lib
CPPFLAGS=-I/home/cnaw/bin/include  CFLAGS="-g -O0"

is used. It fails with -g -O3 and -g -O2.

Hopefully this is helpful.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]