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

Segmentation fault when using ArgParse #23136

Closed
fjarri opened this issue Aug 5, 2017 · 1 comment
Closed

Segmentation fault when using ArgParse #23136

fjarri opened this issue Aug 5, 2017 · 1 comment

Comments

@fjarri
Copy link
Contributor

fjarri commented Aug 5, 2017

Julia version:

Julia Version 0.7.0-DEV.1165
Commit 1a43098 (2017-07-31 03:33 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-4690K CPU @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
Environment:

OS: Ubuntu 16.04 x64 (also happens on Travis CI and Appveyor systems).

Installed packages:

julia> Pkg.installed()
Dict{String,VersionNumber} with 3 entries:
  "Compat"   => v"0.29.0"
  "TextWrap" => v"0.2.0"
  "ArgParse" => v"0.5.0"

The program reproducing the error (I tried to isolate it, so that it does not need ArgParse, but did not succeed; for some reason even adding or removing a println() can change whether the error appears or not):

using ArgParse

s = ArgParseSettings()
add_arg_table(s, "arg1", Dict(:nargs=>1, :required=>true))
parse_args([], s)

The result:

signal (11): Segmentation fault
while loading /home/bogdan/repos/ArgParse/test/t.jl, in expression starting on line 5
#parse_args#55 at /home/bogdan/.julia/v0.7/ArgParse/src/ArgParse.jl:1867 [inlined]
parse_args at /home/bogdan/.julia/v0.7/ArgParse/src/ArgParse.jl:1864
jl_call_fptr_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:366 [inlined]
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:385 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1929
do_call at /home/centos/buildbot/slave/package_tarball64/build/src/interpreter.c:66
eval at /home/centos/buildbot/slave/package_tarball64/build/src/interpreter.c:246
jl_interpret_toplevel_expr_in at /home/centos/buildbot/slave/package_tarball64/build/src/interpreter.c:46
jl_toplevel_eval_flex at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:582
jl_parse_eval_all at /home/centos/buildbot/slave/package_tarball64/build/src/ast.c:909
jl_load at /home/centos/buildbot/slave/package_tarball64/build/src/toplevel.c:620
include_relative at ./loading.jl:464
jl_call_fptr_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:366 [inlined]
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:385 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1929
include at ./sysimg.jl:14
jl_call_fptr_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:366 [inlined]
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:385 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1929
process_options at ./client.jl:315
_start at ./client.jl:383
jl_call_fptr_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:366 [inlined]
jl_call_method_internal at /home/centos/buildbot/slave/package_tarball64/build/src/julia_internal.h:385 [inlined]
jl_apply_generic at /home/centos/buildbot/slave/package_tarball64/build/src/gf.c:1929
unknown function (ip: 0x401ea1)
unknown function (ip: 0x4016b2)
__libc_start_main at /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
unknown function (ip: 0x40175c)
Allocations: 4912416 (Pool: 4912039; Big: 377); GC: 11
fish: “julia t.jl” terminated by signal SIGSEGV (Address boundary error)
@yuyichao
Copy link
Contributor

yuyichao commented Aug 5, 2017

Dup of #17288. LLVM reused the stackslot to save ptls but didn't take into account that it can be modified in the try branch.

@yuyichao yuyichao closed this as completed Aug 5, 2017
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