Bug 228755

Summary: libvgl under syscons causes system reboot (via SDL 1.2)
Product: Base System Reporter: Mahmoud Al-Qudsi <mqudsi>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: emaste, mqudsi
Priority: --- Keywords: crash, panic
Version: CURRENT   
Hardware: i386   
OS: Any   

Description Mahmoud Al-Qudsi 2018-06-04 23:50:56 UTC
I was attempting to get a GUI going without any X dependency under the FreeBSD CURRENT; not finding any documentation regarding the viability of vgl under newcons/vt, I set kern.tty to sc and (after a reboot) attempted to run the attached SDL code sample with SDL_VIDEODRIVER set to vgl.

When executed as sudo (a requirement for directly using vgl), the system reboots immediately. Using the vgl-wrapped-in-a-service SDL_VIDEODRIVER=aalib as an unprivileged user instead does not result in the same behavior (but it doesn't work, either).

I have observed the same behavior with a statically-linked SDL1.2 compiled from sources and when linking against the system SDL1.2 as installed via pkg. I have not attempted to use vgl directly, and will endeavour to do so if I get the time, thereby cutting out SDL from the picture entirely (though it does not seem to be the problem as changing the video driver to something other than vgl does not cause this system reboot and using SDL1.2 with vgl under a different platform similarly does not cause any adverse effects).

(Filing under kern against libvgl)

[0]: http://share.neosmart.net/View/Index/nXNRtQ.cpp
Comment 1 commit-hook freebsd_committer 2018-06-10 14:21:41 UTC
A commit references this bug:

Author: bde
Date: Sun Jun 10 14:21:01 UTC 2018
New revision: 334924
URL: https://svnweb.freebsd.org/changeset/base/334924

  Fix panics in potentially all x86bios calls on i386 since r332489.

  A call to npxsave() in the exception trampolines was not relocated.
  This call to a garbage address usually paniced when made, but it is only
  made when the thread has used an FPU recently, and this is not the usual

  PR:		228755
  Reviewed by:	kib

Comment 2 Mahmoud Al-Qudsi 2018-06-18 19:22:20 UTC
Verified fixed.