Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Segfault with shared openssl: test/simple/test-crypto-dh-odd-key.js #8050

Closed
jbergstroem opened this issue Aug 1, 2014 · 5 comments
Closed

Comments

@jbergstroem
Copy link
Member

While building against a shared openssl 1.0.1h (on gentoo), this test fails:

(gdb) run test/simple/test-crypto-dh-odd-key.js
Starting program: /home/jbergstroem/node/out/Debug/node test/simple/test-crypto-dh-odd-key.js
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff5f68700 (LWP 5858)]
[New Thread 0x7ffff7fe5700 (LWP 5859)]
[New Thread 0x7ffff7fd4700 (LWP 5860)]
[New Thread 0x7ffff7fc3700 (LWP 5861)]

Program received signal SIGSEGV, Segmentation fault.
bn_mul_mont () at x86_64-mont.s:61
61  x86_64-mont.s: No such file or directory.

The backtrace doesn't really help here since I guess we're heading into assembly land. I'm not sure whether the openssl provided by gentoo is doing "something wrong" here, but as long as there's a provided --shared-openssl when configuring the build, I'd at least want to see tests passing.

..if I build with the bundled openssl, it works just fine.

Suggestions on how to proceed?

(On the other hand -- while building with bundled openssl I had to add -ldl to linker args, otherwise it bailed with libopenssl.a(dso_dlfcn.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5') when doing a debug build.

@indutny
Copy link
Member

indutny commented Aug 1, 2014

This is expected, the node.js is using patched version of openssl. The patch itself is in upstream, but is far from being included in a next release and updated on all OSes. Sorry, not much you could do, except probabaly building OpenSSL yourself.

@indutny indutny closed this as completed Aug 1, 2014
@jbergstroem
Copy link
Member Author

Ok, thanks. Could you possibly provide an upstream url/bug/commit so I can suggest it for earlier inclusion?

@indutny
Copy link
Member

indutny commented Aug 1, 2014

openssl/openssl@eca441b2

@jbergstroem
Copy link
Member Author

At least seems to have landed in both 1.0.1 and 1.0.2 stable branches. Thanks for the link 👍

@jbergstroem
Copy link
Member Author

Just tested with the newly released 1.0.1i. Works as intended.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants