[Mono-dev] [Bug 575813] FileStream doesn't handle errors on Close (disk full, generic error, etc.)
Sebastien Pouliot
sebastien.pouliot at gmail.com
Mon Feb 8 10:18:40 EST 2010
On Mon, 2010-02-08 at 17:07 +0200, Alex Shulgin wrote:
> Sebastien Pouliot wrote:
> > On Mon, 2010-02-08 at 15:07 +0200, Alex Shulgin wrote:
> >>
> >> BTW, couldn't this type of programming errors be caught by lint-like
> >> tools for static code analysis?
> >
> > Yes. Finding *potential* errors is easy. Automatically spotting errors
> > that matters, like the above case, inside all the potential errors is
> > much, much, much harder.
>
> I agree, but ignored return value of close or fclose stands out as a
> plain error for me. These should be easy to spot in the pile with
> relatively little effort.
>
> What I suggest, is that if this is ever going to be fixed, then all
> similar potentially problematic places should be also reviewed.
>
> [snip]
> > You're welcome to contribute time to run static analysis tools, like
> > Gendarme, on mono code base, spot real bugs and report them into
> > bugzilla.
>
> Sorry, I don't think I ever going to have time for this.
Congratulations, you just joined the club of "I know what's wrong but
can't take the time to fix it". Note that your above suggestion which
requires "relatively little effort" was emailed exclusively to members
of the same club ;-)
Sebastien
More information about the Mono-devel-list
mailing list