Page MenuHomePhabricator

[asan] Don't crash on fclose(NULL)

Authored by kubamracek on Nov 14 2017, 3:20 PM.



It's explicitly forbidden to call fclose with NULL, but at least on Darwin, this succeeds and doesn't segfault. To maintain binary compatibility, ASan should survice fclose(NULL) as well.

Diff Detail

Event Timeline

kubamracek created this revision.Nov 14 2017, 3:20 PM
fjricci accepted this revision.Nov 15 2017, 1:12 PM
This revision is now accepted and ready to land.Nov 15 2017, 1:12 PM
This revision was automatically updated to reflect the committed changes.