Date: Sun, 24 Mar 2019 16:47:43 +0000 (UTC) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345474 - head/lib/libvgl Message-ID: <201903241647.x2OGlhrB047161@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bde Date: Sun Mar 24 16:47:43 2019 New Revision: 345474 URL: https://svnweb.freebsd.org/changeset/base/345474 Log: Fix libvgl to not always fail to initialize due to its invalid mmap() args (neither MAP_PRIVATE nor MAP_SHARED). It was broken in r271635 and/or r271724 by stricter checking. The compatibility code in r271724 doesn't work for my old binaries (actually new binaries with old libraries). PR: needed to test the fix for PR 162373 Modified: head/lib/libvgl/main.c Modified: head/lib/libvgl/main.c ============================================================================== --- head/lib/libvgl/main.c Sun Mar 24 15:08:30 2019 (r345473) +++ head/lib/libvgl/main.c Sun Mar 24 16:47:43 2019 (r345474) @@ -301,7 +301,7 @@ VGLInit(int mode) VGLDisplay->Yorigin = 0; VGLMem = (byte*)mmap(0, VGLAdpInfo.va_window_size, PROT_READ|PROT_WRITE, - MAP_FILE, 0, 0); + MAP_FILE | MAP_SHARED, 0, 0); if (VGLMem == MAP_FAILED) { VGLEnd(); return -7; @@ -350,7 +350,7 @@ VGLCheckSwitch() ioctl(0, VGLMode, 0); VGLCurWindow = 0; VGLMem = (byte*)mmap(0, VGLAdpInfo.va_window_size, PROT_READ|PROT_WRITE, - MAP_FILE, 0, 0); + MAP_FILE | MAP_SHARED, 0, 0); /* XXX: what if mmap() has failed! */ VGLDisplay->Type = VIDBUF8; /* XXX */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903241647.x2OGlhrB047161>