configure test for arpack coredumps with -O2 -fsanitize=leak

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

configure test for arpack coredumps with -O2 -fsanitize=leak

Dmitri A. Sergatskov
I am trying to compile the latest stable with "-O2 -fsanitize=leak" and configure
coredumps with:

configure:75374: checking whether the arpack library works
configure:75578: g++ -o conftest -O2 -fsanitize=leak -pthread -fopenmp     conftest.cpp -larpack   -lopenblas  -L/usr/lib/gcc/x86_64-redhat-linux/7 -L/usr/
lib/gcc/x86_64-redhat-linux/7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/7/../../.. -llsan -lgfortran -lm -lq
uadmath -lutil -lm   >&5
configure:75578: $? = 0
configure:75578: ./conftest
../configure: line 3774: 27291 Segmentation fault      (core dumped) ./conftest$ac_exeext
configure:75578: $? = 139
configure: program exited with status 139

Has anyone see the same? (gcc 7.3.1)

Dmitri.
--

Reply | Threaded
Open this post in threaded view
|

Re: configure test for arpack coredumps with -O2 -fsanitize=leak

John W. Eaton
Administrator
On 03/28/2018 04:39 PM, Dmitri A. Sergatskov wrote:

> I am trying to compile the latest stable with "-O2 -fsanitize=leak" and
> configure
> coredumps with:
>
> configure:75374: checking whether the arpack library works
> configure:75578: g++ -o conftest -O2 -fsanitize=leak -pthread
> -fopenmp     conftest.cpp -larpack   -lopenblas  
> -L/usr/lib/gcc/x86_64-redhat-linux/7 -L/usr/
> lib/gcc/x86_64-redhat-linux/7/../../../../lib64 -L/lib/../lib64
> -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/7/../../.. -llsan
> -lgfortran -lm -lq
> uadmath -lutil -lm   >&5
> configure:75578: $? = 0
> configure:75578: ./conftest
> ../configure: line 3774: 27291 Segmentation fault      (core dumped)
> ./conftest$ac_exeext
> configure:75578: $? = 139
> configure: program exited with status 139
>
> Has anyone see the same? (gcc 7.3.1)

What configure args did you use?

Did you use --enable-address-sanitizer-flags or just set -fsanitize-leak
in CXXFLAGS?

I'm trying now with --enable-address-sanitizer-flags and the configure
script executed all the way through.  Debian, GCC 7.3.0.

jwe


Reply | Threaded
Open this post in threaded view
|

Re: configure test for arpack coredumps with -O2 -fsanitize=leak

Dmitri A. Sergatskov


On Wed, Mar 28, 2018 at 4:59 PM, John W. Eaton <[hidden email]> wrote:
On 03/28/2018 04:39 PM, Dmitri A. Sergatskov wrote:
I am trying to compile the latest stable with "-O2 -fsanitize=leak" and configure
coredumps with:

configure:75374: checking whether the arpack library works
configure:75578: g++ -o conftest -O2 -fsanitize=leak -pthread -fopenmp     conftest.cpp -larpack   -lopenblas  -L/usr/lib/gcc/x86_64-redhat-linux/7 -L/usr/
lib/gcc/x86_64-redhat-linux/7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/7/../../.. -llsan -lgfortran -lm -lq
uadmath -lutil -lm   >&5
configure:75578: $? = 0
configure:75578: ./conftest
../configure: line 3774: 27291 Segmentation fault      (core dumped) ./conftest$ac_exeext
configure:75578: $? = 139
configure: program exited with status 139

Has anyone see the same? (gcc 7.3.1)

What configure args did you use?

Did you use --enable-address-sanitizer-flags or just set -fsanitize-leak in CXXFLAGS?

I'm trying now with --enable-address-sanitizer-flags and the configure script executed all the way through.  Debian, GCC 7.3.0.

​"​
-O2 -fsanitize=leak
​"​


​I think "​
--enable-address-sanitizer-flags
​" ​
​ adds "​
-fsanitize=address -fno-omit-frame-pointer
​"

(and either option works for me).

I wanted to do with -fsanitize=leak. I tried -O2, -O0, and adding  -fno-omit-frame-pointer
; neither of those
made any difference.




jwe


​Dmitri.
--

Reply | Threaded
Open this post in threaded view
|

Re: configure test for arpack coredumps with -O2 -fsanitize=leak

