From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: debug container mutex association
Date: Mon, 26 Sep 2016 11:55:00 -0000 [thread overview]
Message-ID: <20160926111623.GP17376@redhat.com> (raw)
In-Reply-To: <20160920085747.GD17376@redhat.com>
On 20/09/16 09:57 +0100, Jonathan Wakely wrote:
>On 19/09/16 21:56 +0200, François Dumont wrote:
>>Hi
>>
>> Following our conversation here is a much simpler patch. I just
>>consider that all debug containers will have the same alignment.
>>
>> Even if I submit this patch as a whole I will commit into pieces,
>>at least one for the pure cleanup parts and one for the debug.cc
>>change.
>>
>> Among those changes there is:
>>- __gnu_cxx::__scoped_lock(this->_M_get_mutex());
>>+ __gnu_cxx::__scoped_lock __l(this->_M_get_mutex());
>>
>> I would appreciate if you could tell me what was happening with
>>the initial expression. I don't understand why it is compiling. I
>>even tried the same in debug.cc and started having compilation
>>errors.
>>
>> * include/debug/bitset (bitset::reference::reference(const _Base_ref&,
>> bitset*)): Remove __unused__ attribute.
>> * include/debug/safe_base.h (_Safe_iterator_base): Make
>> _Safe_sequence_base a friend.
>> (_Safe_iterator_base::_M_attach): Make protected.
>> (_Safe_iterator_base::_M_attach_single): Likewise.
>> (_Safe_iterator_base::_M_detach): Likewise.
>> (_Safe_iterator_base::_M_detach_single): Likewise.
>> (_Safe_sequence_base): Make _Safe_iterator_base a friend.
>>(_Safe_sequence_base::_Safe_sequence_base(_Safe_sequence_base&&)): New.
>> (_Safe_sequence_base::_M_swap): Make protected.
>> (_Safe_sequence_base::_M_attach): Make private.
>> (_Safe_sequence_base::_M_attach_single): Likewise.
>> (_Safe_sequence_base::_M_detach): Likewise.
>> (_Safe_sequence_base::_M_detach_single): Likewise.
>> * include/debug/safe_container.h
>> (_Safe_container::_Safe_container(_Safe_container&&)): Make default.
>> * include/debug/safe_iterator.h
>> (_Safe_iterator::operator++()): Name __scoped_lock instance.
>> * include/debug/safe_iterator.tcc: Remove trailing line.
>> * include/debug/safe_unordered_base.h
>> (_Safe_local_iterator_base::_M_attach): Make protected.
>> (_Safe_local_iterator_base::_M_attach_single): Likewise.
>> (_Safe_local_iterator_base::_M_detach): Likewise.
>> (_Safe_local_iterator_base::_M_detach_single): Likewise.
>> (_Safe_unordered_container_base): Make _Safe_local_iterator_base
>>friend.
>> (_Safe_unordered_container_base::_M_attach_local): Make private.
>> (_Safe_unordered_container_base::_M_attach_local_single): Likewise.
>> (_Safe_unordered_container_base::_M_detach_local): Likewise.
>> (_Safe_unordered_container_base::_M_detach_local_single): Likewise.
>> * src/c++11/debug.cc: Include debug/vector. Include cctype. Remove
>> functional.
>> (get_safe_base_mutex): Get mutex based on address lowest non nil bits.
>> * testsuite/23_containers/vector/debug/mutex_association.cc: New.
>>
>>Tested under Linux x86_64.
>>
>>Ok to commit ?
>
>Yes, OK for trunk. Thanks for revising it, I think this is a much
>bettter fix.
This caused a new FAIL:
FAIL: 23_containers/list/debug/invalidation/4.cc (test for excess errors)
UNRESOLVED: 23_containers/list/debug/invalidation/4.cc compilation failed to produce executable
next prev parent reply other threads:[~2016-09-26 11:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-13 20:37 François Dumont
2016-09-14 9:01 ` Jonathan Wakely
2016-09-14 20:53 ` François Dumont
2016-09-15 9:15 ` Jonathan Wakely
2016-09-19 20:19 ` François Dumont
2016-09-20 8:58 ` Jonathan Wakely
2016-09-27 15:39 ` Jonathan Wakely
2016-09-27 21:14 ` François Dumont
2016-09-20 9:20 ` Jonathan Wakely
2016-09-26 11:55 ` Jonathan Wakely [this message]
2016-09-26 12:23 ` Andreas Schwab
2016-09-26 22:09 ` François Dumont
2016-09-27 10:32 ` Jonathan Wakely
2016-09-28 19:35 ` François Dumont
2016-09-28 19:47 ` Jonathan Wakely
2017-12-29 16:10 ` Andreas Schwab
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=20160926111623.GP17376@redhat.com \
--to=jwakely@redhat.com \
--cc=frs.dumont@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/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).