(cc'ing ${MAINTAINER} this time...) Ryan Freeman <r...@slipgate.org> writes:
> On Fri, Feb 19, 2016 at 07:24:22PM +0100, Jérémie Courrèges-Anglas wrote: >> Alessandro DE LAURENZIS <just22....@gmail.com> writes: >> >> > Hello, >> > >> > bbpager systematically receives a SIGBUS when a window is closed: >> > >> > # gdb bbpager >> > GNU gdb 6.3 >> > Copyright 2004 Free Software Foundation, Inc. >> > GDB is free software, covered by the GNU General Public License, and you >> > are >> > welcome to change it and/or distribute copies of it under certain >> > conditions. >> > Type "show copying" to see the conditions. >> > There is absolutely no warranty for GDB. Type "show warranty" for details. >> > This GDB was configured as "amd64-unknown-openbsd5.9"...(no debugging >> > symbols found) >> > >> > (gdb) run >> > Starting program: /usr/local/bin/bbpager >> > (no debugging symbols found) >> > (no debugging symbols found) >> > (no debugging symbols found) >> > (no debugging symbols found) >> > (no debugging symbols found) >> > (no debugging symbols found) >> > (no debugging symbols found) >> > >> > Program received signal SIGBUS, Bus error. >> > 0x000014ea13f13c06 in __register_frame_info () from /usr/local/bin/bbpager >> > >> > The problem is 100% reproducible (I tried with different WM: fluxbox, >> > Openbox, JWM): just launch the program, open anew window and then close >> > it. >> > >> > Any further info needed? Hints? >> >> Give this a try. I don't understand the purpose of the -- though. >> *shrug* > > This seems to fix the issue for me on amd64, thanks! Thanks. The problem is that the iterator is invalidated by erase(); the diff ensures that after erase() returns, pit points at the previous item in the list. oks? Index: Makefile =================================================================== RCS file: /cvs/ports/x11/bbpager/Makefile,v retrieving revision 1.18 diff -u -p -r1.18 Makefile --- Makefile 28 Oct 2014 08:18:30 -0000 1.18 +++ Makefile 19 Feb 2016 20:42:34 -0000 @@ -3,7 +3,7 @@ COMMENT = pager for the Blackbox window manager DISTNAME = bbpager-0.4.7 -REVISION= 1 +REVISION= 2 CATEGORIES = x11 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=bbtools/} Index: patches/patch-src_wminterface_cxx =================================================================== RCS file: patches/patch-src_wminterface_cxx diff -N patches/patch-src_wminterface_cxx --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_wminterface_cxx 19 Feb 2016 20:42:34 -0000 @@ -0,0 +1,13 @@ +$OpenBSD$ +--- src/wminterface.cxx.orig Fri Feb 19 19:14:47 2016 ++++ src/wminterface.cxx Fri Feb 19 19:15:04 2016 +@@ -84,8 +84,7 @@ void WMInterface::updateWindowList(void) + for (; pit != pit_end; pit++) { + if (!(*pit)->isMarked()) { + delete (*pit); +- bbtool->pagerWindowList().erase(pit); +- pit--; ++ bbtool->pagerWindowList().erase(pit--); + } else { + } + } -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE