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

Segfault on gamma(big(0)) on Julia v0.7 #101

Closed
dlfivefifty opened this issue Jun 23, 2018 · 3 comments
Closed

Segfault on gamma(big(0)) on Julia v0.7 #101

dlfivefifty opened this issue Jun 23, 2018 · 3 comments

Comments

@dlfivefifty
Copy link
Member

julia> using SpecialFunctions

julia> gamma(big(0))

signal (11): Segmentation fault: 11
in expression starting at no file:0
mpfr_lgamma at /Users/solver/Projects/julia7/usr/lib/libmpfr.6.dylib (unknown line)
gamma at /Users/solver/.julia/packages/SpecialFunctions/49Wj/src/gamma.jl:717
gamma at /Users/solver/.julia/packages/SpecialFunctions/49Wj/src/gamma.jl:557
jl_fptr_trampoline at /Users/solver/Projects/julia7/src/gf.c:1813
do_call at /Users/solver/Projects/julia7/src/interpreter.c:324
eval_stmt_value at /Users/solver/Projects/julia7/src/interpreter.c:363 [inlined]
eval_body at /Users/solver/Projects/julia7/src/interpreter.c:671
jl_interpret_toplevel_thunk_callback at /Users/solver/Projects/julia7/src/interpreter.c:788
unknown function (ip: 0xfffffffffffffffe)
unknown function (ip: 0x115a5b66f)
unknown function (ip: 0x0)
jl_interpret_toplevel_thunk at /Users/solver/Projects/julia7/src/interpreter.c:797
jl_toplevel_eval_flex at /Users/solver/Projects/julia7/src/toplevel.c:814
jl_toplevel_eval_in at /Users/solver/Projects/julia7/src/builtins.c:631
eval at ./boot.jl:319
eval_user_input at /Users/solver/Projects/julia7/usr/share/julia/stdlib/v0.7/REPL/src/REPL.jl:85
macro expansion at /Users/solver/Projects/julia7/usr/share/julia/stdlib/v0.7/REPL/src/REPL.jl:116 [inlined]
#28 at ./task.jl:257
jl_fptr_trampoline at /Users/solver/Projects/julia7/src/gf.c:1813
jl_apply at /Users/solver/Projects/julia7/src/./julia.h:1533 [inlined]
start_task at /Users/solver/Projects/julia7/src/task.c:268
Allocations: 3659197 (Pool: 3658607; Big: 590); GC: 7
Segmentation fault: 11
@dlfivefifty dlfivefifty changed the title Segfault on gamma(big(0)) Segfault on gamma(big(0)) on Julia v0.7 Jun 23, 2018
@dlfivefifty
Copy link
Member Author

julia> versioninfo()
Julia Version 0.7.0-alpha.236
Commit 2706a8d475 (2018-06-22 19:23 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin17.6.0)
  CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
Environment:
  JULIA_VERSION = 0.6

@ararslan
Copy link
Member

I can reproduce. Here's the output when running with LLDB:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
    frame #0: 0x000000011554ed99 libmpfr.6.dylib`mpfr_lgamma(y=0x0000000110a04df0, signp=0x0000000110a04dc0, x=0x0000000000000000, rnd=1606412720) at lngamma.c:772 [opt]
   769
   770 	  *signp = 1;  /* most common case */
   771
-> 772 	  if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (x)))
   773 	    {
   774 	      if (MPFR_IS_NAN (x))
   775 	        {
Target 0: (julia) stopped.

Did this start recently, do you know? The MPFR-related changes that have happened in Base since the 0.6.x series have been JuliaLang/julia#27331 (recent) and JuliaLang/julia#25710 (January).

@dlfivefifty
Copy link
Member Author

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

No branches or pull requests

2 participants