• Robert Schmidt's avatar
    nr_psbchsim: fix segv by providing correct get_nrUE_params() · 44616a6a
    Robert Schmidt authored
    When running, nr_psbchsim, we get this UBsan error:
    
        openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c:79:16: runtime error: member access within misaligned address 0x0ff4278c791c for type 'struct nrUE_params_t', which requires 8 byte alignment
    
    The problem is that the corresponding definition of
    get_nrUE_params() in psbchsim.c does not actually return the UE params,
    but void, so we might or might not get something that resembles valid
    data in nr_adjust_synch_ue.c. Fix this by including nr-uesoftmodem.h
    (that provides the correct declaration) and define it correctly. Due to
    type mismatches, also adapt downlink_frequency, uplink_frequency_offset,
    and openair_cfg (which might result in the same type of bugs).
    44616a6a
psbchsim.c 21.4 KB