Skip to content

UBSan seems to have started to complain that a null pointer is passed as argument 1 to qsort #10096

Closed
@evverx

Description

@evverx

It seems that qsort that UBSan is complaining about was introduced in 0a16658. Below is the full backtrace:

../src/libsystemd/sd-device/device-enumerator.c:833:9: runtime error: null pointer passed as argument 1, which is declared to never be null
    #0 0x7fa017d893bf in device_enumerator_scan_devices ../src/libsystemd/sd-device/device-enumerator.c:833
    #1 0x7fa017d89514 in sd_device_enumerator_get_device_first ../src/libsystemd/sd-device/device-enumerator.c:846
    #2 0x55d41d24f8bb in manager_enumerate_devices ../src/login/logind.c:178
    #3 0x55d41d25aa85 in manager_startup ../src/login/logind.c:1095
    #4 0x55d41d25bd75 in main ../src/login/logind.c:1212
    #5 0x7fa01605af29 in __libc_start_main (/lib64/libc.so.6+0x20f29)
    #6 0x55d41d24d4f9 in _start (/usr/lib/systemd/systemd-logind+0x874f9)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/libsystemd/sd-device/device-enumerator.c:833:9 in

@yuwata could you take a look?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Programming errors, that need preferential fixinglogin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions