Skip site navigation (1)Skip section navigation (2)
To:        Shawn Webb <shawn.webb@hardenedbsd.org>
Cc:        Warner Losh <imp@freebsd.org>, Ricardo Branco <rbranco@suse.de>, src-committers@freebsd.org,  dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 3d12567133bf - main - Add the POSIX sig2str(3) & str2sig(3) calls
Message-ID:  <CANCZdfrDU8x5atpC0jGhi66G6OO9ELKTV-Wyvb4yFaNM4Atxcg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
On Wed, Jun 11, 2025 at 10:56=E2=80=AFPM Shawn Webb <shawn.webb@hardenedbsd=
.org> wrote:
>
> On Wed, Jun 11, 2025 at 11:16:40PM +0000, Warner Losh wrote:
> > The branch main has been updated by imp:
> >
> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3d12567133bfb4082a5115f1=
6a71a865ff2af7fb
> >
> > commit 3d12567133bfb4082a5115f16a71a865ff2af7fb
> > Author:     Ricardo Branco <rbranco@suse.de>
> > AuthorDate: 2025-05-10 20:56:03 +0000
> > Commit:     Warner Losh <imp@FreeBSD.org>
> > CommitDate: 2025-06-11 23:16:22 +0000
> >
> >     Add the POSIX sig2str(3) & str2sig(3) calls
> >
> >     Signed-off-by: Ricardo Branco <rbranco@suse.de>
> >     Reviewed by: imp, kib, des, jilles
> >     Pull Request: https://github.com/freebsd/freebsd-src/pull/1696
> > ---
> >  include/signal.h          |   9 ++++
> >  lib/libc/gen/Makefile.inc |   3 ++
> >  lib/libc/gen/Symbol.map   |   2 +
> >  lib/libc/gen/psignal.3    |  56 ++++++++++++++++++++++-
> >  lib/libc/gen/sig2str.c    | 112 ++++++++++++++++++++++++++++++++++++++=
++++++++
> >  5 files changed, 180 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/signal.h b/include/signal.h
> > index c1d341f317f4..22fefb63568f 100644
> > --- a/include/signal.h
> > +++ b/include/signal.h
> > @@ -40,6 +40,10 @@
> >  #include <sys/_ucontext.h>
> >  #endif
> >
> > +#if __POSIX_VISIBLE >=3D 202405 || __BSD_VISIBLE
> > +#define SIG2STR_MAX  32      /* size of buffer required for sig2str() =
*/
> > +#endif
>
> Hey Warner and Ricardo,
>
> The above breaks building world when _FORTIFY_SOURCE=3D2. I've committed
> in HardenedBSD a fix:
> https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/-/commit/0572db282c5a=
542fe0de52739932e91eade537ed
>
> I suppose that the !defined gate might not actually be desired, since
> doing it the way I did might cause issues if third-party code defines
> the macro to a value smaller than what libc was built with. I might
> remove that gate.

I don't think we need the !defined part of it...

But what software is breaking? What's the error message? Maybe the
fact it's undefined is pointing at a different bug...

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrDU8x5atpC0jGhi66G6OO9ELKTV-Wyvb4yFaNM4Atxcg>