From: Carsten Beckmann Subject: dt(4): undefined behaviour for tracepoints To: "tech@openbsd.org" Date: Wed, 24 Apr 2024 12:29:39 +0000 Hi, I believe that the tracepoints for dt(4) cause undefined behaviour. The tracepoint arguments are extracted in dt_prov_static_hook using 'va_arg(ap, uintptr_t)', so they are expected to be of type uintptr_t. The different invocations of TRACEPOINT() use a wide variety of types though without casting them to uintptr_t which to my understanding is undefined behaviour. I discovered this issue when I was seeing nonsensical values for arguments in btrace and just wanted to let you know. Carsten