[DTrace-devel] [PATCH 14/14] Fix string disasm due to new code path

Nick Alcock nick.alcock at oracle.com
Wed May 3 17:38:39 UTC 2023


On 2 May 2023, Eugene Loh via DTrace-devel verbalised:

> On 5/2/23 12:31, Nick Alcock wrote:
>
>> I guess this is identifying the null check in string load/store and
>> correctly recognizing that it is indeed a string?
>
> No.  Nothing specifically related to strings.  The update to the comments was supposed to make clear what was going on.  The change
> to the actual code was unfortunately a little more complicated.
>
> Anyhow, we look for access to gvars or lvars.  We used to assume a reg would be reused, and so the detection was overly narrow. 
> Since now we do a trial load (to check DT_NULL_STRING), a different reg is used.  So the disasm algorithm is now a little broader. 
> It looks for gvar/lvar access without also requiring that a reg is being reused.  It's still robust, though.  If we're reading
> dctx->gvar, we know we're accessing a gvar.

Ohhh. I clearly need to reread dt_dis.c.



More information about the DTrace-devel mailing list