pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rustc panic



Here is a C test program reproducing the issue.

> cc -Wall -O2 -pthread test.c
> ./a.out
guard size is: 0


Martin
#include <pthread.h>
#include <stdio.h>

static void*
threadfunc(void *dummy)
{
	pthread_attr_t attr;
	size_t guard;

	pthread_attr_get_np(pthread_self(), &attr);
	pthread_attr_getguardsize(&attr, &guard);
	printf("guard size is: %zu\n", guard);
	return NULL;
}

int main(int argc, char **argv)
{
	pthread_attr_t attr;
	pthread_t thread;

	pthread_attr_init(&attr);
	pthread_attr_setstacksize(&attr, 1*1024*1024);
	pthread_create(&thread, &attr, threadfunc, NULL);
	pthread_join(thread, NULL);
	return 0;
}


Home | Main Index | Thread Index | Old Index