Author vstinner
Recipients amaury.forgeotdarc, brian.curtin, loewis, mspacek, pitrou, tim.golden, vstinner
Date 2010-12-02.02:43:27
SpamBayes Score 3.12288e-06
Marked as misclassified No
Message-id <>
I agree that clamping is a nice solution, and attached patch implements it.

About the question of the loop: FileIO.readall() uses while(1) without checking for signals. It looks like new_buffersize() maximum size is not BIGCHUNK but (BIGCHUNK-1)*2:

        /* Keep doubling until we reach BIGCHUNK;
           then keep adding BIGCHUNK. */
        if (currentsize <= BIGCHUNK)
            return currentsize + currentsize;
            return currentsize + BIGCHUNK;

Is it a bug? But (BIGCHUNK-1)*2 is always smaller than INT_MAX. So readall() isn't affected by this bug. Should it be patched? doesn't have the bug because it uses an "int" for the size.
Date User Action Args
2010-12-02 02:43:30vstinnersetrecipients: + vstinner, loewis, amaury.forgeotdarc, pitrou, tim.golden, brian.curtin, mspacek
2010-12-02 02:43:30vstinnersetmessageid: <>
2010-12-02 02:43:28vstinnerlinkissue9611 messages
2010-12-02 02:43:28vstinnercreate