]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-113343: Fix error check on mmap(2) (#113342)
authorNamhyung Kim <namhyung@gmail.com>
Thu, 21 Dec 2023 19:28:55 +0000 (11:28 -0800)
committerGitHub <noreply@github.com>
Thu, 21 Dec 2023 19:28:55 +0000 (19:28 +0000)
commit6b70c3dc5ab2f290fcdbe474bcb7d6fdf29eae4c
treec0471dc84d726f5398f094a1f8e3ad13f7ba86b8
parent5f7a80fd02158d9c655eff4202498f5cab9b2ca4
gh-113343: Fix error check on mmap(2) (#113342)

Fix error check on mmap(2)

It should check MAP_FAILED instead of NULL for error.

On mmap(2) man page:

  RETURN VALUE
       On success, mmap() returns a pointer to the mapped area.
       On error, the value MAP_FAILED (that is, (void *) -1) is
       returned, and errno is set to indicate the error.
Python/perf_trampoline.c