This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] take3: fix tst-pthread-getattr test case


> +  volatile void *mem = &mem;
> +  /* FIXME:  mem >= target for _STACK_GROWSUP.  */
> +  mem = alloca ((size_t) (mem - target));
> +
> +  *(int *) mem = 42;

The cast drops the volatile.  The simplest thing would be just to use
'volatile char *mem = &mem;'.  Then you can still do the arithmetic without
a cast, and you can do the store without a cast since a byte store is fine.

> +  printf ("current rlimit_stack is %zu\n", stack_limit.rlim_cur);

rlim_t is not necessary size_t.  
If you're going to use %z, then cast to size_t.

Note that I'm only really reviewing for style issues here.
Someone who has actually paid attention to the details of the
bug and the test and the past practical problems with it should
review too (probably davem).


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]