On Fri Sep 15 17:33:31 2023 +0000, Zebediah Figura wrote:
I've approved this and !3847, but generally these sort of 'fixes'
aren't particularly useful. I wonder if we should establish some sort of policy around this, because I've seen different maintainers take different positions. (And if checking for allocation failure isn't useful, I don't really see why these patches should be accepted regardless; better not to clutter the code I'd think.)
Having a formal memory error handling policy could be helpful. For what it's worth, I've only been submitting patches like this if both a static analyzer warns about it and the API has a clear way to handle an out-of-memory error.
By the way, there are several more important patches of mine waiting in the queue. Looking at static analyzer warnings is just a side project while I wait for feedback on the others.