Re: Why not cache compile failures?

Andrew Stubbs <[email protected]>
Newsgroups gmane.comp.compilers.ccache
Message-ID <[email protected]>
On 04/10/12 01:50, Shentino wrote:
> Would snooping on the compiler's own error messages help weed out
> transient failures like out of memory, disk full, and so on?
>
> I recently compiled webkit-gtk and it managed to exhaust all of my
> memory AND swap.

This does raise an interesting choice!

On the one hand, the scheme Martin has suggested for not caching 
failures due to signals should mean that this result would not be cached 
(an out-of-memory condition *could* be reported by the compiler as a 
malloc failure, but overcommit makes it more likely to show up as a 
SIGTERM/SIGKILL).

But on the other hand, if you're not sharing a cache with others, and 
it's physically impossible to compile a given file on your machine, it 
might be better to fail instantly rather than kill your machine 
everytime you run it by mistake!

On balance, I prefer the first answer though: not caching memory or disk 
exhaustion. (Disk full is harder to detect though, as it's not a signal.)

Andrew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.