From ca86a063d575afddae055700f60192bb2769ed26 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 26 Nov 2010 23:16:24 +0000 Subject: [PATCH] * addr2line.c (rb_dump_backtrace_with_lines): should close fd on edge case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ addr2line.c | 4 +++- version.h | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4dfc83532..b9f851b060 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Nov 27 08:16:21 2010 Nobuyoshi Nakada + + * addr2line.c (rb_dump_backtrace_with_lines): should close fd on + edge case. + Fri Nov 26 13:33:24 2010 NARUSE, Yui * addr2line.c: apply a patch from shinichiro.h. diff --git a/addr2line.c b/addr2line.c index 213196faa5..72afd3e2bc 100644 --- a/addr2line.c +++ b/addr2line.c @@ -499,7 +499,9 @@ rb_dump_backtrace_with_lines(int num_traces, void **trace, char **syms) /* async-signal unsafe */ file = (char *)mmap(NULL, filesize, PROT_READ, MAP_SHARED, fd, 0); if (file == MAP_FAILED) { - perror("mmap"); + int e = errno; + close(fd); + fprintf(stderr, "mmap: %s\n", strerror(e)); continue; } diff --git a/version.h b/version.h index cebd61af47..6520cf9999 100644 --- a/version.h +++ b/version.h @@ -1,11 +1,11 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_RELEASE_DATE "2010-11-26" +#define RUBY_RELEASE_DATE "2010-11-27" #define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" #define RUBY_RELEASE_YEAR 2010 #define RUBY_RELEASE_MONTH 11 -#define RUBY_RELEASE_DAY 26 +#define RUBY_RELEASE_DAY 27 #include "ruby/version.h"