Mike Miller-4
In reply to this post by Dmitri A. Sergatskov
On Wed, Mar 28, 2018 at 15:39:06 -0500, Dmitri A. Sergatskov wrote:
> configure:75578: ./conftest
> ../configure: line 3774: 27291 Segmentation fault      (core dumped)
> ./conftest$ac_exeext
> configure:75578: $? = 139
> configure: program exited with status 139
>
> Has anyone see the same? (gcc 7.3.1)

I get similar, end result is the same, arpack is disabled

configure:75690: ./conftest
LeakSanitizer:DEADLYSIGNAL
==23023==ERROR: LeakSanitizer: SEGV on unknown address 0x611ffffffff8 (pc 0x7f74ee0c2dd0 bp 0x00000000000c sp 0x7fff22bc9b60 T0)
==23023==The signal is caused by a WRITE memory access.
    #0 0x7f74ee0c2dcf in dneupd_ (/lib/x86_64-linux-gnu/libarpack.so.2+0x17dcf)
    #1 0x55f365035e90 in doit() /home/mike/src/octave/stable/+build-leak/conftest.cpp:1007
    #2 0x55f365035824 in main /home/mike/src/octave/stable/+build-leak/conftest.cpp:1033
    #3 0x7f74ebc8da86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21a86)
    #4 0x55f365035859 in _start (/home/mike/src/octave/stable/+build-leak/conftest+0x859)

LeakSanitizer can not provide additional info.
SUMMARY: LeakSanitizer: SEGV (/lib/x86_64-linux-gnu/libarpack.so.2+0x17dcf) in dneupd_
==23023==ABORTING
configure:75690: $? = 23
configure: program exited with status 23

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: configure test for arpack coredumps with -O2 -fsanitize=leak

Mike Miller-4
In reply to this post by Dmitri A. Sergatskov
On Wed, Mar 28, 2018 at 15:39:06 -0500, Dmitri A. Sergatskov wrote:
> I am trying to compile the latest stable with "-O2 -fsanitize=leak" and
> configure
> coredumps with:

I think this is showing that OCTAVE_CHECK_LIB_ARPACK_OK_1 is out of date
with respect to the octave_idx_type changes that happened months ago.

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: configure test for arpack coredumps with -O2 -fsanitize=leak

John W. Eaton
Administrator
On 03/28/2018 06:44 PM, Mike Miller wrote:
> On Wed, Mar 28, 2018 at 15:39:06 -0500, Dmitri A. Sergatskov wrote:
>> I am trying to compile the latest stable with "-O2 -fsanitize=leak" and
>> configure
>> coredumps with:
>
> I think this is showing that OCTAVE_CHECK_LIB_ARPACK_OK_1 is out of date
> with respect to the octave_idx_type changes that happened months ago.

Oh, I see.

I can take a look at this.  Weird that it works at all...

jwe


Reply | Threaded
Open this post in threaded view
|

Re: configure test for arpack coredumps with -O2 -fsanitize=leak

John W. Eaton
Administrator
On 03/28/2018 07:55 PM, John W. Eaton wrote:

> On 03/28/2018 06:44 PM, Mike Miller wrote:
>> On Wed, Mar 28, 2018 at 15:39:06 -0500, Dmitri A. Sergatskov wrote:
>>> I am trying to compile the latest stable with "-O2 -fsanitize=leak" and
>>> configure
>>> coredumps with:
>>
>> I think this is showing that OCTAVE_CHECK_LIB_ARPACK_OK_1 is out of date
>> with respect to the octave_idx_type changes that happened months ago.
>
> Oh, I see.
>
> I can take a look at this.  Weird that it works at all...

Dmitri:  Does this changeset fix the problem you were seeing?

   http://hg.savannah.gnu.org/hgweb/octave/rev/1fe6002f68a7

jwe


Reply | Threaded
Open this post in threaded view
|

Re: configure test for arpack coredumps with -O2 -fsanitize=leak

Dmitri A. Sergatskov
On Thu, Mar 29, 2018 at 10:34 AM, John W. Eaton <[hidden email]> wrote:

Dmitri:  Does this changeset fix the problem you were seeing?

  http://hg.savannah.gnu.org/hgweb/octave/rev/1fe6002f68a7

jwe


​Yes.
I still had to set L​SAN_OPTIONS to "leak_check_at_exit=0", but this is expected.

Dmitri.
--