Skip to content

Commit 37bab84

Browse files
author
ian
committed
PR other/67457
* mmap.c (backtrace_alloc): Correct test for mmap failure. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227529 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent 341ae90 commit 37bab84

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: libbacktrace/ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2015-09-08 Ian Lance Taylor <iant@google.com>
2+
3+
PR other/67457
4+
* mmap.c (backtrace_alloc): Correct test for mmap failure.
5+
16
2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
27

38
* configure.ac: For spu-*-* targets, set have_fcntl to no.

Diff for: libbacktrace/mmap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ backtrace_alloc (struct backtrace_state *state,
139139
asksize = (size + pagesize - 1) & ~ (pagesize - 1);
140140
page = mmap (NULL, asksize, PROT_READ | PROT_WRITE,
141141
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
142-
if (page == NULL)
142+
if (page == MAP_FAILED)
143143
error_callback (data, "mmap", errno);
144144
else
145145
{

0 commit comments

Comments
 (0)