Project

General

Profile

Bug #12956

require a native library that yields the error 'incompatiable library version' shuts down the interpreter fatally

Added by gizmomogwai (Christian Köstlin) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.2p217 (2016-11-15 revision 56796) [x86_64-darwin16]
[ruby-core:78200]

Description

I would like to rescue from this in ruby-code.
Looking at the source in dln.c around line 1334 shows, that there is a special APPLE define with a comment that suggests, that properly cleaning up with dlclose crashes.
Disabling the special handling on my machine running OSX Sierra 10.12.1 did not show the crashing behavior, but instead I was able to rescue from the LoadError.
To reproduce I attached my native extension. To reproduce this just run irb -I. and require 'dotstar'

dotstar.bundle (208 KB) dotstar.bundle bundle that causes the incompatible library version error gizmomogwai (Christian Köstlin), 11/18/2016 06:58 PM

Associated revisions

Revision 5908268c
Added by nobu (Nobuyoshi Nakada) over 1 year ago

dln.c: raise LoadError

  • dln.c (dln_load): raise LoadError instead of fatal error on recent OSX, dlclose seems fixed in El Capitan or later. [Bug #12956]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 56832
Added by nobu (Nobuyoshi Nakada) over 1 year ago

dln.c: raise LoadError

  • dln.c (dln_load): raise LoadError instead of fatal error on recent OSX, dlclose seems fixed in El Capitan or later. [Bug #12956]

Revision 56832
Added by nobu (Nobuyoshi Nakada) over 1 year ago

dln.c: raise LoadError

  • dln.c (dln_load): raise LoadError instead of fatal error on recent OSX, dlclose seems fixed in El Capitan or later. [Bug #12956]

Revision 56832
Added by nobu (Nobuyoshi Nakada) over 1 year ago

dln.c: raise LoadError

  • dln.c (dln_load): raise LoadError instead of fatal error on recent OSX, dlclose seems fixed in El Capitan or later. [Bug #12956]

Revision 2706ffc7
Added by usa (Usaku NAKAMURA) over 1 year ago

merge revision(s) 56832: [Backport #12956]

dln.c: raise LoadError

* dln.c (dln_load): raise LoadError instead of fatal error on

recent OSX, dlclose seems fixed in El Capitan or later.
[Bug #12956]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 57208
Added by usa (Usaku NAKAMURA) over 1 year ago

merge revision(s) 56832: [Backport #12956]

dln.c: raise LoadError

* dln.c (dln_load): raise LoadError instead of fatal error on

recent OSX, dlclose seems fixed in El Capitan or later.
[Bug #12956]

Revision db4eec72
Added by nagachika (Tomoyuki Chikanaga) over 1 year ago

merge revision(s) 56832: [Backport #12956]

dln.c: raise LoadError

* dln.c (dln_load): raise LoadError instead of fatal error on

recent OSX, dlclose seems fixed in El Capitan or later.
[Bug #12956]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@57344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 57344
Added by nagachika (Tomoyuki Chikanaga) over 1 year ago

merge revision(s) 56832: [Backport #12956]

dln.c: raise LoadError

* dln.c (dln_load): raise LoadError instead of fatal error on

recent OSX, dlclose seems fixed in El Capitan or later.
[Bug #12956]

History

#1 [ruby-core:78210] Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED

Thank you for heading up.

I found that it works on OS X El Capitan too.
It was OS X Yosemite when I added that line (May 2015), and probably dlclose was fixed in El Capitan.

#2 Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Status changed from Open to Closed

Applied in changeset r56832.


dln.c: raise LoadError

  • dln.c (dln_load): raise LoadError instead of fatal error on recent OSX, dlclose seems fixed in El Capitan or later. [Bug #12956]

#3 [ruby-core:78217] Updated by gizmomogwai (Christian Köstlin) over 1 year ago

Thanks Nobuyoshi Nakada.
That was really fast. Looking forward to the next release containing this patch :)
Do you have an eta for this?

#4 [ruby-core:78859] Updated by usa (Usaku NAKAMURA) over 1 year ago

  • Backport changed from 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: DONE, 2.3: REQUIRED

ruby_2_2 r57208 merged revision(s) 56832.

#5 [ruby-core:79095] Updated by nagachika (Tomoyuki Chikanaga) over 1 year ago

  • Backport changed from 2.1: REQUIRED, 2.2: DONE, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: DONE, 2.3: DONE

ruby_2_3 r57344 merged revision(s) 56832.

Also available in: Atom PDF