[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495 --- Comment #28 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #27) > But the alignment problem still seems to be present in the COW std::string. But I think that's covered by PR 8670, which is still open.

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2023-11-08 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495 --- Comment #27 from Jonathan Wakely --- (In reply to Ben Elliston from comment #26) > This test now passes on powerpc*-linux-gnu. I wonder how ... the "fix" got reverted, and we still use an allocator of char to create the storage for the COW

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2015-03-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495 Bug 19495 depends on bug 24882, which changed state. Bug 24882 Summary: [meta-bug] Non-refcounted, moveable basic_string https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24882 What|Removed |Added

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2009-05-13 Thread bje at gcc dot gnu dot org
--- Comment #26 from bje at gcc dot gnu dot org 2009-05-14 02:54 --- This test now passes on powerpc*-linux-gnu. -- bje at gcc dot gnu dot org changed: What|Removed |Added

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-05-28 Thread cvs-commit at gcc dot gnu dot org
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-28 21:57 --- Subject: Bug 19495 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2005-05-28 21:57:03 Modified files: libstdc++-v3 : ChangeLog

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-05-18 Thread cvs-commit at gcc dot gnu dot org
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-18 22:11 --- Subject: Bug 19495 CVSROOT:/cvs/gcc Module name:gcc Changes by: [EMAIL PROTECTED] 2005-05-18 22:11:24 Modified files: libstdc++-v3 : ChangeLog

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-04-01 Thread pcarlini at suse dot de
-- What|Removed |Added Severity|normal |enhancement http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-04-01 Thread ncm at cantrip dot org
--- Additional Comments From ncm at cantrip dot org 2005-04-01 13:24 --- Subject: Re: basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep On Fri, Apr 01, 2005 at 11:42:27AM -, pcarlini at suse dot de wrote: What|Removed

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-04-01 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-04-01 13:31 --- Ok, my change was only dictated by consistency, and the original idea of using enhancement is not mine ;) Let's remove enhancement from both. By the way, I really noticed yesterday for the first time that

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-02-09 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-02-09 09:33 --- Will be trivially fixed in v7... -- What|Removed |Added Status|ASSIGNED

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-02-09 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-09 19:38 --- *** Bug 19867 has been marked as a duplicate of this bug. *** -- What|Removed |Added

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-02-09 Thread janis at gcc dot gnu dot org
--- Additional Comments From janis at gcc dot gnu dot org 2005-02-10 00:27 --- I've made execution of ext/array_allocator/2.cc XFAIL for powerpc*-*-linux*. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-21 Thread pcarlini at suse dot de
-- What|Removed |Added Severity|normal |enhancement http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-21 Thread ncm-nospam at cantrip dot org
--- Additional Comments From ncm-nospam at cantrip dot org 2005-01-21 15:22 --- This is a real bug, but easily fixed, and (I think) without breaking ABI. The problem is in basic_string.h, where it says struct _Rep : _Rep_base { // Types: typedef typename _Alloc::template

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-21 Thread ncm-nospam at cantrip dot org
--- Additional Comments From ncm-nospam at cantrip dot org 2005-01-21 15:37 --- Hmm, it's a little more complicated than I said, although it might be academic. There's an implicit assumption in the code that any type on which basic_string might be instantiated has no stricter

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-21 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-21 15:41 --- Thanks Nathan, I will implement what you are suggesting. The last issue, actually is filed as libstdc++/8670 and in the audit trail we agreed to fix it using a suited __attribute__(aligned), which however,

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-21 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-21 15:43 --- By the way, I understand that tr1/aligned_storage co facilities cannot be directly used for implementing the current std, since we cannot pollute the std namespace. --

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-21 Thread pcarlini at suse dot de
-- What|Removed |Added Severity|enhancement |normal http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19495

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-21 Thread ncm-nospam at cantrip dot org
--- Additional Comments From ncm-nospam at cantrip dot org 2005-01-21 16:39 --- I agree that 8670 is a separate bug. The referenced test 2.cc can be made to fail more reliably with the following changes: First, leave enough space for alignment adjustments, even on 128-bit machines: -

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-19 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-19 09:09 --- Does this behaviour seem a little bit unusual to you? You said: You cannot create a basic_stringchar object in memory aligned one. That is rather counter-intuitive to a user of libstdc++ who has no

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-19 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-19 10:05 --- Well, I can see that basic_string default allocator, std::allocatorCharT according to the standard shall return memory only aligned as CharT requests, not more; whereas our implementation of std::allocator

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-19 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-19 11:51 --- For 4.0, besides the documentation issue, I think we should change ext/array_allocator to use tr1::type_traits::aligned_storage, finally available. I will post a patch ASAP... -- What|Removed

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-19 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-01-19 15:57 --- Subject: Re: basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep pcarlini at suse dot de [EMAIL PROTECTED] writes: | Does this behaviour seem a little bit unusual to you?

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-19 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-01-19 16:02 --- Subject: Re: basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep pcarlini at suse dot de [EMAIL PROTECTED] writes: | Well, I can see that basic_string default allocator,

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-19 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-20 00:34 --- Hi Gaby, Yes. Basically, we need to have tha aligned attribute work correctly. Agreed, in principle: indeed, we are filing together and taking care of many PRs in this area. | is not present in the original

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-19 Thread gdr at integrable-solutions dot net
--- Additional Comments From gdr at integrable-solutions dot net 2005-01-20 04:08 --- Subject: Re: basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep pcarlini at suse dot de [EMAIL PROTECTED] writes: | This is way I'm proposing, *for 4.0, only for 4.0*, to

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-18 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-18 09:17 --- This is essentially a duplicate of libstdc++/8670: we'll try to look again into it: perhaps we can fix it now, but __attribute__(align(K)) is still very weak, see c++/19163 and c++/17743. *** This bug has been

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-18 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-18 09:35 --- Actually, sorry, but I'm not sure this is really the same of libstdc++/8670 (which is *not* about basic_string instantiated for plain char). The problem here seems that the alignment requirements of basic_string

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-18 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-18 09:45 --- In other terms, as far as this PR is concerned, basic_string seems ok, just you cannot create a basic_stringchar object in memory aligned one, as happens in ext/array_allocator/2.cc, which therefore should be

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-18 Thread pcarlini at suse dot de
--- Additional Comments From pcarlini at suse dot de 2005-01-18 09:53 --- Benjamin, can you please have a look? -- What|Removed |Added CC|

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-18 Thread bje at au1 dot ibm dot com
--- Additional Comments From bje at au1 dot ibm dot com 2005-01-19 06:05 --- Subject: Re: basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep On Tue, Jan 18, 2005 at 09:45:48AM -, pcarlini at suse dot de wrote: In other terms, as far as this PR is

[Bug libstdc++/19495] basic_string::_M_rep() can produce an unnaturally aligned pointer to _Rep

2005-01-18 Thread amodra at bigpond dot net dot au
--- Additional Comments From amodra at bigpond dot net dot au 2005-01-19 06:28 --- The reason for the bus error is the __exchange_and_add decrement of _M_refcount. On powerpc, lwarx and stwcx. must have an aligned effective address. -- What|Removed