Skip to content

Seg fault with statically linked version of Ruby #54

Description

@jkehres

Describe the bug

I'm using a statically linked version of Ruby 2.7.2 on macOS. I can build the gem (it links against libruby.2.7-static.a) but when I require the gem, I get a seg fault at lib/wasmer.rb:31. If I use a dynamically linked version of Ruby 2.7.2 (where the gem links against libruby.2.7.dylib) everything works fine.

Steps to reproduce

  1. On a Mac, build a statically linked version of Ruby 2.7.2 (e.g. RUBY_CONFIGURE_OPTS="--disable-shared" ruby-build 2.7.2 /path/to/install)
  2. Verify that /path/to/install/lib contains libruby.2.7-static.a
  3. Build the gem against this version of Ruby
  4. Open an IRB session
  5. Run require 'wasmer'

Expected behavior

No seg fault occurs.

Actual behavior

Seg fault occurs.

Additional context

Repeating the same steps with RUBY_CONFIGURE_OPTS="--enabled-shared" works just fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🐞 bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions