Tests for minimal signal handler functionality in MINSIGSTKSZ space.

Message ID f65380fa-d061-ab10-beae-d2e889342afd@linaro.org
State Committed
Headers

Commit Message

Adhemerval Zanella Jan. 16, 2019, 5:20 p.m. UTC
  On 16/01/2019 01:40, Siddhesh Poyarekar wrote:
> On 16/01/19 2:45 AM, Carlos O'Donell wrote:
>> Thank you for doing this.
>>
>> OK for master with comment addition in implementation.
>>
>> You need Siddhesh to approve the extra tests.
>>
> 
> OK to add these tests to master.
> 
> Siddhesh

We need something like below for Hurd:
  

Comments

Joseph Myers Jan. 21, 2019, 6:07 p.m. UTC | #1
On Wed, 16 Jan 2019, Adhemerval Zanella wrote:

> We need something like below for Hurd:

This patch is OK (we shouldn't be leaving the build broken...).
  
Zack Weinberg Jan. 21, 2019, 6:54 p.m. UTC | #2
On Mon, Jan 21, 2019 at 1:07 PM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Wed, 16 Jan 2019, Adhemerval Zanella wrote:
>
> > We need something like below for Hurd:
>
> This patch is OK (we shouldn't be leaving the build broken...).

Argh, this fell off the bottom of my inbox.  Can I request one change?
 Put the ifdefs right after the include block, not in the middle of a
function.

zw
  

Patch

diff --git a/support/xsigstack.c b/support/xsigstack.c
index cebfa19..5656e84 100644
--- a/support/xsigstack.c
+++ b/support/xsigstack.c
@@ -63,6 +63,12 @@  xalloc_sigstack (size_t size)
   /* Use MAP_NORESERVE so that RAM will not be wasted on the guard
      bands; touch all the pages of the actual stack before returning,
      so we know they are allocated.  */
+#ifndef MAP_NORESERVE
+# define MAP_NORESERVE 0
+#endif
+#ifndef MAP_STACK
+# define MAP_STACK 0
+#endif
   desc->alloc_base = xmmap (0,
                             desc->alloc_size,
                             PROT_READ|PROT_WRITE,