setup-1.7 defaults to "Just me"

Brian Dessent
Wed Apr 16 09:49:00 GMT 2008

Corinna Vinschen wrote:

> I mean, token_info was an UCHAR array, so it's not aligned while
> the token_group information might require a 4 or 8 byte alignment
> which you now get by chance.  Probably you'd be better off not
> using `char buf[size]' but
>   PTOKEN_GROUPS groups = (PTOKEN_GROUPS) alloca (size);


#include <stdio.h>
#include <malloc.h>

int main (int argc, char **argv)
  char vla[argc * 250];
  char *alloca_array = (char *) alloca (argc * 250);
  char normal_array[1024];
  printf ("alignof(vla) = %d\n", __alignof__ (vla));
  printf ("alignof(alloca_array) = %d\n", __alignof__ (alloca_array));
  printf ("alignof(normal_array) = %d\n", __alignof__ (normal_array));
  return 0;


alignof(vla) = 1
alignof(alloca_array) = 4
alignof(normal_array) = 1

So, perhaps this is working now by accident?

> for the GetTokenInformation call.  However, it also didn't say anything
> about alignment requirements of ZwQueryDirectoryFile but it failed
> on W2K for that reason nevertheless.

Don't you love discovering these little pearls of joy inside the Win32
API?  They're like little rays of sunshine.  No wait, the opposite.


More information about the Cygwin-apps mailing list