[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 Paolo Carlini changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #17 from paolo at gcc dot gnu.org 2011-09-02 13:39:26 UTC --- Author: paolo Date: Fri Sep 2 13:39:22 2011 New Revision: 178475 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178475 Log: 2011-09-02 Paolo Carlini Mar

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #16 from Marc Glisse 2011-09-02 13:26:14 UTC --- (In reply to comment #15) > I'm finishing testing this. Looks good, thanks.

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 Paolo Carlini changed: What|Removed |Added Attachment #25178|0 |1 is obsolete|

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #14 from Paolo Carlini 2011-09-02 12:33:40 UTC --- (In reply to comment #13) > Doesn't _Base_bitset<1> also need a special case for > _Nb==_GLIBCXX_BITSET_BITS_PER_WORD ? You are right, got confused by the signedness. > I think we c

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #13 from Marc Glisse 2011-09-02 12:23:33 UTC --- (In reply to comment #12) > Created attachment 25178 [details] > Work in progress patch for the _M_are_all_aux issue > > I'm considering doing something like this: what do you think? C

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #12 from Paolo Carlini 2011-09-02 12:08:04 UTC --- Created attachment 25178 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25178 Work in progress patch for the _M_are_all_aux issue I'm considering doing something like this: what

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #11 from Marc Glisse 2011-09-02 10:59:46 UTC --- (In reply to comment #10) > (by the way, if you can see a neat enough way to improve _M_are_all_aux, you > are welcome to propose it! I'm definitely not an expert in this area, and when

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #10 from Paolo Carlini 2011-09-02 10:41:52 UTC --- (by the way, if you can see a neat enough way to improve _M_are_all_aux, you are welcome to propose it! I'm definitely not an expert in this area, and when I implemented it, I remembe

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 Paolo Carlini changed: What|Removed |Added Target Milestone|--- |4.6.2

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #9 from paolo at gcc dot gnu.org 2011-09-02 10:28:40 UTC --- Author: paolo Date: Fri Sep 2 10:28:36 2011 New Revision: 178463 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178463 Log: 2011-09-02 Paolo Carlini Marc

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 Paolo Carlini changed: What|Removed |Added Attachment #25174|0 |1 is obsolete|

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #7 from Paolo Carlini 2011-09-02 09:37:55 UTC --- Hi, (In reply to comment #6) > Looks better indeed. I think the compiler should be responsible for optimizing > x&~0UL, not the library. I'll have to check that bitset<32>(x).count()

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-02 Thread marc.glisse at normalesup dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #6 from Marc Glisse 2011-09-02 08:03:22 UTC --- (In reply to comment #5) > This one is much better, and actually should lead to slightly better code than > C++98, because we don't do anything if _Nw > 1 (the 32-bit case is also better

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-01 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #5 from Paolo Carlini 2011-09-02 01:35:06 UTC --- Created attachment 25174 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25174 Updated draft This one is much better, and actually should lead to slightly better code than C++98,

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-01 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 Paolo Carlini changed: What|Removed |Added Attachment #25173|0 |1 is obsolete|

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-01 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #3 from Paolo Carlini 2011-09-01 22:17:00 UTC --- Created attachment 25173 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25173 Draft patch Hi Marc. This is a patch I'm working on. Can you see anything obviously wrong with it? A

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-01 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-01 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #2 from Paolo Carlini 2011-09-01 19:29:23 UTC --- Urgh, I can't believe it's here: #ifdef __GXX_EXPERIMENTAL_CXX0X__ constexpr bitset(unsigned long long __val) noexcept : _Base(__val) { } #else

[Bug libstdc++/50268] [C++0x] bitset doesn't sanitize input

2011-09-01 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268 --- Comment #1 from Paolo Carlini 2011-09-01 19:23:37 UTC --- Any idea where the problem is?