Re: [PATCH 20/33] Don't report OOM error on xmlCopyNode failure

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

 



On Wed, Feb 24, 2021 at 22:25:56 -0500, Laine Stump wrote:
> On 2/24/21 11:16 AM, Peter Krempa wrote:
> > Out of memory isn't the only reason the function can fail. Add a message
> > stating that copying of a XML node failed.
> 
> Could it still fail due to OOM as well, though? And if so, is there any way
> of differentiating? (I previously looked into this for some other libxml2
> function, ended up asking DV, and I believe I was told that there isn't any
> way to tell the difference, but as usual IMBES (I May Be Experiencing
> Senility).

Yes, it's one of the options.

> At any rate, your changed message is more correct, since it's not making any
> unsubstantiated assumption about the cause of the error, while
> virRemoveOOMError() was).

I tried to formulate them such that they will be true even in OOM case
by making them as vague as the description of the error reported by the
API is.

In case of OOM though, if the OOM condition persists, the logging call
will abort() anyways right when it's called, so in all but the very
rarest cases we'd report the correct error.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux