Re: ports and printf("%n") (was: Re: CVS: cvs.openbsd.org: src)

2021-08-30 Thread Theo de Raadt
Jeremie Courreges-Anglas  wrote:

> (cc'ing ports bulk builds herders)
> 
> Hi folks,
> 
> On Mon, Aug 30 2021, Theo de Raadt  wrote:
> > CVSROOT:/cvs
> > Module name:src
> > Changes by: dera...@cvs.openbsd.org 2021/08/30 05:16:49
> >
> > Modified files:
> > lib/libc/stdio : vfprintf.c vfwprintf.c 
> >
> > Log message:
> > jca and I converted %n to a syslog warning about a year ago, and the ports
> > ecosystem experienced a very good cleanup.  Time has arrived to switch (as
> > planned) to syslog + abort, which will result in a coredump thus identifying
> > the remaining culprits in a more visible fashion.
> > vfprintf(3) and vfwprintf(3) man pages still require documentation changes.
> > with jca
> 
> Ports may suffer from this at build time *and* runtime.  Regarding
> issues at build time we can ease the debugging with the diff below.
> This is not intended for commit, also I intend to drop the _THIS_PORT
> getenv from libc before next release.

I've been arguing that corefiles will be produced, and the directory the
corefile lands in is a pretty strong hint.

But .. not my decision.



ports and printf("%n") (was: Re: CVS: cvs.openbsd.org: src)

2021-08-30 Thread Jeremie Courreges-Anglas


(cc'ing ports bulk builds herders)

Hi folks,

On Mon, Aug 30 2021, Theo de Raadt  wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   dera...@cvs.openbsd.org 2021/08/30 05:16:49
>
> Modified files:
>   lib/libc/stdio : vfprintf.c vfwprintf.c 
>
> Log message:
> jca and I converted %n to a syslog warning about a year ago, and the ports
> ecosystem experienced a very good cleanup.  Time has arrived to switch (as
> planned) to syslog + abort, which will result in a coredump thus identifying
> the remaining culprits in a more visible fashion.
> vfprintf(3) and vfwprintf(3) man pages still require documentation changes.
> with jca

Ports may suffer from this at build time *and* runtime.  Regarding
issues at build time we can ease the debugging with the diff below.
This is not intended for commit, also I intend to drop the _THIS_PORT
getenv from libc before next release.


Index: bsd.port.mk
===
RCS file: /d/cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1555
diff -u -p -p -u -r1.1555 bsd.port.mk
--- bsd.port.mk 3 May 2021 17:53:15 -   1.1555
+++ bsd.port.mk 9 May 2021 18:50:35 -
@@ -793,6 +793,9 @@ CONFIGURE_ENV += ${_EXTRA_ENV}
 MAKE_ENV += ${_EXTRA_ENV}
 .endif
 
+CONFIGURE_ENV += _THIS_PORT=${WRKSRC}
+MAKE_ENV += _THIS_PORT=${WRKSRC}
+
 .if ${PROPERTIES:Mlld}
 USE_LLD ?= Yes
 .else

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE