Skip to content

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

@luchr

Description

@luchr

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?

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorregressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions