From: ian Date: Tue, 8 Sep 2015 13:49:19 +0000 (+0000) Subject: PR other/67457 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37bab844414c75d11ae46f45196562993de6ae6a;p=thirdparty%2Fgcc.git 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 --- diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index f44a73d7cc09..92ec7a13c4ad 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,8 @@ +2015-09-08 Ian Lance Taylor + + PR other/67457 + * mmap.c (backtrace_alloc): Correct test for mmap failure. + 2015-08-31 Ulrich Weigand * configure.ac: For spu-*-* targets, set have_fcntl to no. diff --git a/libbacktrace/mmap.c b/libbacktrace/mmap.c index 1ecf13119114..47c564f13f81 100644 --- a/libbacktrace/mmap.c +++ b/libbacktrace/mmap.c @@ -139,7 +139,7 @@ backtrace_alloc (struct backtrace_state *state, asksize = (size + pagesize - 1) & ~ (pagesize - 1); page = mmap (NULL, asksize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (page == NULL) + if (page == MAP_FAILED) error_callback (data, "mmap", errno); else {