This is the mail archive of the
mailing list for the Cygwin project.
Re: setup-1.7 defaults to "Just me"
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);
int main (int argc, char **argv)
char vla[argc * 250];
char *alloca_array = (char *) alloca (argc * 250);
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));
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.