[DTrace-devel] [PATCH 14/14] Fix string disasm due to new code path
Eugene Loh
eugene.loh at oracle.com
Tue May 2 22:11:51 UTC 2023
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.
> If so, it looks like
> it does what it's meant to:
> Reviewed-by: Nick Alcock <nick.alcock at oracle.com>
More information about the DTrace-devel
mailing list