public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Andrew Burgess <aburgess@redhat.com>
Cc: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/testsuite] Fix gdb.arch/i386-avx.exp with clang
Date: Mon, 6 Dec 2021 16:27:52 +0100	[thread overview]
Message-ID: <a42f3c08-914f-13c9-04aa-708936d86643@suse.de> (raw)
In-Reply-To: <20211105135226.GC1816063@redhat.com>

On 11/5/21 2:52 PM, Andrew Burgess wrote:
> * Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> [2021-11-05 14:35:20 +0100]:
> 
>> On 11/5/21 2:20 PM, Pedro Alves wrote:
>>> On 2021-11-05 13:15, Tom de Vries wrote:
>>>> On 11/5/21 1:55 PM, Pedro Alves wrote:
>>>>> On 2021-11-05 12:23, Tom de Vries via Gdb-patches wrote:
>>>>>
>>>>>>> No, but in gdb/testsuite/lib/attribute.h we do setup a compatibility
>>>>>>> macro for 'noclone', so there's definitely precedent for using
>>>>>>> attributes that might not be supported everywhere.
>>>>>>>
>>>>>>
>>>>>> Right, I'm aware of this, but that's a typical case where we have no
>>>>>> portable alternative.
>>>>>
>>>>> We actually do -- _Alignas is standard C11.  This fixes the test as well:
>>>>>
>>>>>   _Alignas(32) v8sf_t data[] =
>>>>>
>>>>
>>>> I was referring to the noclone, but ok, I was not aware of the _Alignas,
>>>> good to know, thanks.
>>>>
>>>> Anyway, in the latest version this is not relevant anymore, since the
>>>> precise alignment implementation has an extra benefit, as explained in
>>>> the post.
>>>>
>>>
>>> OOC, is that benefit important here?
>>>
>>
>> So, this is the post I mentioned (
>> https://sourceware.org/pipermail/gdb-patches/2021-November/183183.html ).
>>
>> Well, the benefit is that it prevents accidental overalignment, which is
>> the reason that this problem escaped detection and/or fixing for so long.
>>
>> Without that, I could do a thinko and specify too small an alignment and
>> have the test passing accidentally, only to fail in a different setup.
> 
> I'm still not convinced.  The test doesn't appear to be about the
> alignment, 

Correct.

> but about accessing the feature specific registers, so I
> don't see how making a mistake with the alignment would be different
> to any other bug - eventually it gets spotted and fixed.

Right, and my perception is that using precise alignment gives me
confidence that I fixed it properly.

Thanks,
- Tom

  reply	other threads:[~2021-12-06 15:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-04 13:55 Tom de Vries
2021-11-05  9:33 ` Andrew Burgess
2021-11-05  9:43   ` Tom de Vries
2021-11-05 11:54     ` Andrew Burgess
2021-11-05 12:23       ` Tom de Vries
2021-11-05 12:55         ` Pedro Alves
2021-11-05 13:15           ` Tom de Vries
2021-11-05 13:20             ` Pedro Alves
2021-11-05 13:35               ` Tom de Vries
2021-11-05 13:52                 ` Andrew Burgess
2021-12-06 15:27                   ` Tom de Vries [this message]
2021-11-05 13:54                 ` Pedro Alves
2021-12-06 15:25                   ` Tom de Vries
2021-11-05 12:24       ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a42f3c08-914f-13c9-04aa-708936d86643@suse.de \
    --to=tdevries@suse.de \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).