On Mon, May 17 2021, Todd C. Miller <[email protected]> wrote: > On Mon, 17 May 2021 07:56:22 -0600, "Todd C. Miller" wrote: > >> The crash does not happen when I build cbmc manually (outside of >> ports), only when I build it from within the ports tree. > > The crash only happens when output is to a terminal but TERM is > unset or is set to a value not present in the terminfo db. If > output is to a pipe or file there is no crash, presumably because > textstyle disables itself. When cbmc is built via ports TERM is > not set, resulting in a crash. > > It looks like libtextstyle is completely broken when the output is > a terminal but TERM is either unset or set to a value not in the > terminfo db. Not only does libtextstyle not check for setupterm() > failure correctly, it calls tputs() regardless of whether or not > setupterm() succeeded. > > Looking at the code it seems clear that building bison without > libtextstyle is the way to go.
Someone did hit this problem in FreeBSD land (link from landry@): https://euroquis.nl/freebsd/2021/11/24/bison.html With links to: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260016 - diff for the FreeBSD devel/bison port Some fix https://cgit.freebsd.org/src/commit/?id=9c15ec46bfb6558c42a668afeef1a4418dcd970d Without looking at the possible fixes I think we should annotate why we disabled libtextstyle. ok? Index: Makefile =================================================================== RCS file: /home/cvs/ports/devel/bison/Makefile,v retrieving revision 1.63 diff -u -p -p -u -r1.63 Makefile --- Makefile 17 May 2021 16:41:44 -0000 1.63 +++ Makefile 6 Dec 2021 16:56:21 -0000 @@ -21,7 +21,10 @@ BUILD_DEPENDS= devel/gettext,-tools \ RUN_DEPENDS= devel/m4 CONFIGURE_STYLE=gnu -CONFIGURE_ARGS= --disable-yacc --without-libtextstyle-prefix +CONFIGURE_ARGS= --disable-yacc +# Avoid crashes because of bad interactions between bison, libtextstyle +# from devel/gettext and ncurses +CONFIGURE_ARGS+= --without-libtextstyle-prefix DEBUG_PACKAGES= ${BUILD_PACKAGES} MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/build-aux -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
