[Bug 228755] libvgl under syscons causes system reboot (via SDL 1.2)

Mahmoud Al-Qudsi mqudsi at neosmart.net
Tue Jun 5 14:46:21 UTC 2018


On Tue, Jun 5, 2018 at 4:00 AM, Bruce Evans <brde at optusnet.com.au> wrote:
> After fixing libvgl to use MAP_SHARED, libvgl and the demo work much the
> same as in FreeBSD-5.  Modes up to 1280x1024x8 work in both.  Fancier
> modes fail in both.  The only interesting difference is that mmap() fails
> for VGA mode 257 in -current both works in FreeBSD-5.  The same (FreeBSD-5)
> libvgl and demo program apparently calculates a too-large frame buffer size
> in -current only, and mmapping this fails.  mmap() also fails for
> 1920x1080x8.  Getting this size wrong in the driver is more likely to
> cause a reboot than failing.

Yes, I ran into that bug when attempting to pin down the underlying problem in
libvgl directly instead of using SDL; when I manually called VGLInit with a
mode that didn't directly error out (with a return code greater than -7), the
memory allocation would fail and VGLInit() would return -7. (The buffer size
should be printed with LIBVGL_DEBUG _before_ the attempted memory allocation
currently on line 258 of libvgl/main.c, imho).

But, as you say, that doesn't cause the system to reboot, obviously.

Mahmoud Al-Qudsi
NeoSmart Technologies


More information about the freebsd-bugs mailing list