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

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Bastien Roucariès <rouca(at)debian(dot)org>
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-07 23:43:45
Message-ID: CA+hUKGKrfMUuhQNqT5WhQYfu5JhtKkfW62WbELTnLi8xbk9=Kg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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 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

Attachment Content-Type Size
v2-0001-Use-auxv-to-check-for-CRC32-instructions-on-ARM.patch application/octet-stream 6.2 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2024-11-07 23:59:08 Re: pg_rewind fails on Windows where tablespaces are used
Previous Message Alexander Korotkov 2024-11-07 23:28:06 Re: BUG #18692: Segmentation fault when extending a varchar column with a gist index with custom signal length