grep-devel
[Top][All Lists]
Advanced

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

Re: [Grep-devel] [platform-testers] new snapshot available: grep-3.1.48-


From: Bruno Haible
Subject: Re: [Grep-devel] [platform-testers] new snapshot available: grep-3.1.48-7eea
Date: Sun, 16 Dec 2018 07:55:06 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-139-generic; KDE/5.18.0; x86_64; ; )

On HardenedBSD 11/x86_64 (with libsigsegv installed), the stack-overflow test
fails.

Since HardenedBSD 11 is a derivate of FreeBSD 11, I tried this as well:
On FreeBSD 11/x86_64 (with libsigsegv installed), the stack-overflow test
succeeds.

What's the difference?

On FreeBSD 11 (with libsigsegv):
1 million opening parentheses -> "grep: in:1: Unmatched ( or \("
2 million opening parentheses -> "grep: stack overflow"

On HardenedBSD 11 (with libsigsegv):
grep never printed "stack overflow"
1 million opening parentheses -> "grep: in:1: Unmatched ( or \("
2 million opening parentheses -> "grep: in:1: Unmatched ( or \("
4 million opening parentheses -> "grep: stack overflow"
10 million opening parentheses -> "grep: stack overflow"

So, HardenedBSD just needs a larger input to make the stack overflow.

'ulimit -a' shows the difference: The stack size limit (in kiB) is
- on FreeBSD 11:      524288  (so, 1/2 GiB)
- on HardenedBSD 11: 1048576  (so, 1 GiB).

The attached patch fixes the problem for me. But you may consider
to derive the maximum try from the `ulimit -s` value.

Bruno

Attachment: 0001-tests-stackoverflow-Fix-test-failure-on-HardenedBSD-.patch
Description: Text Data


reply via email to

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