[issue1343] panic: vm_map_entry_link, dup addr map

Alex Hornung (via DragonFly issue tracker) sinknull at crater.dragonflybsd.org
Thu Apr 23 10:40:59 PDT 2009


Alex Hornung <ahornung at gmail.com> added the comment:

new test case I'm using. Remember to compile with -lthread_xu, as it only seems
to affect this lib.

_____________________________________________________
DragonFly issue tracker <bugs at lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1343>
_____________________________________________________#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>
#include <unistd.h>



void* tester(void *arg)
{
	for(;;) sleep(1);	
}

void* checker(void *arg)
{
	printf("Passed barrier!\n");
}


int main(int argc, char *argv[])
{
	int i, ret, nthreads;
	pthread_t th;

	if (argc <= 1)
	{
		printf("Need one argument\n");
		exit(1);
	}

	nthreads = atoi(argv[1]);
	
	printf("Trying with %d threads\n", nthreads);	


	printf("Creating checker thread\n");
	pthread_create(&th, NULL, checker, NULL);

	printf("Creating tester threads\n");


	for (i = 0; i < nthreads; i++)
		pthread_create(&th, NULL, tester, NULL);

	sleep(1);
	getchar();
	return 0;
}




More information about the Bugs mailing list