This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix stacksize returned for main process thread whenRLIMIT_STACK is relevant
On Wed, 20 Jun 2012 01:20:28 -0400, KOSAKI wrote:
> Ah, I have one another req.
>
> +static void
> +allocate_and_test (void *stackaddr)
> +{
> + void *mem = &mem;
> + mem = alloca ((size_t) (mem - stackaddr));
> + *(int *)(mem) = 0;
> +}
>
>
> This is slightly HPPA unfrinedly. please mark TODO for help Carlos.
All of nptl is hppa-unfriendly right now ;)
I've added a FIXME comment to the patch and have committed as a
trivial change to my submission:
+static void
+allocate_and_test (void *stackaddr)
+{
+ void *mem = &mem;
+ /* FIXME: The difference will be negative for _STACK_GROWSUP. */
+ mem = alloca ((size_t) (mem - stackaddr));
+ *(int *)(mem) = 0;
+}
Patch is now committed to master and ChangeLog updated.
Regards,
Siddhesh