diff options
author | Peter Zhu <[email protected]> | 2024-06-20 13:25:30 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-06-21 11:49:01 -0400 |
commit | 90763e04ba2200f96a485d2ef3bb56817ae1b2db (patch) | |
tree | a5b9327ee455e0ab5ff25487f348aff3e39f98a6 /main.c | |
parent | bd583ca645ea348a2894f4227fcb1af650ee8dec (diff) |
Load external GC using command line argument
This commit changes the external GC to be loaded with the `--gc-library`
command line argument instead of the RUBY_GC_LIBRARY_PATH environment
variable because @nobu pointed out that loading binaries using environment
variables can pose a security risk.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -32,10 +32,15 @@ # undef RUBY_DEBUG_ENV #endif +void ruby_load_external_gc_from_argv(int argc, char **argv); + static int rb_main(int argc, char **argv) { RUBY_INIT_STACK; +#if USE_SHARED_GC + ruby_load_external_gc_from_argv(argc, argv); +#endif ruby_init(); return ruby_run_node(ruby_options(argc, argv)); } |