[gcc regressions] what's up with them

Hi, When I look at something like http://tinyurl.com/9v2as I assume the error is not in my library. Should/Can we do anything to fix it? -Thorsten -- Thorsten Ottosen ---------------------------- www.dezide.com http://www.cs.aau.dk/index2.php?content=Research/mi www.boost.org www.open-std.org/JTC1/SC22/WG21/

On Tue, May 03, 2005 at 10:43:36PM +0200, Thorsten Ottosen wrote:
Hi,
When I look at something like
I assume the error is not in my library. Should/Can we do anything to fix it?
I've been meaning to analyse this for a while. Will try to find time today. jon -- "That invisible hand of Adam Smith's seems to offer an extended middle finger to an awful lot of people." - George Carlin

On Tue, May 03, 2005 at 10:43:36PM +0200, Thorsten Ottosen wrote:
Hi,
When I look at something like
I assume the error is not in my library. Should/Can we do anything to fix it? Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
A number of tests have this error when running with _GLIBCXX_DEBUG: http://www.redi.uklinux.net/src/boost/status/cs-Linux-links.html#assign-mult... That is because there is a fwd decl of a std type, which causes problems in debug mode since std::vector is really declared in another namespace and pulled into std with GCC's "strong using" extension. You can fix the problem by not using the fwd decl if _GLIBCXX_DEBUG (or _GLIBCPP_DEBUG for GCC 3.3) is defined. Just include the relevant header instead of the fwd decl (if someone's running with debug mode on they are concerned about performance, since debug mode violates the performance guarantess of the std lib anyway) I reported a similar problem, and fix, in the lambda lib here: http://lists.boost.org/MailArchives/boost/msg81667.php I'll repost that, since it's not been picked up by anyone. jon -- Those who taste, know - Sufi saying

