The dynamic arrays implemented by the attached patch are intended as a simplified, type-safe replacement for obstacks, and can be used to replace custom array management with an on-stack initial buffer and an exponential resizing policy using realloc. Test coverage should be reasonable complete, including allocation error testing. For the __libc_fatal testing, I had to add some support machinery. The __check_mul_overflow_size_t function should go into the header once it exists (probably without the two leading underscore). Thanks, Florian