[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |WORKSFORME
 Status|UNCONFIRMED |RESOLVED

--- Comment #19 from Andrew Pinski  ---
Can't reproduce the original issue with upstream GCC releases so this is a bug
to ubuntu only.

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2021-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #18 from Andrew Pinski  ---
(In reply to Kristian Spangsege from comment #13)
> I've now run into this problem too, and it seems to be general, not just
> limited to Ubuntu.
> 
> There is the code that I compile:

So this comment #13 is definitely PR 60555 and is fixed in 6.5, 7.4, 8.3 and
9+.

Still looking into the original issue to see if it can be reproduce and such.

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2018-05-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #17 from Jonathan Wakely  ---
(In reply to Chip Salzenberg from comment #16)
> Still happening in 7.2

What is?

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2018-01-01 Thread chip at pobox dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #16 from Chip Salzenberg  ---
Still happening in 7.2

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-08-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #15 from Jonathan Wakely  ---
(In reply to Jonathan Wakely from comment #14)
> (In reply to Kristian Spangsege from comment #13)
> > I expect it to write `1`, not `0`.
> 
> Which is not a segfault, so is a completely different problem.

PR 60555 probably.

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-08-05 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #14 from Jonathan Wakely  ---
(In reply to Kristian Spangsege from comment #13)
> I expect it to write `1`, not `0`.

Which is not a segfault, so is a completely different problem.

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-08-04 Thread kristian.spangsege at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

Kristian Spangsege  changed:

   What|Removed |Added

 CC||kristian.spangsege at gmail 
dot co
   ||m

--- Comment #13 from Kristian Spangsege  
---
I've now run into this problem too, and it seems to be general, not just
limited to Ubuntu.

There is the code that I compile:

#include 
#include 
#include 

int main()
{
std::error_code ec(EDOM, std::system_category());
bool b = (ec == std::errc::argument_out_of_domain);
std::cout << b << "\n";
}

I expect it to write `1`, not `0`.

I get the expected result with Clang on OS X. I get the wrong result with

 - GCC 6.1.1 on Fedora 24, which links against libstdc++.so.6.0.22
 - GCC 5.4.0 on Linux Mint 18 (Ubuntu 14.04), which links against
libstdc++.so.6.0.21
 - GCC 4.9.3 on Linux Mint 17.1 (Ubuntu 16.04), which links against
libstdc++.so.6.0.22

It therefore seems to me that this is really a bug in libstdc++.

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-10 Thread eyenseo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #12 from eyenseo at gmail dot com ---
(In reply to Jonathan Wakely from comment #10)
> Use ldd to see which library is used at runtime. See what file that symlink
> points to. Compare with the version numbers of the releases.
> 
> GCC 4.9.0: libstdc++.so.6.0.20
> 
> GCC 5.1.0: libstdc++.so.6.0.21

It does use /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 ... why would they do
that?

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-09 Thread eyenseo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #11 from eyenseo at gmail dot com ---
(In reply to Jonathan Wakely from comment #10)
> Use ldd to see which library is used at runtime. See what file that symlink
> points to. Compare with the version numbers of the releases.
> 
> GCC 4.9.0: libstdc++.so.6.0.20
> 
> GCC 5.1.0: libstdc++.so.6.0.21

Ok will do on Monday

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread eyenseo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

eyenseo at gmail dot com changed:

   What|Removed |Added

  Attachment #37264|0   |1
is obsolete||

--- Comment #1 from eyenseo at gmail dot com ---
Created attachment 37265
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37265=edit
Fixed precompiled testcase

The other precompiled testcase had text in it.

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #8 from Jonathan Wakely  ---
(In reply to eyenseo from comment #7)
> (In reply to Jonathan Wakely from comment #6)
> 
> Thanks for letting me know of the "importance-ignoring" one two less clicks
> next time ;) 

Yes, you don't need to bother with that :-)

> I didn't include the segfault in the precompiled file as I would not be able
> to get the full output that describes the bug better than the segfault.

Ah yes, so that will be why I didn't see a segfault when mixing GCC 4.9 and GCC
5.

> So in the end we have to assume that the travis setup and my system get the
> error because the Ubuntu guys build gcc wrong - but not recognisable in the
> build settings I included in comment #1 ?

That only shows how your gcc compiler was built. If I understand correctly the
Ubuntu packages that provide libstdc++.so.6 come from a different build (of a
different version) from the gcc compiler executables.

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread eyenseo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #7 from eyenseo at gmail dot com ---
(In reply to Jonathan Wakely from comment #6)

Thanks for letting me know of the "importance-ignoring" one two less clicks
next time ;) 

I didn't include the segfault in the precompiled file as I would not be able to
get the full output that describes the bug better than the segfault.

So in the end we have to assume that the travis setup and my system get the
error because the Ubuntu guys build gcc wrong - but not recognisable in the
build settings I included in comment #1 ?

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

Jonathan Wakely  changed:

   What|Removed |Added

   Severity|critical|normal

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread eyenseo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #4 from eyenseo at gmail dot com ---
The ubuntu system I used is "normal" no testing / unstable.

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #10 from Jonathan Wakely  ---
Use ldd to see which library is used at runtime. See what file that symlink
points to. Compare with the version numbers of the releases.

GCC 4.9.0: libstdc++.so.6.0.20

GCC 5.1.0: libstdc++.so.6.0.21

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #2 from Jonathan Wakely  ---
I can't reproduce this, it might be specific to Ubuntu, maybe caused by mixing
gcc 4.9 with the lisbtdc++ from gcc 5 (which would mean this is PR 66438).

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread eyenseo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #3 from eyenseo at gmail dot com ---
This bug does not appear in 5.3.0 - using Arch Linux.

I would like to know what a critical or major bug would be if a segfault is
not? I think that a segfault is quite devastating, especially when working with
error codes that should help get out of mess.

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread eyenseo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #5 from eyenseo at gmail dot com ---
(In reply to Jonathan Wakely from comment #2)
> I can't reproduce this, it might be specific to Ubuntu, maybe caused by
> mixing gcc 4.9 with the lisbtdc++ from gcc 5 (which would mean this is PR
> 66438).

The bug seems to have something to do with ubuntu indeed:

This is gcc 4.9.3 with XCode (I suspect on OSX) [line: 2824]
https://travis-ci.org/mnmlstc/core/jobs/98418930

This is gcc 4.9.3 on Ubuntu 12.04.5 LTS [line: 430]
https://travis-ci.org/mnmlstc/core/jobs/98418950

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #6 from Jonathan Wakely  ---
(In reply to eyenseo from comment #3)
> I would like to know what a critical or major bug would be if a segfault is
> not? I think that a segfault is quite devastating, especially when working
> with error codes that should help get out of mess.

The severity field is almost useless, we don't use it in practice because too
many users think their bug is the most critical one ever and set it to critical
or blocker, but it's up to the GCC devs to determine the severity.

A segfault bug is not necessarily critical anyway, it's just a bug. Especially
a C++11 bug in GCC 4.9 given that C++11 support in 4.9 was still labelled as
experimental, and what you're doing is not supported (see below).

(In reply to eyenseo from comment #4)
> The ubuntu system I used is "normal" no testing / unstable.

I have no idea what that means in terms of which version of libstdc++ you have,
but when I compile your preprocessed source and link to GCC 5's libstdc++ I see
the wrong result (but not a segfault). That strongly suggests the behaviour you
observe on Ubuntu is due to using the experimental C++11 support in GCC 4.9
with the non-experimental and incompatible C++11 parts of the library from GCC
5, i.e. PR 66438.

I do hope to get a workaround for the problem, but it's low priority 
(definitely not critical) because mixing C++11 code from different GCC versions
was not supported before GCC 5.

[Bug libstdc++/69191] Wrong equality comparison between error_code and error_condition + segfault

2016-01-08 Thread eyenseo at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69191

--- Comment #9 from eyenseo at gmail dot com ---
(In reply to Jonathan Wakely from comment #8)
> That only shows how your gcc compiler was built. If I understand correctly
> the Ubuntu packages that provide libstdc++.so.6 come from a different build
> (of a different version) from the gcc compiler executables.

Well that sucks ... and now what?
Close this bug and report one to ubuntu? 
Is there a way I can check at runtime which library I'm using?