On Thu, May 05, 2005 at 12:24:08PM +0100, Jonathan Wakely wrote:
On Tue, May 03, 2005 at 10:43:36PM +0200, Thorsten Ottosen wrote:
Hi,
When I look at something like
I assume the error is not in my library. Should/Can we do anything to fix it? Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
A number of tests have this error when running with _GLIBCXX_DEBUG: http://www.redi.uklinux.net/src/boost/status/cs-Linux-links.html#assign-mult...
That is because there is a fwd decl of a std type, which causes problems in debug mode since std::vector is really declared in another namespace ^^^^^^^^^^^ (or whatever type is fwd decl'd)
and pulled into std with GCC's "strong using" extension.
You can fix the problem by not using the fwd decl if _GLIBCXX_DEBUG (or _GLIBCPP_DEBUG for GCC 3.3) is defined. Just include the relevant header instead of the fwd decl (if someone's running with debug mode on they are concerned about performance, since debug mode violates the ^^^ are NOT concerned
performance guarantess of the std lib anyway)
Sorry for the typos! jon -- "Until they become conscious they will never rebel, and until after they have rebelled they cannot become conscious." - 1984, George Orwell

On Thu, May 05, 2005 at 12:36:22PM +0100, Jonathan Wakely wrote:
On Thu, May 05, 2005 at 12:24:08PM +0100, Jonathan Wakely wrote:
On Tue, May 03, 2005 at 10:43:36PM +0200, Thorsten Ottosen wrote:
Hi,
When I look at something like
I assume the error is not in my library. Should/Can we do anything to fix it?
Sorry Thorsten, I spoke too soon, this isn't the fwd decl error I thought it was. Now I've had time to look at it I've found a bug in libstdc++'s debug mode where std::iterator is unqualified and so not found when vector<bool> is not in std. I'll fix it in GCC a.s.a.p. jon

"Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message news:20050505182044.GA50790@compsoc.man.ac.uk... | On Thu, May 05, 2005 at 12:36:22PM +0100, Jonathan Wakely wrote: | | > On Thu, May 05, 2005 at 12:24:08PM +0100, Jonathan Wakely wrote: | > | > > On Tue, May 03, 2005 at 10:43:36PM +0200, Thorsten Ottosen wrote: | > > | > > > Hi, | > > > | > > > When I look at something like | > > > | > > > http://tinyurl.com/9v2as | > > > | > > > I assume the error is not in my library. Should/Can we do anything to fix it? | | Sorry Thorsten, | | I spoke too soon, this isn't the fwd decl error I thought it was. | | Now I've had time to look at it I've found a bug in libstdc++'s debug | mode where std::iterator is unqualified and so not found when | vector<bool> is not in std. | | I'll fix it in GCC a.s.a.p. Thanks! :-) best regards Thorsten

On Thu, May 05, 2005 at 09:13:07PM +0200, Thorsten Ottosen wrote:
"Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message | Now I've had time to look at it I've found a bug in libstdc++'s debug | mode where std::iterator is unqualified and so not found when | vector<bool> is not in std. | | I'll fix it in GCC a.s.a.p.
Thanks! :-)
Hi, I've not found a reduced test case yet, but will apply the fix to GCC soon. It seems to be triggered by a "using namespace std;" before including <vector>. In the meantime, I also tried to debug this failure: http://www.redi.uklinux.net/src/boost/status/cs-Linux-links.html#ptr_contain... It looks like a double-delete on a Base object, the second time it comes to delete it the object's vtable is invalid, so trying to run the derived dtor causes a segfault. I see this with GCC4 on both x86_64 Linux and i386 FreeBSD. I modified ptr_list.cpp to add a static int Base::counter, initialised to zero, then added this to the ctors: std::cerr << '+' << this << '\t' << ++counter << endl; and made the dtor non-virtual (to prevent the vtable lookup) and added this in the dtor body: std::cerr << '-' << this << '\t' << --counter << endl; This produced: +0x80f40a0 1 +0x80f4120 2 +0x80f4160 3 +0x80f41a0 4 -0x80f40a0 3 +0x80f40a0 4 -0x80f41a0 3 +0x80f4140 4 +0x80f41a0 5 -0x80f41a0 4 +0x80f41a0 5 +0x80f4220 6 +0x80f4260 7 +0x80f42a0 8 +0x80f42e0 9 +0x80f4320 10 -0x80f40a0 9 -0x80f4160 8 -0x80f4260 7 -0x80f42a0 6 -0x80f42e0 5 -0x80f4320 4 -0x80f40a0 3 Notice how the last address is shown with more '-' than '+' That was as far as I got last night, I've not had time to debug any further. This happens when clear() is called on line 93 of sequence_test_data.hpp I'll keep looking into it when I get a chance if you don't have any ideas what's going on. jon -- VOTE, v. The instrument and symbol of a free man's power to make a fool of himself and a wreck of his country. - Ambrose Bierce, 'The Devil's Dictionary'

"Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message news:20050506165617.GA27267@compsoc.man.ac.uk... | On Thu, May 05, 2005 at 09:13:07PM +0200, Thorsten Ottosen wrote: | I've not found a reduced test case yet, but will apply the fix to GCC | soon. It seems to be triggered by a "using namespace std;" before | including <vector>. | | In the meantime, I also tried to debug this failure: | | http://www.redi.uklinux.net/src/boost/status/cs-Linux-links.html#ptr_contain... | | It looks like a double-delete on a Base object, the second time it comes | to delete it the object's vtable is invalid, so trying to run the | derived dtor causes a segfault. | | I see this with GCC4 on both x86_64 Linux and i386 FreeBSD. | | I modified ptr_list.cpp to add a static int Base::counter, initialised | to zero, then added this to the ctors: | std::cerr << '+' << this << '\t' << ++counter << endl; | and made the dtor non-virtual (to prevent the vtable lookup) and added | this in the dtor body: | std::cerr << '-' << this << '\t' << --counter << endl; | | This produced: | | +0x80f40a0 1 | +0x80f4120 2 | +0x80f4160 3 | +0x80f41a0 4 | -0x80f40a0 3 | +0x80f40a0 4 | -0x80f41a0 3 | +0x80f4140 4 | +0x80f41a0 5 | -0x80f41a0 4 | +0x80f41a0 5 | +0x80f4220 6 | +0x80f4260 7 | +0x80f42a0 8 | +0x80f42e0 9 | +0x80f4320 10 | -0x80f40a0 9 | -0x80f4160 8 | -0x80f4260 7 | -0x80f42a0 6 | -0x80f42e0 5 | -0x80f4320 4 | -0x80f40a0 3 | | Notice how the last address is shown with more '-' than '+' | | That was as far as I got last night, I've not had time to debug any | further. | This happens when clear() is called on line 93 of sequence_test_data.hpp why is sequence_test_data included in the test for ptr_set? ...it should be associative_test-data.hpp | I'll keep looking into it when I get a chance if you don't have any | ideas what's going on. I don't have any idea. :-( It would be gerat if you could nail down this error! -Thorsten

