Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 2023 14:01:29 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        David Chisnall <theraven@FreeBSD.org>
Cc:        Shawn Webb <shawn.webb@hardenedbsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: CFT: snmalloc as libc malloc [snmalloc misidentifies what llvm versions have source_location: need >= 16, not 15]
Message-ID:  <6660BD19-13BA-4F73-9447-A3B54D8E0B29@yahoo.com>
In-Reply-To: <fbd6fe66-fc70-d5eb-9838-29d0dea64718@FreeBSD.org>
References:  <ED93FF21-07BC-4FC0-A114-27424E60C024.ref@yahoo.com> <ED93FF21-07BC-4FC0-A114-27424E60C024@yahoo.com> <20230212210904.nzxfwtzsjf2tu6ky@mutt-hbsd> <AE89E235-DD25-4D4B-BAC1-BA9956F904B0@yahoo.com> <20230212222456.2vcvgf6v45na7jb2@mutt-hbsd> <16E1DFAE-B679-4E10-9139-51336F5306AF@yahoo.com> <9AA79B35-51E6-4FA1-BC41-E51CDB819D2D@yahoo.com> <fbd6fe66-fc70-d5eb-9838-29d0dea64718@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On Feb 13, 2023, at 02:43, David Chisnall <theraven@FreeBSD.org> wrote:

> On 12/02/2023 22:53, Mark Millard wrote:
>> [snmalloc misidentifies what llvm versions have source_location .]
> 
> Thanks, I thought snmalloc included the code I wrote in a related project to do this, but apparently not.  I've opened a PR to fix it and will merge once it passes CI, then bump the submodule:
> 
> https://github.com/microsoft/snmalloc/pull/591
> 

For the:

-#if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 11) || \
-  (defined(__clang__) && __clang_major__ >= 15)
+#ifdef __cpp_lib_source_location

My understanding is that __cpp_lib_source_location is guaranteed
to potentially become defined basically only 2 ways:

A) inclusion of <source_location>
B) inclusion of <version>

Clearly (A) is not the case here and would require a
__has_include(<source_location>) test to allow this style
of attempting to get a definition for
__cpp_lib_source_location .

I looked a round some and did not notice an example of (B),
but I may have missed it.

So, it might be that this changed turned off use of
<source_location> in unintended places.

===
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6660BD19-13BA-4F73-9447-A3B54D8E0B29>