Commit 981d281f by Ian Lance Taylor Committed by Ian Lance Taylor

re PR other/67457 (segfault in libbacktrace)

	PR other/67457
	* mmap.c (backtrace_alloc): Correct test for mmap failure.

From-SVN: r227529
parent 6294855f
2015-09-08 Ian Lance Taylor <iant@google.com>
PR other/67457
* mmap.c (backtrace_alloc): Correct test for mmap failure.
2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> 2015-08-31 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* configure.ac: For spu-*-* targets, set have_fcntl to no. * configure.ac: For spu-*-* targets, set have_fcntl to no.
......
...@@ -139,7 +139,7 @@ backtrace_alloc (struct backtrace_state *state, ...@@ -139,7 +139,7 @@ backtrace_alloc (struct backtrace_state *state,
asksize = (size + pagesize - 1) & ~ (pagesize - 1); asksize = (size + pagesize - 1) & ~ (pagesize - 1);
page = mmap (NULL, asksize, PROT_READ | PROT_WRITE, page = mmap (NULL, asksize, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (page == NULL) if (page == MAP_FAILED)
error_callback (data, "mmap", errno); error_callback (data, "mmap", errno);
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment