Julia: Call to cfunction(noop_func, ...) [without using the result pointer] segfaults since 0.7.0-DEV.4497

Created on 24 Mar 2018  路  4Comments  路  Source: JuliaLang/julia

The following few lines produce (for me) a deterministic segfault inside the callthis(Int32(0)) call:

noop_func = () -> nothing

function callthis(args)
  cfunction(noop_func, Cvoid, Tuple{})
  return nothing
end

callthis(Int64(0))
callthis(Int32(0))

Julia-Version:

Julia Version 0.7.0-DEV.4690
Commit 78c7d87369 (2018-03-23 22:25 UTC)
Platform Info:
  OS: Linux (x86_64-redhat-linux)
  CPU: Intel(R) Core(TM) i7-4700MQ CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
Environment:

I have no idea why. Perhaps the noop_func is "optimized" away?

bug regression

Most helpful comment

After git bisect:
The bug was introduced in commit 793481037a30fb02b09efdad447fa1d13e11390c (=0.7.0-DEV.4497).

All 4 comments

Also note that this doesn't happen on 0.6.

Oh. I forgot to mention: This bug was introduced somewhere between 0.7.0-DEV.4362 and 0.7.0-DEV.4690.

After git bisect:
The bug was introduced in commit 793481037a30fb02b09efdad447fa1d13e11390c (=0.7.0-DEV.4497).

cc @vtjnash

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StefanKarpinski picture StefanKarpinski  路  3Comments

arshpreetsingh picture arshpreetsingh  路  3Comments

omus picture omus  路  3Comments

TotalVerb picture TotalVerb  路  3Comments

iamed2 picture iamed2  路  3Comments