Bug 228755 - libvgl under syscons causes system reboot (via SDL 1.2)
Summary: libvgl under syscons causes system reboot (via SDL 1.2)
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: i386 Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords: crash, panic
Depends on:
Blocks:
 
Reported: 2018-06-04 23:50 UTC by Mahmoud Al-Qudsi
Modified: 2018-06-18 19:22 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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

Log:
  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
  case.

  PR:		228755
  Reviewed by:	kib

Changes:
  head/sys/i386/i386/vm86bios.s
Comment 2 Mahmoud Al-Qudsi 2018-06-18 19:22:20 UTC
Verified fixed.