Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: "Metzger, Markus T" <markus.t.metzger@intel.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] btrace: avoid tp != NULL assertion
Date: Tue, 03 Mar 2015 15:25:00 -0000	[thread overview]
Message-ID: <54F5D263.4080008@redhat.com> (raw)
In-Reply-To: <A78C989F6D9628469189715575E55B231E6EF4BB@IRSMSX104.ger.corp.intel.com>

On 03/03/2015 02:44 PM, Metzger, Markus T wrote:
>> -----Original Message-----
>> From: Pedro Alves [mailto:palves@redhat.com]
>> Sent: Tuesday, March 3, 2015 3:03 PM
>> To: Metzger, Markus T
>> Cc: gdb-patches@sourceware.org
>> Subject: Re: [PATCH] btrace: avoid tp != NULL assertion
> 
> 
>>>>> No, that wasn't the reason for replacing the assert.  There are no such
>>>>> errors in the gdb.btrace suite (which is mostly single-threaded) with my
>>>>> patch and I have not seen any such errors otherwise, either.
>>>>
>>>> Then it sounds like we're either lacking basic tests, or the threaded tests
>>>> are somehow not running correctly when gdb is a 32-bit program.  I think
>>>> that if you step any non-leader thread, you should see it happen.
>>>> Grepping the tests, I think gdb.btrace/multi-thread-step.exp should have
>>>> caught it.  My machine doesn't do btrace, so I can't try it myself...
>>>>
>>>> BTW, did any existing test in the testsuite catch the assertion we're
>>>> fixing?
>>>
>>> Almost all of them when run on 32-bit systems; -m32 on 64-bit systems
>> does
>>> not catch this.
>>
>> Right, that's why I said "when gdb is a 32-bit program".  Sounds like
>> no existing test tries a "step" when not replaying then.  It'd be very
>> nice to have one.  Can I convince you to add one?  :-)
> 
> The multi-thread-step.exp test does not catch it because it uses "cont",
> which works fine.  When I add a "step" before the "cont", I get the
> "No thread" error when using my old patch instead of your new patch.
> Or I get the assert when using neither my old nor your new patch.
> But then, I got the assert already on other tests.
> 
> With my patch dropped and your patch committed, what is the new
> test expected to catch?

You're getting me confused...

The test was expected to catch the assertion, given that apparently
no other test was catching it -- from the dialog above, one understands
no test would be catching this before (that's what I explicitly
asked), but now you're saying the opposite.

If indeed there are already tests that triggered the
error/internal-error before the fix, then I agree a new
test is not necessary.

-- 
Pedro Alves


  reply	other threads:[~2015-03-03 15:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09  9:25 Markus Metzger
2015-03-02 22:09 ` Pedro Alves
2015-03-03 10:49   ` Metzger, Markus T
2015-03-03 11:55     ` Pedro Alves
2015-03-03 12:25       ` Metzger, Markus T
2015-03-03 13:41         ` Pedro Alves
2015-03-03 13:55           ` Metzger, Markus T
2015-03-03 14:03             ` Pedro Alves
2015-03-03 14:45               ` Metzger, Markus T
2015-03-03 15:25                 ` Pedro Alves [this message]
2015-03-03 15:37                   ` Metzger, Markus T
2015-03-03 15:49                     ` 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=54F5D263.4080008@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=markus.t.metzger@intel.com \
    /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