I have trouble understanding what you try to say - but a library like glibc must not have memory corruption problems to start with. Clearly, it seems that currently it has those problems. Either you can find maintainers for the C code which will never create a memory corruption problem, or use a tool which assists the maintainers with this. Also, more modern languages than C would in general make the code more maintainable, again helping with weeding out security problems, be they coming from memory corruption or any other cause.