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

illegal instruction in libmpir #159

Open
tg-x opened this issue Apr 3, 2019 · 2 comments
Open

illegal instruction in libmpir #159

tg-x opened this issue Apr 3, 2019 · 2 comments

Comments

@tg-x
Copy link

tg-x commented Apr 3, 2019

upon startup a program using nocrypto crashes with the following on x86_64
any idea?

  • nocrypto-0.5.4-1
  • ocaml-4.07.1
  • mpir-3.0.0
  • NixOS-19.03
Program received signal SIGILL, Illegal instruction.
0x00007ffff7f8c8b5 in mpn_lshift () from /run/current-system/sw/lib/libmpir.so.23
(gdb) bt
#0  0x00007ffff7f8c8b5 in mpn_lshift () from /run/current-system/sw/lib/libmpir.so.23
#1  0x0000000000568019 in ml_z_shift_left ()
#2  0x00000000004840d6 in camlNocrypto__Numeric__lsl_1789 () at src/numeric.ml:94
#3  0x0000000000484688 in camlNocrypto__Numeric__loop_1833 () at src/numeric.ml:124
#4  0x0000000000494a39 in camlNocrypto__Dh__s_group_2386 () at src/dh.ml:81
#5  0x0000000000494ca9 in camlNocrypto__Dh__entry () at src/dh.ml:93
#6  0x00000000004786f9 in caml_program ()
#7  0x000000000058b7ba in caml_start_program ()
#8  0x000000000058bb25 in caml_startup_common (argv=0x7fffffffd6f8, pooling=<optimized out>, pooling@entry=0) at startup.c:157
#9  0x000000000058bb7b in caml_startup_exn (argv=<optimized out>) at startup.c:162
#10 caml_startup (argv=<optimized out>) at startup.c:167
#11 0x000000000058bba2 in caml_main (argv=<optimized out>) at startup.c:174
#12 0x0000000000477f2c in main (argc=<optimized out>, argv=<optimized out>) at main.c:44

0x7ffff7f8c8b5 <mpn_lshift+149> vpbroadcastq %xmm6,%ymm6
# cat /proc/cpuinfo
model name      : Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
...
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts
@tg-x
Copy link
Author

tg-x commented Apr 3, 2019

after reinstalling zarith with gmp instead of mpir it works now, there was also an issue with setting the correct libdir via opam on nix

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

No branches or pull requests

1 participant