One problem with rewriting libc in a safer language is that interfaces will still be memory unsafe. No matter how many times you rewrite &#x27;gets&#x27; it will still be broken, str* will still be problematic, the heap can be still trivially corrupted by the application, etc.<p>As long as the public interfaces are still unsafe, it doesn&#x27;t seem to me that there is significant latitude to qualitatively improve the security of a libc implementation.