Peter Zhu
f64c97418b
Allow RUBY_GC_LIBRARY_PATH to be set in miniruby
...
miniruby is used by tool/runruby.rb, so we need to ensure we don't rb_bug
when RUBY_GC_LIBRARY_PATH is set so we can run tests using the make
commands. This commit changes it to warn instead.
2024-04-26 17:02:08 -04:00
Peter Zhu
5c32a1503f
Change dln_open in dmydln.c to return error instead of raise
2024-04-24 13:10:06 -04:00
Peter Zhu
057b69cfdf
Pass string error buffer into dln_open
...
On Windows, the error exists on the stack so we should pass an error
buffer from the caller.
2024-04-24 13:10:06 -04:00
Peter Zhu
b9109b270d
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.
2024-04-23 15:29:42 -04:00
Matt Valentine-House
065710c0f5
Initialize external GC Library
...
Co-Authored-By: Peter Zhu <peter@peterzhu.ca>
2024-04-15 19:50:47 +01:00
Yusuke Endoh
b1431ce427
Add comments to dmydln.c, dmyenc.c, and dmyext.c
...
They are used conditionally in miniruby, dynamically-linked ruby, and
statically-linked ruby (--with-static-linked-ext).
I asked @nobu about the conditions. and I leave comments because the
conditions are insanely difficult.
2024-02-21 17:57:48 +09:00
Satoshi Tagomori
8a37df8c8b
dln_symbol: make dln_sym accessible Ruby internally
...
The symbol resolved by dln_symbol will eventually be passed to
extensions. The error handling of dln_sym is also separated into
dln_sym_func because the new call resolving symbols will not raise
LoadError.
2023-12-14 17:39:42 +09:00
nobu
97e05dad7f
UNREACHABLE_RETURN
...
* include/ruby/ruby.h (UNREACHABLE_RETURN): UNREACHABLE at the end
of non-void functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-24 05:38:07 +00:00
naruse
a6c8e8d15b
* configure.in: add -Wsuggest-attribute=noreturn and suppress warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 00:55:28 +00:00
drbrain
da39d32f60
* encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
...
reaches end of non-void function" warnings. [ruby-trunk - Bug #6066 ]
* re.c (name_to_backref_number): ditto.
* object.c (rb_Float): ditto.
* io.c (io_readpartial): ditto.
* io.c (io_read_nonblock): ditto.
* pack.c (rb_uv_to_utf8): ditto.
* proc.c (rb_method_entry_arity): ditto.
* vm_method.c (rb_f_notimplement): ditto.
* struct.c (rb_struct_aset_id): ditto.
* class.c (rb_scan_args): ditto.
* process.c (rlimit_resource_type): ditto.
* process.c (rlimit_resource_value): ditto.
* process.c (p_uid_switch): ditto.
* process.c (p_gid_switch): ditto.
* ext/digest/digest.c (rb_digest_instance_update): ditto.
* ext/digest/digest.c (rb_digest_instance_finish): ditto.
* ext/digest/digest.c (rb_digest_instance_reset): ditto.
* ext/digest/digest.c (rb_digest_instance_block_length): ditto.
* ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto.
* ext/dl/handle.c (rb_dlhandle_close): ditto.
* ext/tk/tcltklib.c (pending_exception_check0): ditto.
* ext/tk/tcltklib.c (pending_exception_check1): ditto.
* ext/tk/tcltklib.c (ip_cancel_eval_core): ditto.
* ext/tk/tcltklib.c (lib_get_reltype_name): ditto.
* ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto.
* ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto.
* ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto.
* ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto.
* ext/fiddle/conversions.c (generic_to_value): ditto.
* ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto.
* ext/socket/socket.c (sock_s_getnameinfo): ditto.
* ext/ripper/eventids2.c (ripper_token2eventid): ditto.
* cont.c (return_fiber): ditto.
* dmydln.c (dln_load): ditto.
* vm_insnhelper.c (vm_search_normal_superclass): ditto.
* bignum.c (big_fdiv): ditto.
* marshal.c (r_symlink): ditto.
* marshal.c (r_symbol): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 23:45:37 +00:00
nobu
9afa9ba967
* dln_find.c: split from dln.c.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-24 00:55:03 +00:00
nobu
5c6e644196
* Makefile.in, common.mk: miniruby depens on MINIOBJS.
...
* dmydln.c (dln_load): dummy function to raise LoadError.
* cygwin/GNUmakefile.in, {bcc32,win32,wince}/Makefile.sub: miniruby
can't load extensions on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-20 14:25:34 +00:00