On Wed, Sep 21, 2016 at 8:30 PM, Jeremy Evans <jer...@openbsd.org> wrote: > This backports a patch from Qt 5.6 that fixed a SIGFPE when using Xvfb. > I've tested this with an updated ruby-capybara-webkit running using Xvfb > and confirmed that it fixes the issue. > > OK? > > Thanks, > Jeremy > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/x11/qt5/Makefile,v > retrieving revision 1.52 > diff -u -p -r1.52 Makefile > --- Makefile 6 Sep 2016 09:00:19 -0000 1.52 > +++ Makefile 20 Sep 2016 22:40:04 -0000 > @@ -19,7 +19,7 @@ COMMENT-sqlite2 = SQLite 2.x plugin for > COMMENT-tds = TDS plugin for Qt5 > > PKGNAME-main = qt5-${VERSION} > -REVISION-main = 1 > +REVISION-main = 2 > PKGNAME-examples = qt5-examples-${VERSION} > REVISION-examples = 0 > PKGNAME-html = qt5-html-${VERSION} > Index: patches/patch-qtbase_src_plugins_platforms_xcb_qxcbscreen_cpp > =================================================================== > RCS file: patches/patch-qtbase_src_plugins_platforms_xcb_qxcbscreen_cpp > diff -N patches/patch-qtbase_src_plugins_platforms_xcb_qxcbscreen_cpp > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-qtbase_src_plugins_platforms_xcb_qxcbscreen_cpp 20 > Sep 2016 22:51:57 -0000 > @@ -0,0 +1,17 @@ > +$OpenBSD$ > + > +Fix SIGFPE when using Xvfb, backported from Qt 5.6 > +(https://codereview.qt-project.org/#/c/140411/). > + > +--- qtbase/src/plugins/platforms/xcb/qxcbscreen.cpp.ports.orig Tue Sep 20 > 15:49:42 2016 > ++++ qtbase/src/plugins/platforms/xcb/qxcbscreen.cpp Tue Sep 20 15:50:09 > 2016 > +@@ -544,7 +544,8 @@ void QXcbScreen::updateRefreshRate(xcb_randr_mode_t mo > + for (; modesIter.rem; xcb_randr_mode_info_next(&modesIter)) { > + xcb_randr_mode_info_t *modeInfo = modesIter.data; > + if (modeInfo->id == mode) { > +- m_refreshRate = modeInfo->dot_clock / (modeInfo->htotal * > modeInfo->vtotal); > ++ const uint32_t dotCount = modeInfo->htotal * > modeInfo->vtotal; > ++ m_refreshRate = (dotCount != 0) ? modeInfo->dot_clock / > dotCount : 0; > + m_mode = mode; > + break; > + } >
ok dcoppa@ Thanks, David