Skip to content

New build system interleaves constructor priorities of application and standard library #7

Description

@Martin-Lndbl

Initialization priorities of application objects (even the default prio) can cause constructors of the application to be called before the libc++ is fully set up. Depending on the subsystem used by this constructor, the unikernel may crash.

Minimal example:

#include <iostream>

struct foo {
  foo() { std::cout << "hi\n"; }
};

static foo bar{};

extern "C" void osv_app_main() { }

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions