Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in FFI behaviour between 32/64 bit JRE on Windows x64 #3236

Open
bnagy opened this issue Aug 8, 2015 · 0 comments
Open

Difference in FFI behaviour between 32/64 bit JRE on Windows x64 #3236

bnagy opened this issue Aug 8, 2015 · 0 comments

Comments

@bnagy
Copy link

bnagy commented Aug 8, 2015

I have a wrapper for dbgeng.dll https://github.com/bnagy/rbuggery. At the moment I am trying to support both the 32 and 64 bit versions of the Debugging Tools For Windows, because debugging 32-bit apps with the x64 tools involves a lot of annoyances with WOW64. My plan is to switch by using the 32 or 64 bit JRE (jruby itself is only 32 bit, but you can't load 32-bit dbgeng.dll into the 64-bit JRE, naturally).

Under 64 bit java.exe everything works as expected. When I use 32-bit JRE there is no extra java.exe spawned and FFI calls to my wrapper objects fail over both DRb and Jimson. I'm presuming it's some threading thing, but I don't know.

Expected

DRb / FFI programs should work under either native or WOW64 (32 bit) JRE

Observed

x64 JRE works, x86 does not.

Environment

Microsoft Windows 7 Enterprise
6.1.7601 Service Pack 1 Build 7601

jruby 9.0.0.0 (2.2.2) 2015-07-21 e10ec96 Java HotSpot(TM) Client VM 25.51-b03
on 1.8.0_51-b16 +jit

Repro

  1. Download and install https://github.com/bnagy/rbuggery (gem build rbuggery.gemspec; gem install rbuggery-1.1.1.gem)
  2. Run examples/drb_example.rb under x64 (works)
  3. Switch to x86 by changing JAVA_HOME and try (hangs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants