Dear internal developers,

I recently discovered several failures in error detection involving
file access, stream compression and source inclusion that may bring the
program to process missing or invalid data (very severe safety bug) or
simply crash without apparent reason. I reported all these issues with
their test script trying to do as much as I can to really understand
what happen here. I think it's the time for some real internal expert
to take over these issues and kindly reply to the following questions:

1. Is there something very basic I'm missing? I'm doing something wrong?

2. If yes, what can I do to fix so that i/o errors can be detected?

3. If no, why i/o errors do not propagate through the engine, but are
   mostly ignored? and why the user's program does not get signaled
   about this, and keeps receiving empty strings or garbage instead?

There is the chance to close all these:

fread() does not detect file access error
(Also includes disk image containing a damaged file for testing.)

require* and include* do not detect input/output error
(Probably related to the bug above.)

fread() does not detect decoding errors from filter zlib.inflate
(Probably missing propagation of errors through streams.)

fread() does not detects decoding errors from filter bzip2.decompress
(Probably the same as above.)

Fix for zlib.deflate and zlib.inflate filters; fix for example #1
(This latter is actually a doc problem, but it also shows how much is
difficult to explain to the user what exactly happens if something goes
wrong and how to make safe applications).

/_|_\  Umberto Salsi

PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:

Reply via email to