Re: FYI: Looks like stable/14 and releng/14.3 can not be built with JEMALLOC_DEBUG as is . . . [13 seems okay]

From: Mark Millard <marklmi_at_yahoo.com>
Date: Mon, 21 Jul 2025 04:51:33 UTC
Kyle Evans <kevans_at_FreeBSD.org> wrote on
Date: Mon, 21 Jul 2025 04:24:11 UTC :

> On 7/20/25 23:02, Mark Millard wrote:
> > Something I ran into (I did not look at older history
> > but older releng/14.* may have the same issue):
> > 
> > stable/13/ and releng/13.5/ have (via kevans@):
> > diff --git a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
> > index dfda508ea1e1..6ff0ce18d5da 100644
> > --- a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
> > +++ b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
> > @@ -5,7 +5,7 @@
> > #undef JEMALLOC_OVERRIDE_VALLOC
> > 
> > #ifndef MALLOC_PRODUCTION
> > -#define MALLOC_PRODUCTION
> > +#define JEMALLOC_DEBUG
> > #endif
> > 
> > #undef JEMALLOC_DSS
> > 
> > 13.5-STABLE's man src.conf indicates to change things via use
> > of WITHOUT_MALLOC_PRODUCTION, as does 13.5-RELEASE's.
> > 
> 
> Right, my recollection is that I reverted gjb's change (after 
> discussion) because we had setup the knob specifically to avoid having 
> to touch this, but re's checklist just hadn't been updated yet.
> 
> > stable/14 and releng/14.3/ have (via gjb@):
> > diff --git a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
> > index 00848c0c48e3..ea8e8d42b14e 100644
> > --- a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
> > +++ b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
> > @@ -5,7 +5,7 @@
> > #undef JEMALLOC_OVERRIDE_VALLOC
> > 
> > #ifndef MALLOC_PRODUCTION
> > -#define JEMALLOC_DEBUG
> > +#define MALLOC_PRODUCTION
> > #endif
> > 
> > #undef JEMALLOC_DSS
> > 
> > 14.3-STABLE's man src.conf indicates to change things via use
> > of WITH_MALLOC_PRODUCTION, as does 14.3-RELEASE's. But the
> > above for 14.3 would seem to force MALLOC_PRODUCTION and make
> > JEMALLOC_DEBUG unavailable.
> > 
> 
> I thought the checklist was up-to-date by then, but I guess not. CC'ing 
> re@, just in case; they don't need to touch the file again when 
> stable/15 branches. We have a proper knob for this, and the only 
> relevant change should be to flip the default as needed for the build in 
> share/mk/src.opts.mk.
> 
> > (Also noted on discord where I was doing something
> > when I discovered this.)

Thanks for confirming the status.

Likely stable/14 should be updated so:

) future releng/14.* will end up correct by default

) stable/14 could then be built with JEMALLOC_DEBUG
  via use of WITHOUT_MALLOC_PRODUCTION .

===
Mark Millard
marklmi at yahoo.com