With reference to discussion with jemarch on IRC: If I add a "rec_buf_t errors" parameter to rec_type_new(to append the malloc error to) then as it is being called in rec-rset.c in two functions both those functions would need an error context(to recieve the error) too. Then wherever those two functions are called would need an error context too, this effect bubbling upwards. rec_type_descr_p would also need a "rec_buf_t errors" parameter which would again be required at all the places rec_type_descr_p is called. I am not sure that is what is intended; it would require changing multiple functions across the code. If that is OK then I will proceed with that. Otherwise if I misunderstood something please correct me.
The other option is to create a rec_buf_t stream inside rec_type_new itself, append any errors to it, and close by the end of the function.
Siddhartha Sahai