[Bug libstdc++/94810] std::cout segmentation fault in __attribute__((constructor)) function

2020-04-28 Thread gcasper42 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94810 --- Comment #7 from Geoffrey Casper --- I believe I did misunderstand comment 3. Thanks for your clarification. Do all global objects get marked with the constructor attribute, which leads to the ambiguity?

[Bug libstdc++/94810] std::cout segmentation fault in __attribute__((constructor)) function

2020-04-28 Thread gcasper42 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94810 --- Comment #4 from Geoffrey Casper --- Wouldn't it make more sense to initialize global objects on a per need basis? So the constructors of unused global objects would never be called and there is no ambiguity of when constructors are called. I'

[Bug libstdc++/94810] std::cout segmentation fault in __attribute__((constructor)) function

2020-04-27 Thread gcasper42 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94810 --- Comment #2 from Geoffrey Casper --- I suppose that's a workaround, but there shouldn't be a seg fault in a libstdc++ header file.

[Bug libstdc++/94810] New: std::cout segmentation fault in __attribute__((constructor)) function

2020-04-27 Thread gcasper42 at gmail dot com
Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: gcasper42 at gmail dot com Target Milestone: --- Created attachment 48389 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48389&action=edit Code to reproduce bug