> OK, that's not a compiler/linker/loader bug at all. That is correct behaviour.
> I have seen many such static ctor/dtor DSO bugs on various Unixes before, but
> not Linux, at least not for ~10 years.
To clarify, I guess the reason why I said linker bug was because of this
The use of uninitialized globals within the constructors of other globals is fine, but calling the destructor to a static object before we hit main () is very strange indeed.
(And yes, I've hit compiler bugs before where destructors were incorrectly called :P)
> OK, that's not a compiler/ linker/ loader bug at all. That is correct behaviour.
> I have seen many such static ctor/dtor DSO bugs on various Unixes before, but
> not Linux, at least not for ~10 years.
To clarify, I guess the reason why I said linker bug was because of this
#0 CompAction::active :~CompOption // wtf ? initialization_ and_destruction
#1 CompOption:
#2 __static_
The use of uninitialized globals within the constructors of other globals is fine, but calling the destructor to a static object before we hit main () is very strange indeed.
(And yes, I've hit compiler bugs before where destructors were incorrectly called :P)