• Antoine Kaufmann's avatar
    sims/nic/i40e_bm: fix logger segfault due to constructor · 759ff692
    Antoine Kaufmann authored
    Depending on the order some of the constructors get executed, instances of the
    logger can end up with a null pointer for the runner. This led to a segfault
    when calling TimePs() on that nullptr.
    
    Here we fix this in two steps: first the logger takes a device pointer, which
    in turn contains a pointer to the runner that will eventually be initialized.
    Also fix up the logger to simply use 0 as a timestamp for log events before the
    runner is there.
    759ff692
logger.cc 2.51 KB