> Date: Sun, 6 Aug 2017 19:44:49 -0700 > From: Max Parmer <[email protected]> > > >Synopsis: X server segfaults in VESA driver as Linux KVM guest > >Category: system > >Environment: > System : OpenBSD 6.1 > Details : OpenBSD 6.1-current (GENERIC.MP) #45: Sat Aug 5 16:22:04 > MDT 2017 > > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > Architecture: OpenBSD.amd64 > Machine : amd64 > >Description: > startx crashes with an illegal instruction leaving a jumble of > colors on screen. > > After enabling suid coredumps I retrieved this backtrace: > (gdb) bt > #0 0x0000169016f7e620 in xf86SlowBcopy () from /usr/X11R6/bin/Xorg > #1 0x00001692b393238a in VESASaveRestore () from > /usr/X11R6/lib/modules/drivers/vesa_drv.so > #2 0x00001692b39314ea in VESAScreenInit () from > /usr/X11R6/lib/modules/drivers/vesa_drv.so > #3 0x0000169016f147d3 in AddScreen () from /usr/X11R6/bin/Xorg > #4 0x0000169016f5dcb2 in InitOutput () from /usr/X11R6/bin/Xorg > #5 0x0000169016f18774 in dix_main () from /usr/X11R6/bin/Xorg > #6 0x0000169016f01914 in _start () from /usr/X11R6/bin/Xorg > #7 0x0000169016f018c0 in ?? () from /usr/X11R6/bin/Xorg > #8 0x0000000000000000 in ?? ()
Looks like clang is uptimizing xf86SlowBcopy() to use SSE instructions. I wouldn't be surprised that those are indeed unsupported on memory mapped device memory. Since the whole purpose of xf86SlowBcopy to do a bytewise unoptimized copy, we need to tell the compiler not to optimize this code.
