bug report: std::cout and posix threads

Dima Volodin dvv@dvv.ru
Fri Jan 5 12:04:00 GMT 2001


On Fri, 5 Jan 2001 07:14:43 +0100, you wrote:

>    // I know, I need a mutex to avoid manglings, but this isn't the point.

This _is_ the point.

>The problem rose when I updated my distribution,
>older compilers still work (e.g. gcc 2.95.x)
>I don't know if this is a "undefined behaviour" in the c++ standard,
>it seems strange to me that older versions handle this "correctly".
>I hope you could tell me if it's a bug in my code, a c++ UB, or whatever,
>or if it's due to the c++ stdlib.
>In the latter case, who should I contact?

It's a bug in your code - you _do_ need a mutex here.

>Walter Chiricozzi

Cheers!

Dima


More information about the Gcc-bugs mailing list