Skip to content

systemd-nspawn seems to be failing under ubsan #9035

@evverx

Description

@evverx

Since bf428ef was merged, systemd-nspawn has been failing under ubsan:

$ sudo UBSAN_OPTIONS=print_stacktrace=1 ./build/systemd-nspawn  --register=no -D $CONTAINER_ROOT --setenv=ASAN_OPTIONS=log_path=/asan.log:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1  -b
...
../src/nspawn/nspawn.c:3994:64: runtime error: left shift of 2097152 by 10 places cannot be represented in type 'int'
    #0 0x56375daa59b6 in initialize_rlimits ../src/nspawn/nspawn.c:3994
    #1 0x56375daa681b in main ../src/nspawn/nspawn.c:4056
    #2 0x7f1a6e4dcf29 in __libc_start_main (/lib64/libc.so.6+0x20f29)
    #3 0x56375da458b9 in _start (/home/vagrant/systemd/build/systemd-nspawn+0x8b8b9)
...

I haven't looked at the code carefully yet, so I'm not sure whether it's a false positive or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions