From: Dave Voutila Subject: Re: btrace: Parse unset arguments to 0 To: Christian Ludwig Cc: "tech@openbsd.org" Date: Tue, 16 Jan 2024 07:38:19 -0500 Christian Ludwig writes: > [[S/MIME Signed Part:Undecided]] > Hi, > > On Sun, 2024-01-14 at 22:04 -0500, Dave Voutila wrote: >> Do you have a simple btrace example? I believe there's an issue here, >> but not sure I'm following how to trigger it. > > Use an undefined argument in any probe. > > A simple reproducer would be: > > $ doas btrace -e 'tracepoint:sched:on__cpu { printf("%s\n", arg0); }' > Segmentation fault (core dumped) > tracepoint:sched:on_cpu doesn't provide any args. If you change the probe filter to of_cpu and use arg9 it doesn't segfault. I'll look at this a little more closely this week. I'd like to understand the behavior before we start patching the string function logic. -dv