Subject: bug#47396: closed (Re: bug#47396: grep-3.6 stack-overflow test fails on fedora rawhide)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 09 Aug 2021 22:30:03 +0000

Your bug report

#47396: grep-3.6 stack-overflow test fails on fedora rawhide

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
47396: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47396
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#47396: grep-3.6 stack-overflow test fails on fedora rawhide
From: Paul Eggert <[email-masked]>
To: Jaroslav Skarvada <[email-masked]>
Cc: [email-masked]
Date: Mon, 9 Aug 2021 15:29:16 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On 8/9/21 3:23 PM, Jaroslav Skarvada wrote:
> I resolved it downstream by backporting gnulib patches from the gnulib
> git [1], so I think the new grep release with the up-to-date gnulib
> should resolve it.

Thanks. Closing the grep bug report.

Subject: grep-3.6 stack-overflow test fails on fedora rawhide
From: Jaroslav Skarvada <[email-masked]>
To: [email-masked]
Date: Thu, 25 Mar 2021 14:53:18 -0400 (EDT)
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

on fedora rawhide the stack-overflow test is failing for grep-3.6:
...
stack-overflow: failed test: grep never printed "stack overflow"
FAIL: stack-overflow
..

Manual run:
# ASAN_OPTIONS=help=true grep --version 2>&1 | grep -q AddressSanitizer
# echo $?
1

# i=3;printf %0${i}0000d 0|tr 0 '(' > in
# ./grep -E -f in
Segmentation fault (core dumped)

Running through valgrind:
==58== Process terminating with default action of signal 11 (SIGSEGV)
==58==  Access not within mapped region at address 0x1FFE801FF8
==58== Stack overflow in thread #1: can't grow stack to 0x1ffe801000
==58==    at 0x49A418A: peek_token (in /usr/lib64/libc-2.33.9000.so)
==58==  If you believe this happened as a result of a stack
==58==  overflow in your program's main thread (unlikely but
==58==  possible), you can try to increase the size of the
==58==  main thread stack using the --main-stacksize= flag.
==58==  The main thread stack size used in this run was 8388608.

Compiled with:
CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '

thanks & regards

Jaroslav