Skip to content

Commit

Permalink
[LibOS] Move init_r_debug() before init_fs()
Browse files Browse the repository at this point in the history
Many subsystems (in particular, their error handling paths) rely on
debug metadata (in particular, the lock for debug info) to be already
initialized. For example, previously the FS subsystem might segfault or
fail on assert in the error handling path (if e.g. `fs.insecure__keys`
manifest option could not be parsed).

Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
  • Loading branch information
Dmitrii Kuvaiskii committed Apr 12, 2024
1 parent 1d9d9b3 commit c1eac09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libos/src/libos_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,14 @@ noreturn void libos_init(const char* const* argv, const char* const* envp) {
}

RUN_INIT(init_vma);
RUN_INIT(init_r_debug);
RUN_INIT(init_slab);
RUN_INIT(read_environs, envp);
RUN_INIT(init_rlimit);
RUN_INIT(init_fs);
RUN_INIT(init_fs_lock);
RUN_INIT(init_dcache);
RUN_INIT(init_handle);
RUN_INIT(init_r_debug);

log_debug("LibOS loaded at %p, ready to initialize", &__load_address);

Expand Down

0 comments on commit c1eac09

Please sign in to comment.