|
From: | Stefan Monnier |
Subject: | bug#2790: emacs 22.1.1 cannot open 5GB file on 64GB 64-bit GNU/Linux box |
Date: | Sun, 29 Mar 2009 20:59:09 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
>> In that case I'd rather do the check more directly, e.g.: >> (((EMACS_INT)st.st_size)*4)/4 == st.st_size > That will reintroduce the buggy reliance on undefined integer overflow. I do not know what you're referring to. If you're referring to the fact that (((EMACS_INT)st.st_size)*4) may overflow, then I'm not sure what problem you're envisaging: do you think that in some cases where it overflows, (((EMACS_INT)st.st_size)*4)/4 may still be equal to st.st_size (I can't think of any meningful semantics for overflow that would give me that property)? Or are you concerned about trapping overflow semantics (I've never seen it in use and doubt Emacs would work in such a system)? Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |