[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #16 from Martin Liška --- > > I'm afraid I'm still unable to provide a useful stacktrace. > Usually using a Linux distribution, one can easily install debug information for libraries. You should somehow investigate how is that

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-26 Thread gcc at zutt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #15 from jonne --- I ran the below command to check memory usage. After an initial quick increase it doesn't seem to grow much. $ while true; sleep 1; do ps -p $(pgrep -fl ./a.out | awk '{ print $1 }') -o pmem,rss,vsize,pid; done

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #14 from Martin Liška --- (In reply to jonne from comment #13) > Thanks for all your help, Martin, I really appreciate. You're welcome. > > I re-ran with ASAN_OPTIONS as you suggested. The program seems to get killed > after about

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-26 Thread gcc at zutt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #13 from jonne --- Thanks for all your help, Martin, I really appreciate. I re-ran with ASAN_OPTIONS as you suggested. The program seems to get killed after about 44 seconds. I already tried with clang before, seems to work ok over

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #12 from Martin Liška --- I'm sorry I cannot help more as I don't have a handy Mac operating system. I would also try to use clang with the sanitizer and test it. Moreover, you can test following: $ gcc /tmp/main.c

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-25 Thread gcc at zutt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #11 from jonne --- Doesn't seem to work, it cannot find the symbol. (gdb) break __asan_init Function "__asan_init" not defined. Make breakpoint pending on future shared library load? (y or [n]) y (I tried with three underscores

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #10 from Martin Liška --- Huh, no debugging symbols so hard to guess where lead all the jumps. I would try to add breakpoint to '__asan_init'.

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-24 Thread gcc at zutt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #9 from jonne --- Ok, I've done that now. Thanks again. $ gdb ./a.out GNU gdb (GDB) 7.12.1 ... snip ... Reading symbols from ./a.out...Reading symbols from /private/tmp/a.out.dSYM/Contents/Resources/DWARF/a.out...done. done. (gdb)

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #8 from Martin Liška --- Ok, we're not searching for main function, but _GLOBAL__sub_I_00099_1_m.cpp (which is a static constructor) and I'm interested in instructions in the function. Please use gdb once more time, go to frame (#14)

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-24 Thread gcc at zutt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #7 from jonne --- I compiled with -S and looked at m.s. I'm not sure, but my main function could be this (I found this code in m.s, by searching for 'main', lines 4058 - 4095): lC6: .ascii "foo test 123\0" .space 51

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-24 Thread gcc at zutt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #6 from jonne --- I installed gdb with homebrew. I think it was compiled with debugging symbols, because of: $ otool -Iv /usr/local/opt/gdb/bin/gdb | head -5 /usr/local/opt/gdb/bin/gdb: Indirect symbols for (__TEXT,__stubs) 452

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #5 from Martin Liška --- My constructor for main looks as follows: _GLOBAL__sub_I_00099_1_main: .LFB7137: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq%rsp,

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-24 Thread gcc at zutt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #4 from jonne --- I managed to code-sign gdb by following https://sourceware.org/gdb/wiki/BuildingOnDarwin. Not that I expect it to matter much related to this ticket, but I also noticed the stacktrace looks a little different when I

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-24 Thread gcc at zutt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #3 from jonne --- Read somewhere that I need to do this to make gdb work on Sierra. Not sure what it all means... $ cat ~/.gdbinit set startup-with-shell off After doing that, I get a different result running gdb. $ sudo

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-24 Thread gcc at zutt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 --- Comment #2 from jonne --- Thanks Martin. I tried to run it with gdb. With gdb, I seem to get an unknown signal immediately. (running gdb as root at the moment, because of an issue with code-signing) # gdb ./a.out GNU gdb (GDB) 7.12.1

[Bug sanitizer/80498] Simple program with address sanitizer and regex hangs

2017-04-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80498 Martin Liška changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|