[cfe-dev] Patch for bad close of file descriptor

章磊 ioripolo at gmail.com
Sat Jul 17 00:41:11 PDT 2010

Hi, Clang

Here is a small patch for StreamChecker  to check the double close of fp.

man fclose:
The behaviour of fclose() is undefined if the stream parameter is an illegal
pointer, or is a descriptor already passed to a  previous  invocation of

It adds several states to file descriptor(just like what already done in

I'll appreciate it if there are any advice about this patch.

Best regards!

Lei Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100717/a4cb2b57/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileDoubleClose.patch
Type: text/x-patch
Size: 5724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100717/a4cb2b57/attachment.bin>

More information about the cfe-dev mailing list