/* wedge.c - reproduce the 2026-10-14 hang's first half on purpose: take the card, start * an IDUMP of a 320x240 frame, read part of it, then die by SIGKILL mid-stream. * Claude Opus 5.5, 2026-10-14. Run only with X (and dtlogin) stopped. */ #include #include #include #include "mga.h" #include "tex3d.h" int main(void) { static unsigned int buf[2000]; volatile unsigned int *win; int i; if (t3_open(320, 240)) return 1; t3_clear(0x18c3); t3_finish(); /* t3_read's setup, without its read loop */ mga_fifo(7); mga_out(DWGCTL, 0x0000000a | SGNZERO | SHFTZERO | BOP_COPY | 0x0e000000); mga_out(AR5, 512); mga_out(AR3, 0); mga_out(AR0, 319); mga_out(FXBNDRY, 319 << 16); mga_out(YDSTLEN + GO, 240); win = (volatile unsigned int *) mga_base; for (i = 0; i < 2000; i++) buf[i] = win[i % 1792]; /* 2000 of 38400 dwords */ printf("read 2000 dwords (first 0x%08x); STATUS 0x%08x; killing myself\n", buf[0], mga_in(STATUS)); fflush(stdout); kill(getpid(), SIGKILL); return 0; }