mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Get error from dln_open when USE_SHARED_GC
Before, if dln_open failed to open RUBY_GC_LIBRARY_PATH, it would segfault because it would try to raise an error, which cannot happen because the GC has not been initialized yet. This commit changes dln_open to return the error that occurred so the caller can handle the error.
This commit is contained in:
parent
81433fd0f5
commit
b9109b270d
4 changed files with 22 additions and 26 deletions
4
dmydln.c
4
dmydln.c
|
@ -21,9 +21,9 @@ dln_symbol(void *handle, const char *symbol)
|
|||
UNREACHABLE_RETURN(NULL);
|
||||
}
|
||||
|
||||
NORETURN(void *dln_open(const char*));
|
||||
NORETURN(void *dln_open(const char *library, const char **error));
|
||||
void*
|
||||
dln_open(const char *library)
|
||||
dln_open(const char *library, const char **error)
|
||||
{
|
||||
rb_loaderror("this executable file can't load extension libraries");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue