Subject: hangup by crashme and illeagal instruction on 68040
To: None <port-m68k@NetBSD.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-hp300
Date: 03/27/2006 23:40:00
Hi,

I'm tracking PR port-hp300/4265 (crashme panics NetBSD on an hp433)
and it still happens on my HP382 and HP425t (both have 68040),
but not on NWS-1750 with 68030.

The silent hangups are reproducible and I've managed to narrow
it that the attached program (compiled with "cc -static -O ")
could cause the similar hang on HP382 and HP425t, but
I'm still wondering if it's hp300 specific or 68040 generic.

I'd like to see how it goes on other 040 based machines
and I'd also appreciate any suggestions from m68k gurus ;-)

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

#define BUFSIZE	1024

void (*bomb)(void);

static const unsigned char a[] = {
0xf2, 0x43, 0xf4, 0x7a, 0x75, 0x2e, 0xf4, 0x70, 
};

int
main(int argc, char *argv[])
{
	unsigned char *p;

	p = malloc(BUFSIZE);
	memset(p, 0, BUFSIZE);
	memcpy(p, a, sizeof(a));
	bomb = (void *)p;
	printf("address = %p\n", p);
	(*bomb)();

	return 0;
}

---
Izumi Tsutusi