[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v20210601 09/38] tools/guest: prepare to allocate arrays once



On 02.06.21 14:03, Olaf Hering wrote:
Am Wed, 2 Jun 2021 09:29:08 +0200
schrieb Juergen Gross <jgross@xxxxxxxx>:

+    ctx->restore.m = malloc(sizeof(*ctx->restore.m));
+    if ( !ctx->restore.m ) {

... this case might trigger without the full series applied, due to
allocating zero bytes (same for the save side below).

Such bisection point with a libc that returns NULL would be just bad luck.

Sure, but sending a patch which is known to break bisecting is bad
behavior. You could even add a dummy element (with a comment indicating
its purpose) which could be removed when the first "real" structure
element is being added.

See git-bisect(1) "Avoiding testing a commit" how to deal with it, in the 
unlikely case it actually triggers.

It can be avoided, yes, but you need to search for the reason the
failure occurred first. And this debugging effort should be avoided
if possible.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.