https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67392
Bug ID: 67392 Summary: Invalid mmap return value check Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: tobias at stoeckmann dot org Target Milestone: --- Created attachment 36268 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36268&action=edit check for MAP_FAILED instead of NULL If mmap() fails, MAP_FAILED will be returned. The code checks for NULL though, the error return value of malloc() and basically every other function out there.