Skip to content

Segfault on postmarketOS on Raspberry Pi 4 when opening adapter #746

Description

@User8395

The segfault happens at src/libcec/adapter/RPi/RPiCECAdapterCommunication.cpp:241:

LIB_CEC->AddLog(CEC_LOG_DEBUG, "logical address changed to %s (%x)", LIB_CEC->ToString(m_logicalAddress), m_logicalAddress);

GDB backtrace:

#0  printf_core (f=f@entry=0x0, fmt=fmt@entry=0x7ff77c0980 "logical address changed to %s (%x)", ap=ap@entry=0x7fe79611e8, nl_arg=nl_arg@entry=0x7fe7961280, 
    nl_type=nl_type@entry=0x7fe7961208) at src/stdio/vfprintf.c:432
#1  0x0000007ff7f96c98 in vfprintf (f=f@entry=0x7fe7961378, fmt=0x7ff77c0980 "logical address changed to %s (%x)", ap=...) at src/stdio/vfprintf.c:675
#2  0x0000007ff7f99a78 in vsnprintf (s=<optimized out>, n=<optimized out>, fmt=<optimized out>, ap=...) at src/stdio/vsnprintf.c:49
#3  0x0000007ff7760430 in CEC::StringUtils::FormatV[abi:cxx11](char const*, std::__va_list) (fmt=0x7ff77c0980 "logical address changed to %s (%x)", args=...)
    at /home/user/libcec/src/libcec/platform/util/StringUtils.h:57
#4  0x0000007ff7778898 in CEC::CLibCEC::AddLog (this=0x7ff6eca2c0, level=CEC::CEC_LOG_DEBUG, strFormat=0x7ff77c0980 "logical address changed to %s (%x)")
    at /home/user/libcec/src/libcec/LibCEC.cpp:467
#5  0x0000007ff777ed90 in CEC::CRPiCECAdapterCommunication::OnDataReceived (this=0x7fe7965df0, header=393280, p0=14, p1=4096, p2=0, p3=0)
    at /home/user/libcec/src/libcec/adapter/RPi/RPiCECAdapterCommunication.cpp:241
#6  0x0000007ff777e464 in rpi_cec_callback (callback_data=0x7fe7965df0, header=393280, p0=14, p1=4096, p2=0, p3=0)
    at /home/user/libcec/src/libcec/adapter/RPi/RPiCECAdapterCommunication.cpp:59
#7  0x0000007ff61233ec in ?? () from /lib/libbcm_host.so
#8  0x0000007ff4e7fa44 in ?? () from /opt/vc/lib/libvcos.so
#9  0x0000007ff7f9f8e0 in start (p=0x7fe79618b0) at src/thread/pthread_create.c:207
#10 0x0000007ff7f9dcd8 in __clone () at src/thread/aarch64/clone.s:29
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions