On Wed, 2024-02-28 at 10:29 -0600, David Vernet wrote: [...] > Modulo the leak pointed out by Kui-Feng in another thread. It would be nice if > we could just do this on the stack, but I guess there's no static max size for > a tname. GCC documents [0] that it does not impose name length limits. Skimming through libbpf's btf.c it looks like it does not impose limits either. I can add a name buffer and a fallback to strdup logic if tname is too long, but I don't think this code would ever be on the hot path. [0] https://gcc.gnu.org/onlinedocs/gcc/Identifiers-implementation.html#Identifiers-implementation