[DTrace-devel] [PATCH v2 17/17] strings: handle null strings in the ternary conditional op

Nick Alcock nick.alcock at oracle.com
Mon Mar 21 14:45:20 UTC 2022


On 16 Mar 2022, Eugene Loh via DTrace-devel uttered the following:

> I'll look more tomorrow.  Right now I'll just say I'm not getting the commit message and in any case I would think a test should
> accompany the patch.

I'd like to, but we can't assign null pointers to strings yet at all.
Kris is looking at that.

> On 3/14/22 5:30 PM, Nick Alcock wrote:
>> This will fault if the result is a null string now that dt_cg_memcpy is
>> error-checked.  (It is not enough to make strings work: dt_cg_store_var
>> is doing the same thing, preventing you even *assigning* NULL to a
>> string. Not sure how to fix that.)

I'm... not really sure what's unclear about that? Doing what we do there
when src is NULL will crash because you can't memcpy from a null
pointer. Now we don't ignore memcpy errors, we have to test for them.



More information about the DTrace-devel mailing list