On Fri, 7 Jan 2022, Michal Prívozník wrote: > On 1/7/22 13:38, Ani Sinha wrote: > > > > > > > Ok fine but still, life is not ideal ... libraries do have bugs. > > In that case, where do we draw the line? Say pthread has a bug and it > doesn't spawn threads. Worse, it doesn't even return any error value. > Should we mitigate that too? > > I'd say stick with what's documented (abort on OOM and/or !NULL > returned) and make our lives simpler. In fact, if we'd crash because we > accessed NULL we will immediately see where and why and can report the > bug to glib for benefit of us and others. Yes, so if I were you, I would not simply remove the check. I would replace it with assert().