[PATCH] Don't pass NULL to memcpy in gdb

Simon Marchi simark@simark.ca
Sat Mar 21 02:51:27 GMT 2020


On 2020-03-20 11:01 a.m., Tom Tromey wrote:
> I compiled gdb with -fsanitize=undefined and ran the test suite.
> 
> A couple of reports came from passing NULL to memcpy, e.g.:
> 
> [...]btrace-common.cc:176:13: runtime error: null pointer passed as argument 2, which is declared to never be null
> 
> While it would be better to fix this in the standard, in the meantime
> it seems easy to avoid this error.

I hope you're joking here :).  But otherwise, this LGTM.

Simon


More information about the Gdb-patches mailing list