[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-tech
Subject:    dt(4): undefined behaviour for tracepoints
From:       Carsten Beckmann <carsten_beckmann () genua ! de>
Date:       2024-04-24 12:29:39
Message-ID: 30aea3da1a574634a0a59a60724dc0ac () genua ! de
[Download RAW message or body]


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=

["smime.p7s" (application/pkcs7-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic