Are variable argument functions ISR safe?

I have this function that I would like to use to log over serial. Ideally, I would also like it to work when in an ISR context. However I’ve noticed some random crashes that I believe is occurring because of calling this function in an ISR. Does anyone know if these variable argument functions are ISR safe? If not, are there any other ways to support variable arguments in ISR context?

 uint8_t Communication::log(const char* format, ...) {
    char params[256];
    va_list argp;
    va_start(argp, format);
    vsnprintf(params, 255, format, argp);

    // ... sends param to an mbed mailbox (isr and thread safe)

From what I’ve learned, the (…)printf family of library functions are not ISR safe.

The typical method to deal with this is to post events from the ISR to an event queue and do the printing within the event queue handler.

See the documentation for examples eg:


Thanks for the response, I’ll take a look.