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

Loading CombinedParsers causes segmentation fault #41654

Closed
KristofferC opened this issue Jul 20, 2021 · 2 comments · Fixed by #41660
Closed

Loading CombinedParsers causes segmentation fault #41654

KristofferC opened this issue Jul 20, 2021 · 2 comments · Fixed by #41660
Assignees
Labels
regression Regression in behavior compared to a previous version
Milestone

Comments

@KristofferC
Copy link
Member

(@v1.8) pkg> st CombinedParsers
      Status `~/.julia/environments/v1.8/Project.toml`
  [5ae71ed2] CombinedParsers v0.1.6

julia> using CombinedParsers
[ Info: Precompiling CombinedParsers [5ae71ed2-6f8a-4ed1-b94f-e14e8158f19e]

signal (11): Segmentation fault
in expression starting at /home/kc/.julia/packages/CombinedParsers/ZoNay/src/re-parser.jl:229
sig_match_simple at /home/kc/julia/src/typemap.c:194 [inlined]
jl_typemap_entry_assoc_exact at /home/kc/julia/src/typemap.c:959
jl_typemap_assoc_exact at /home/kc/julia/src/julia_internal.h:1282 [inlined]
jl_lookup_generic_ at /home/kc/julia/src/gf.c:2367 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2423
jl_apply at /home/kc/julia/src/julia.h:1787 [inlined]
do_apply at /home/kc/julia/src/builtins.c:713
Either at /home/kc/.julia/packages/CombinedParsers/ZoNay/src/CombinedParsers.jl:2478
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
jl_apply at /home/kc/julia/src/julia.h:1787 [inlined]
do_call at /home/kc/julia/src/interpreter.c:125
eval_value at /home/kc/julia/src/interpreter.c:214
eval_stmt_value at /home/kc/julia/src/interpreter.c:165 [inlined]
eval_body at /home/kc/julia/src/interpreter.c:583
jl_interpret_toplevel_thunk at /home/kc/julia/src/interpreter.c:727
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:885
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:830
jl_toplevel_eval_in at /home/kc/julia/src/toplevel.c:944
eval at ./boot.jl:373 [inlined]
include_string at ./loading.jl:1196
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
_include at ./loading.jl:1253
include at ./Base.jl:417
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
jl_apply at /home/kc/julia/src/julia.h:1787 [inlined]
jl_f__call_latest at /home/kc/julia/src/builtins.c:757
include at /home/kc/.julia/packages/CombinedParsers/ZoNay/src/re.jl:4
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
jl_apply at /home/kc/julia/src/julia.h:1787 [inlined]
do_call at /home/kc/julia/src/interpreter.c:125
eval_value at /home/kc/julia/src/interpreter.c:214
eval_stmt_value at /home/kc/julia/src/interpreter.c:165 [inlined]
eval_body at /home/kc/julia/src/interpreter.c:583
jl_interpret_toplevel_thunk at /home/kc/julia/src/interpreter.c:727
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:885
jl_eval_module_expr at /home/kc/julia/src/toplevel.c:196 [inlined]
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:673
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:830
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:830
jl_toplevel_eval_in at /home/kc/julia/src/toplevel.c:944
eval at ./boot.jl:373 [inlined]
include_string at ./loading.jl:1196
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
_include at ./loading.jl:1253
include at ./Base.jl:417
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
jl_apply at /home/kc/julia/src/julia.h:1787 [inlined]
jl_f__call_latest at /home/kc/julia/src/builtins.c:757
include at /home/kc/.julia/packages/CombinedParsers/ZoNay/src/CombinedParsers.jl:13
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
jl_apply at /home/kc/julia/src/julia.h:1787 [inlined]
do_call at /home/kc/julia/src/interpreter.c:125
eval_value at /home/kc/julia/src/interpreter.c:214
eval_stmt_value at /home/kc/julia/src/interpreter.c:165 [inlined]
eval_body at /home/kc/julia/src/interpreter.c:583
jl_interpret_toplevel_thunk at /home/kc/julia/src/interpreter.c:727
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:885
jl_eval_module_expr at /home/kc/julia/src/toplevel.c:196 [inlined]
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:673
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:830
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:830
jl_toplevel_eval_in at /home/kc/julia/src/toplevel.c:944
eval at ./boot.jl:373 [inlined]
include_string at ./loading.jl:1196
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
_include at ./loading.jl:1253
include at ./Base.jl:417 [inlined]
include_package_for_output at ./loading.jl:1318
jfptr_include_package_for_output_25692 at /home/kc/julia/usr/lib/julia/sys.so (unknown line)
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
jl_apply at /home/kc/julia/src/julia.h:1787 [inlined]
do_call at /home/kc/julia/src/interpreter.c:125
eval_value at /home/kc/julia/src/interpreter.c:214
eval_stmt_value at /home/kc/julia/src/interpreter.c:165 [inlined]
eval_body at /home/kc/julia/src/interpreter.c:583
jl_interpret_toplevel_thunk at /home/kc/julia/src/interpreter.c:727
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:885
jl_toplevel_eval_in at /home/kc/julia/src/toplevel.c:944
eval at ./boot.jl:373 [inlined]
eval at ./client.jl:453
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
jl_apply at /home/kc/julia/src/julia.h:1787 [inlined]
do_call at /home/kc/julia/src/interpreter.c:125
eval_value at /home/kc/julia/src/interpreter.c:214
eval_stmt_value at /home/kc/julia/src/interpreter.c:165 [inlined]
eval_body at /home/kc/julia/src/interpreter.c:583
jl_interpret_toplevel_thunk at /home/kc/julia/src/interpreter.c:727
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:885
jl_toplevel_eval_flex at /home/kc/julia/src/toplevel.c:830
jl_toplevel_eval_in at /home/kc/julia/src/toplevel.c:944
eval at ./boot.jl:373 [inlined]
exec_options at ./client.jl:268
_start at ./client.jl:495
jfptr__start_36699 at /home/kc/julia/usr/lib/julia/sys.so (unknown line)
_jl_invoke at /home/kc/julia/src/gf.c:2226 [inlined]
jl_apply_generic at /home/kc/julia/src/gf.c:2427
jl_apply at /home/kc/julia/src/julia.h:1787 [inlined]
true_main at /home/kc/julia/src/jlapi.c:559
jl_repl_entrypoint at /home/kc/julia/src/jlapi.c:701
main at /home/kc/julia/cli/loader_exe.c:42
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /home/kc/julia/usr/bin/julia (unknown line)
Allocations: 23490256 (Pool: 23483914; Big: 6342); GC: 27
ERROR: Failed to precompile CombinedParsers [5ae71ed2-6f8a-4ed1-b94f-e14e8158f19e] to /home/kc/.julia/compiled/v1.8/CombinedParsers/jl_BHWuJB.

This regression was found when testing #41499 against :release-1.7 which means that the offending commit is among the ones in #41499.

@KristofferC KristofferC added this to the 1.7 milestone Jul 20, 2021
@JeffBezanson
Copy link
Member

We are getting a null reference from a tuple whose first element is

Base.Pair{Char, CombinedParsers.AtStart}(first=Char(0x41000000), second=#<null>)

Clearly that should not be possible; there might be some layout disagreement somewhere.

@JeffBezanson
Copy link
Member

Ah, this is AtStart:

struct AtStart <: NIndexParser{0,AtStart} end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants