Re: Detection of hadware feature => please do not use signal

From: Bastien Roucariès <rouca(at)debian(dot)org>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Detection of hadware feature => please do not use signal
Date: 2024-11-08 08:56:45
Message-ID: 16872859.Zp9ysIU8Tl@portable-bastien
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Le jeudi 7 novembre 2024, 23:43:45 UTC Thomas Munro a écrit :
> On Fri, Nov 8, 2024 at 4:51 AM Bastien Roucariès <rouca(at)debian(dot)org> wrote:
> > Le jeudi 7 novembre 2024, 00:01:58 UTC Thomas Munro a écrit :
> > > It doesn't look like I need to include <asm/hwcap.h> from Bastien's
> > > original message, because <sys/auxv.h> pulls in <bits/hwcap.h>
>
> > Not on arm32 unfortunatly.... and it is a HWCAP2_flags
>
> Ah, that is unfortunate. I was confused about whether we even used
> this code on armv7/aarch32 builds, but I see that we do. OK, here is
> a version like that.

I will guard the include by replacing
+#if defined(__linux__) && !defined(__aarch64__)
by
+#if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32)

>
> I also noticed that the Linux docs explicitly tell you that SIGILL is
> unreliable for this purpose:
>
> https://docs.kernel.org/arch/arm64/elf_hwcaps.html
>
Bastien

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2024-11-08 09:28:26 Re: BUG #18568: BUG: Result wrong when do group by on partition table!
Previous Message Alexander Korotkov 2024-11-08 08:47:35 Re: BUG #18692: Segmentation fault when extending a varchar column with a gist index with custom signal length