diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-22 12:45:32 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-07-22 12:45:32 +0000 |
commit | 2b7e8f86e18f7d81a1b6962809e0be032ac39006 (patch) | |
tree | cd458a0cf2aed7b3dad3db3f3f6f0c6c8b8623bf | |
parent | 58a6a679230a78314bd33181729c5e6435f8cd60 (diff) |
merge revision(s) 32586:
* ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()
before calling dlsym(). [ruby-dev:44091] [Bug #5021]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/dl/handle.c | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Fri Jul 22 21:45:21 2011 NARUSE, Yui <naruse@ruby-lang.org> + + * ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror() + before calling dlsym(). [ruby-dev:44091] [Bug #5021] + Fri Jul 22 19:05:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (rb_enc_symname2_p): get rid of potential out-of-bound diff --git a/ext/dl/handle.c b/ext/dl/handle.c index ce04acbe21..eea8697e06 100644 --- a/ext/dl/handle.c +++ b/ext/dl/handle.c @@ -305,6 +305,9 @@ dlhandle_sym(void *handle, const char *name) void (*func)(); rb_secure(2); +#ifdef HAVE_DLERROR + dlerror(); +#endif func = (void (*)())(VALUE)dlsym(handle, name); CHECK_DLERROR; #if defined(FUNC_STDCALL) |