Re: buffered files read after apr_file_close()'ed

2013-12-04 Thread William A. Rowe Jr.
On Tue, 03 Dec 2013 15:55:25 +0100 Stefan Ruppert s...@myarm.com wrote: Am 03.12.2013 15:15, schrieb Daniel Lescohier: However, the functions still need to change to return errors for the cases when they are unbuffered files. The buffer won't be referenced (and cause a crash) in those

Re: buffered files read after apr_file_close()'ed

2013-12-03 Thread Stefan Ruppert
Am 03.12.2013 00:37, schrieb William A. Rowe Jr.: On Mon, 02 Dec 2013 01:34:58 +0100 Branko Čibej br...@apache.org wrote: On 02.12.2013 01:29, Eric Covener wrote: I am looking at a httpd bug that causes a hang on windows but succeeds on unix. It seems that (short) files are opened w/

Re: buffered files read after apr_file_close()'ed

2013-12-03 Thread Jeff Trawick
On Tue, Dec 3, 2013 at 3:16 AM, Stefan Ruppert s...@myarm.com wrote: Am 03.12.2013 00:37, schrieb William A. Rowe Jr.: On Mon, 02 Dec 2013 01:34:58 +0100 Branko Čibej br...@apache.org wrote: On 02.12.2013 01:29, Eric Covener wrote: I am looking at a httpd bug that causes a hang on

Re: buffered files read after apr_file_close()'ed

2013-12-03 Thread Eric Covener
What's the least we can do for this case that avoids having to check good calls for validity and yet give unmistakable feedback? Clear the buffer pointer during close? My first thought was the same as Steffan's. To short-circuit Windows, where it hangs due to the destroyed mutex, I think

Re: buffered files read after apr_file_close()'ed

2013-12-03 Thread Stefan Ruppert
Am 03.12.2013 14:18, schrieb Jeff Trawick: On Tue, Dec 3, 2013 at 3:16 AM, Stefan Ruppert s...@myarm.com mailto:s...@myarm.com wrote: Am 03.12.2013 00:37, schrieb William A. Rowe Jr.: On Mon, 02 Dec 2013 01:34:58 +0100 Branko Čibej br...@apache.org mailto:br...@apache.org

Re: buffered files read after apr_file_close()'ed

2013-12-03 Thread Daniel Lescohier
A null pointer will cause a segmentation fault. Is it guaranteed that the memory page that the pointer 0xdeadbeef points to is one that is not marked readable writable, so that one would get a segmentation fault on reading/writing to it? However, the functions still need to change to return

Re: buffered files read after apr_file_close()'ed

2013-12-03 Thread Branko Čibej
On 03.12.2013 14:18, Jeff Trawick wrote: I keep telling myself over the years that APR's propensity to crash when called in situations as wrong as this (quite different from proprietary libraries with other considerations) is actually very good for code quality in the long run. Eh. I was in

Re: buffered files read after apr_file_close()'ed

2013-12-03 Thread Jeff Trawick
On Tue, Dec 3, 2013 at 9:15 AM, Daniel Lescohier daniel.lescoh...@cbsi.comwrote: A null pointer will cause a segmentation fault. Is it guaranteed that the memory page that the pointer 0xdeadbeef points to is one that is not marked readable writable, so that one would get a segmentation fault

Re: buffered files read after apr_file_close()'ed

2013-12-03 Thread Stefan Ruppert
Am 03.12.2013 15:15, schrieb Daniel Lescohier: A null pointer will cause a segmentation fault. Is it guaranteed that the memory page that the pointer 0xdeadbeef points to is one that is not marked readable writable, so that one would get a segmentation fault on reading/writing to it? A null

Re: buffered files read after apr_file_close()'ed

2013-12-02 Thread William A. Rowe Jr.
On Mon, 02 Dec 2013 01:34:58 +0100 Branko Čibej br...@apache.org wrote: On 02.12.2013 01:29, Eric Covener wrote: I am looking at a httpd bug that causes a hang on windows but succeeds on unix. It seems that (short) files are opened w/ buffering, read, apr_file_closed, and read again

buffered files read after apr_file_close()'ed

2013-12-01 Thread Eric Covener
I am looking at a httpd bug that causes a hang on windows but succeeds on unix. It seems that (short) files are opened w/ buffering, read, apr_file_closed, and read again [succesfully on unix] On Unix, they sare satisfied out of the buffer. file-fileset is -1. On Windows, the destroyed

Re: buffered files read after apr_file_close()'ed

2013-12-01 Thread Branko Čibej
On 02.12.2013 01:29, Eric Covener wrote: I am looking at a httpd bug that causes a hang on windows but succeeds on unix. It seems that (short) files are opened w/ buffering, read, apr_file_closed, and read again [succesfully on unix] On Unix, they sare satisfied out of the buffer.