On Tue, May 10, 2005 at 07:48:44PM +0200, Thorsten Ottosen wrote:
"Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message news:20050506165617.GA27267@compsoc.man.ac.uk... | | That was as far as I got last night, I've not had time to debug any | further. | This happens when clear() is called on line 93 of sequence_test_data.hpp
why is sequence_test_data included in the test for ptr_set?
...it should be associative_test-data.hpp
I'll check again - I might have got ptr_set and ptr_list failures confused.
| I'll keep looking into it when I get a chance if you don't have any | ideas what's going on.
I don't have any idea. :-(
It would be gerat if you could nail down this error!
I'll try to as soon as I get another chance to look at it. jon

On Thu, May 05, 2005 at 09:13:07PM +0200, Thorsten Ottosen wrote:
"Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message | | Now I've had time to look at it I've found a bug in libstdc++'s debug | mode where std::iterator is unqualified and so not found when | vector<bool> is not in std. | | I'll fix it in GCC a.s.a.p.
Thanks! :-)
I see this (and similar problems) have now been fixed in GCC's CVS, see PR 18604. jon

"Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message news:20050510111935.GA96950@compsoc.man.ac.uk... | On Thu, May 05, 2005 at 09:13:07PM +0200, Thorsten Ottosen wrote: | | > "Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message | > | | > | Now I've had time to look at it I've found a bug in libstdc++'s debug | > | mode where std::iterator is unqualified and so not found when | > | vector<bool> is not in std. | > | | > | I'll fix it in GCC a.s.a.p. | > | > Thanks! :-) | | I see this (and similar problems) have now been fixed in GCC's CVS, | see PR 18604. Thanks. Where should I see PR ...? -Thorsten

On Tue, May 10, 2005 at 07:37:28PM +0200, Thorsten Ottosen wrote:
"Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message news:20050510111935.GA96950@compsoc.man.ac.uk... | On Thu, May 05, 2005 at 09:13:07PM +0200, Thorsten Ottosen wrote: | | > "Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message | > | | > | Now I've had time to look at it I've found a bug in libstdc++'s debug | > | mode where std::iterator is unqualified and so not found when | > | vector<bool> is not in std. | > | | > | I'll fix it in GCC a.s.a.p. | > | > Thanks! :-) | | I see this (and similar problems) have now been fixed in GCC's CVS, | see PR 18604.
Thanks.
Where should I see PR ...?
http://gcc.gnu.org/PR18604 will redirect to it. jon

Thorsten Ottosen schrieb:
"Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message news:20050510111935.GA96950@compsoc.man.ac.uk... | On Thu, May 05, 2005 at 09:13:07PM +0200, Thorsten Ottosen wrote: | | > "Jonathan Wakely" <cow@compsoc.man.ac.uk> wrote in message | > | | > | Now I've had time to look at it I've found a bug in libstdc++'s debug | > | mode where std::iterator is unqualified and so not found when | > | vector<bool> is not in std. | > | | > | I'll fix it in GCC a.s.a.p. | > | > Thanks! :-) | | I see this (and similar problems) have now been fixed in GCC's CVS, | see PR 18604.
Thanks.
Where should I see PR ...?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18604 ------ Additional Comment #2 From Giovanni Bajo 2004-12-30 11:59 [reply] ------- This affects Boost, I'm bumping the priority. :) -- Stefan Strasser
participants (3)
-
Jonathan Wakely
-
Stefan Strasser
-
Thorsten Ottosen