With pcre2-10.32-8.fc30 everything was working. Thread 1 (Thread 0x7f905c2b7d00 (LWP 2263)): #0 0x00007f905c8489e5 in pcre2_substitute_32 (code=<optimized out>, subject=<optimized out>, length=<optimized out>, length@entry=40, start_offset=<optimized out>, start_offset@entry=0, options=<optimized out>, options@entry=4608, match_data=<optimized out>, mcontext=<optimized out>, replacement=<optimized out>, rlength=<optimized out>, buffer=<optimized out>, blength=<optimized out>) at src/pcre2_substitute.c:834 ptrstack = {0x0, 0x0, 0x7ffe1d669210, 0x0, 0x0, 0x0, 0x7ffe1d669230, 0x0, 0x0, 0x0, 0x7ffe1d669250, 0x0, 0x0, 0x0, 0x7ffe00000000, 0x0, 0x0, 0x0, 0x0, 0xfe5c41952253c700} ptrstackptr = 0 rc = <optimized out> subs = <optimized out> forcecase = 0 forcecasereset = 0 ovector_count = <optimized out> goptions = <optimized out> suboptions = 4608 match_data_created = <optimized out> literal = 0 overflowed = 0 utf = <optimized out> temp = {35120944, 21888, 0, 0, 493261176, 32766} ptr = 0x55800215ce00 repend = 0x55800215ce00 extra_needed = <optimized out> buff_offset = <optimized out> buff_length = <optimized out> lengthleft = <optimized out> fraglength = <optimized out> ovector = <optimized out> ovecsave = <optimized out> scb = {version = 0, input = 0x55800217ff40, output = 0x558002155dd0, output_offsets = {0, 0}, ovector = 0x558002180270, oveccount = 1, subscount = 21888} #1 0x00005580004982bc in regex_replacer_t::replace_matches (this=0x55800215cd60, arg=L"/home/brain/.config/fish/conf.d/omf.fish") at /usr/include/c++/9/bits/basic_string.h:2297 options = 4608 arglen = 40 bufsize = <optimized out> output = <optimized out> pcre2_rc = <optimized out> outlen = 18446744073709551615 done = false outstr = L"" rc = <optimized out> #2 0x0000558000496d68 in string_replace (parser=..., streams=..., argc=<optimized out>, argv=<optimized out>) at ../src/builtin_string.cpp:1054 arg = <optimized out> opts = {all_valid = true, chars_valid = false, count_valid = false, entire_valid = false, filter_valid = true, ignore_case_valid = true, index_valid = false, invert_valid = false, left_valid = false, length_valid = false, max_valid = false, no_newline_valid = false, no_quoted_valid = false, quiet_valid = true, regex_valid = true, right_valid = false, start_valid = false, style_valid = false, no_empty_valid = false, all = false, entire = false, filter = false, ignore_case = false, index = false, invert_match = false, left = false, no_newline = false, no_quoted = false, quiet = false, regex = true, right = false, no_empty = false, count = 0, length = 0, max = 0, start = 0, chars_to_trim = 0x55800056a4e0 L" \f\n\r\t", arg1 = 0x5580021606b8 L"^.*/", arg2 = 0x5580021606cc L"", escape_style = STRING_STYLE_SCRIPT} optind = 5 retval = <optimized out> pattern = 0x5580021606b8 L"^.*/" replacement = 0x5580021606cc L"" replacer = std::unique_ptr<string_replacer_t> = {get() = 0x55800215cd60} aiter = {argv_ = 0x558002160638, argidx_ = 6, buffer_ = "", split0_ = false, storage_ = L"/home/brain/.config/fish/conf.d/omf.fish", streams_ = @0x7ffe1d6698d0} #3 0x000055800046ab06 in builtin_run (parser=..., job_pgid=-2, argv=0x558002160630, streams=...) at ../src/builtin.cpp:516 grab_tty = <optimized out> pgroup_to_restore = -1 ret = <optimized out> data = 0x5580005afbb0 <builtin_datas+1104> #4 0x00005580004d5ac0 in exec_internal_builtin_proc (streams=..., proc_io_chain=..., pipe_read=<optimized out>, p=0x55800217e3d0, j=std::shared_ptr<class job_t> (use count 5, weak count 0) = {...}, parser=...) at /usr/include/c++/9/bits/shared_ptr_base.h:1020 local_builtin_stdin = 0 close_stdin = <optimized out> stdin_is_directly_redirected = <optimized out> fg = 1 local_builtin_stdin = <optimized out> close_stdin = <optimized out> stdin_is_directly_redirected = <optimized out> fg = <optimized out> in = <optimized out> in_fd = <optimized out> in_pipe = <optimized out> in_file = <optimized out> stdin_io = <optimized out> #5 exec_process_in_job (stdout_read_limit=10485760, all_ios=..., out_pipe_next_read=0x7ffe1d669800, pipe_current_read=..., j=std::shared_ptr<class job_t> (empty) = {...}, p=0x55800217e3d0, parser=...) at ../src/exec.cpp:967 builtin_io_streams = {out = {buffer_ = {buffer_limit_ = 10485760, contents_size_ = 0, elements_ = std::vector of length 0, capacity 0, discard = false}}, err = {buffer_ = {buffer_limit_ = 10485760, contents_size_ = 0, elements_ = std::vector of length 0, capacity 0, discard = false}}, stdin_fd = 0, stdin_is_directly_redirected = false, out_is_redirected = true, err_is_redirected = false, io_chain = 0x7ffe1d669890} process_net_io_chain = {<std::vector<std::shared_ptr<io_data_t>, std::allocator<std::shared_ptr<io_data_t> > >> = std::vector of length 1, capacity 1 = {std::shared_ptr<io_data_t> (use count 7, weak count 0) = {get() = 0x55800217e5f0}}, <No data fields>} pipes_to_next_command = <optimized out> pipe_current_write = {fd_ = -1} pipe_write = std::shared_ptr<io_pipe_t> (empty) = {get() = <optimized out>} pipe_read = std::shared_ptr<io_pipe_t> (empty) = {get() = <optimized out>} process_net_io_chain = <optimized out> pipes_to_next_command = <optimized out> pipe_current_write = <optimized out> pipe_write = <optimized out> pipe_read = <optimized out> local_pipe = <optimized out> builtin_io_streams = <optimized out> #6 exec_job (parser=..., j=std::shared_ptr<class job_t> (use count 5, weak count 0) = {...}) at ../src/exec.cpp:1064 current_read = {fd_ = -1} unique_p = std::unique_ptr<process_t> = {get() = 0x55800217e3d0} __for_range = <optimized out> __for_begin = <optimized out> __for_end = <optimized out> exec_error = false parent_job = std::shared_ptr<job_t> (empty) = {get() = <optimized out>} stdout_read_limit = <optimized out> all_ios = {<std::vector<std::shared_ptr<io_data_t>, std::allocator<std::shared_ptr<io_data_t> > >> = std::vector of length 1, capacity 1 = {std::shared_ptr<io_data_t> (use count 7, weak count 0) = {get() = 0x55800217e5f0}}, <No data fields>} pipe_next_read = {fd_ = -1} #7 0x0000558000555a3f in parse_execution_context_t::run_1_job (this=this@entry=0x55800217c590, job_node=..., associated_block=associated_block@entry=0x55800217e260) at /usr/include/c++/9/ext/atomicity.h:96 job_contained_external_command = false pop_result = <optimized out> populated_job = true tmodes = {c_iflag = 0, c_oflag = 0, c_cflag = 0, c_lflag = 0, c_line = 0 '\000', c_cc = '\000' <repeats 31 times>, c_ispeed = 0, c_ospeed = 0} saved_eval_level = {ref = 0x5580005b2178 <s_principal_parser+88>, saved_value = 2, restored = false} saved_node = {ref = 0x55800217c5c0, saved_value = {tree = 0x0, nodeptr = 0x0}, restored = false} start_time = 0 parse_time = 0 exec_time = 0 profile_item = 0x0 job = std::shared_ptr<job_t> (use count 5, weak count 0) = {get() = 0x55800215cc70} #8 0x0000558000556224 in parse_execution_context_t::run_job_conjunction (this=this@entry=0x55800217c590, job_expr=..., associated_block=associated_block@entry=0x55800217e260) at ../src/tnode.h:130 skip = <optimized out> result = parse_execution_success cursor = {tree = 0x558002150430, nodeptr = <optimized out>} continuation = {tree = 0x0, nodeptr = 0x0} #9 0x0000558000559969 in parse_execution_context_t::run_job_list<grammar::job_list> (this=this@entry=0x55800217c590, job_list=..., associated_block=associated_block@entry=0x55800217e260) at ../src/tnode.h:210 job_conj = {tree = <optimized out>, nodeptr = 0x55800217fa58} result = parse_execution_success #10 0x0000558000557694 in parse_execution_context_t::eval_node (this=0x55800217c590, job_list=..., associated_block=associated_block@entry=0x55800217e260, io=...) at ../src/parse_execution.cpp:1375 block_io_push = {ref = 0x55800217c5a0, saved_value = {<std::vector<std::shared_ptr<io_data_t>, std::allocator<std::shared_ptr<io_data_t> > >> = std::vector of length 0, capacity 0, <No data fields>}, restored = false} status = parse_execution_success func_name = L"" infinite_recursive_node = {tree = <optimized out>, nodeptr = 0x0} #11 0x0000558000519ba4 in parser_t::eval_node<grammar::job_list> (this=this@entry=0x5580005b2120 <s_principal_parser>, ps=std::shared_ptr<const struct parsed_source_t> (use count 4, weak count 0) = {...}, node=..., io=..., block_type=block_type@entry=SUBST, parent_job=std::shared_ptr<class job_t> (empty) = {...}) at /usr/include/c++/9/bits/unique_ptr.h:283 scope_block = 0x55800217e260 exc = <optimized out> result = <optimized out> #12 0x00005580005172f4 in parser_t::eval (this=0x5580005b2120 <s_principal_parser>, ps=std::shared_ptr<const struct parsed_source_t> (use count 4, weak count 0) = {...}, io=..., block_type=SUBST) at /usr/include/c++/9/ext/atomicity.h:96 start = {tree = 0x558002150430, nodeptr = 0x55800217fa30} #13 0x0000558000518e86 in parser_t::eval (this=this@entry=0x5580005b2120 <s_principal_parser>, cmd=L"string replace -r '^.*/' '' -- $file", io=..., block_type=block_type@entry=SUBST) at /usr/include/c++/9/ext/atomicity.h:96 error_list = std::vector of length 0, capacity 0 ps = std::shared_ptr<const parsed_source_t> (use count 4, weak count 0) = {get() = 0x558002150410} #14 0x00005580004d7cb6 in exec_subshell_internal (cmd=L"string replace -r '^.*/' '' -- $file", lst=lst@entry=0x7ffe1d66a240, apply_exit_status=<optimized out>, is_subcmd=<optimized out>) at /usr/include/c++/9/bits/basic_string.h:936 parser = @0x5580005b2120: {cancellation_requested = 0, is_within_fish_initialization = true, execution_context = std::unique_ptr<parse_execution_context_t> = {get() = 0x55800217c590}, forbidden_function = std::vector of length 0, capacity 1, my_job_list = std::__cxx11::list = {[0] = std::shared_ptr<job_t> (use count 5, weak count 0) = {get() = 0x55800215cc70}, [1] = std::shared_ptr<job_t> (use count 5, weak count 0) = {get() = 0x55800215d790}}, block_stack = std::vector of length 5, capacity 16 = {std::unique_ptr<block_t> = {get() = 0x558002156170}, std::unique_ptr<block_t> = {get() = 0x5580021561d0}, std::unique_ptr<block_t> = {get() = 0x558002156110}, std::unique_ptr<block_t> = {get() = 0x558002162dc0}, std::unique_ptr<block_t> = {get() = 0x55800217e260}}, eval_level = 3, profile_items = std::vector of length 0, capacity 0, global_event_blocks = empty std::__cxx11::list} __FUNCTION__ = "exec_subshell_internal" prev_subshell = false prev_status = 0 split_output = true ifs = {storage = "P\362\027\002\200U\000\000p\362\027\002\200U\000\000p\362\027\002\200U\000\000\000=J\000\200U\000", filled = true} subcommand_status = -1 io_buffer = std::shared_ptr<io_buffer_t> (use count 7, weak count 0) = {get() = 0x55800217e5f0} #15 0x00005580004d81e0 in exec_subshell (cmd=L"string replace -r '^.*/' '' -- $file", outputs=std::vector of length 0, capacity 0, apply_exit_status=apply_exit_status@entry=true, is_subcmd=is_subcmd@entry=true) at ../src/exec.cpp:1169 __FUNCTION__ = "exec_subshell" #16 0x00005580004dc6b5 in expand_cmdsubst (input=L"(string replace -r '^.*/' '' -- $file)", out_list=0x7ffe1d66a4d0, errors=errors@entry=0x7ffe1d66a630) at ../src/expand.cpp:640 subcmd = L"string replace -r '^.*/' '' -- $file" tail_expand = std::vector of length 0, capacity 979252908033 = {<error reading variable tail_expand (Cannot access memory at address 0x1e)> paren_begin = 0x55800217e320 L"(string replace -r '^.*/' '' -- $file)" paren_end = 0x55800217e3b4 L")" tail_begin = 0x0 i = <optimized out> j = <optimized out> in = 0x55800217e320 L"(string replace -r '^.*/' '' -- $file)" sub_res = std::vector of length 0, capacity 0 #17 0x00005580004dd018 in expand_stage_cmdsubst (input=L"(string replace -r '^.*/' '' -- $file)", out=0x7ffe1d66a4d0, flags=<optimized out>, errors=0x7ffe1d66a630) at ../src/expand.cpp:905 cmdsubst_ok = <optimized out> #18 0x00005580004dad49 in expand_string (input=L"(string replace -r '^.*/' '' -- $file)", out_completions=out_completions@entry=0x7ffe1d66a610, flags=flags@entry=64, errors=errors@entry=0x7ffe1d66a630) at /usr/include/c++/9/bits/char_traits.h:413 next = L"" this_result = <optimized out> i = 0 stage_idx = 0 stages = {0x5580004dcf00 <expand_stage_cmdsubst(wcstring, std::vector<completion_t, std::allocator<completion_t> >*, expand_flags_t, parse_error_list_t*)>, 0x5580004de510 <expand_stage_variables(wcstring, std::vector<completion_t, std::allocator<completion_t> >*, expand_flags_t, parse_error_list_t*)>, 0x5580004dc490 <expand_stage_braces(wcstring, std::vector<completion_t, std::allocator<completion_t> >*, expand_flags_t, parse_error_list_t*)>, 0x5580004da4d0 <expand_stage_home_and_self(wcstring, std::vector<completion_t, std::allocator<completion_t> >*, expand_flags_t, parse_error_list_t*)>, 0x5580004de860 <expand_stage_wildcards(wcstring, std::vector<completion_t, std::allocator<completion_t> >*, expand_flags_t, parse_error_list_t*)>} completions = std::vector of length 1, capacity 1 = {{completion = L"", description = L"", match = {type = fuzzy_match_exact, match_distance_first = 0, match_distance_second = 0}, flags = 0}} output_storage = std::vector of length 0, capacity 0 total_result = EXPAND_OK #19 0x0000558000551a14 in parse_execution_context_t::expand_arguments_from_nodes (this=this@entry=0x55800215c970, argument_nodes=std::vector of length 3, capacity 4 = {...}, out_arguments=out_arguments@entry=0x7ffe1d66a760, glob_behavior=glob_behavior@entry=parse_execution_context_t::nullglob) at /usr/include/c++/9/bits/basic_string.h:936 arg_str = L"(string replace -r '^.*/' '' -- $file)" errors = std::vector of length 0, capacity 0 expand_ret = <optimized out> arg_node = {tree = <optimized out>, nodeptr = 0x558002193830} __for_range = std::vector of length 3, capacity 4 = {{tree = 0x558002156010, nodeptr = 0x5580021937b8}, {tree = 0x558002156010, nodeptr = 0x5580021937f4}, {tree = 0x558002156010, nodeptr = 0x558002193830}} __for_begin = <optimized out> __for_end = <optimized out> arg_expanded = std::vector of length 0, capacity 1 #20 0x000055800055373d in parse_execution_context_t::populate_plain_process (this=this@entry=0x55800215c970, job=job@entry=0x558002150310, proc=proc@entry=0x55800217eab0, statement=...) at ../src/parse_execution.cpp:859 glob_behavior = parse_execution_context_t::nullglob arg_nodes = std::vector of length 3, capacity 4 = {{tree = 0x558002156010, nodeptr = 0x5580021937b8}, {tree = 0x558002156010, nodeptr = 0x5580021937f4}, {tree = 0x558002156010, nodeptr = 0x558002193830}} arg_result = <optimized out> use_implicit_cd = false cmd = L"set" args_from_cmd_expansion = std::vector of length 0, capacity 0 ret = parse_execution_success process_type = <optimized out> last_exec_run_counter = 4294967295 path_to_external_command = L"" cmd_args = std::vector of length 3, capacity 4 = {L"set", L"-l", L"basename"} process_io_chain = {<std::vector<std::shared_ptr<io_data_t>, std::allocator<std::shared_ptr<io_data_t> > >> = std::vector of length 0, capacity 0, <No data fields>} #21 0x0000558000554424 in parse_execution_context_t::populate_job_process (this=this@entry=0x55800215c970, job=job@entry=0x558002150310, proc=0x55800217eab0, statement=...) at ../src/parse_execution.cpp:1056 dec_stat = {tree = 0x558002156010, nodeptr = 0x558002193768} plain_statement = <optimized out> specific_statement = <optimized out> result = parse_execution_success #22 0x0000558000554a25 in parse_execution_context_t::populate_job_from_job_node (this=this@entry=0x55800215c970, j=j@entry=0x558002150310, job_node=..., associated_block=associated_block@entry=0x558002162dc0) at /usr/include/c++/9/bits/unique_ptr.h:357 statement = {tree = <optimized out>, nodeptr = 0x55800219372c} result = parse_execution_success processes = std::vector of length 1, capacity 1 = {std::unique_ptr<process_t> = {get() = 0x55800217eab0}} job_cont = <optimized out> #23 0x0000558000555705 in parse_execution_context_t::run_1_job (this=this@entry=0x55800215c970, job_node=..., associated_block=associated_block@entry=0x558002162dc0) at ../src/parse_execution.cpp:1221 pop_result = <optimized out> populated_job = <optimized out> tmodes = {c_iflag = 0, c_oflag = 0, c_cflag = 0, c_lflag = 0, c_line = 0 '\000', c_cc = '\000' <repeats 31 times>, c_ispeed = 0, c_ospeed = 0} saved_eval_level = {ref = 0x5580005b2178 <s_principal_parser+88>, saved_value = 1, restored = false} saved_node = {ref = 0x55800215c9a0, saved_value = {tree = 0x558002156010, nodeptr = 0x5580021934d4}, restored = false} start_time = 0 parse_time = 0 exec_time = 0 profile_item = 0x0 job = std::shared_ptr<job_t> (use count 2, weak count 0) = {get() = 0x558002150310} #24 0x0000558000556224 in parse_execution_context_t::run_job_conjunction (this=this@entry=0x55800215c970, job_expr=..., associated_block=associated_block@entry=0x558002162dc0) at ../src/tnode.h:130 skip = <optimized out> result = parse_execution_success cursor = {tree = 0x558002156010, nodeptr = <optimized out>} continuation = {tree = 0x0, nodeptr = 0x0} #25 0x0000558000559969 in parse_execution_context_t::run_job_list<grammar::job_list> (this=this@entry=0x55800215c970, job_list=..., associated_block=associated_block@entry=0x558002162dc0) at ../src/tnode.h:210 job_conj = {tree = <optimized out>, nodeptr = 0x5580021936dc} result = parse_execution_success #26 0x00005580005566f2 in parse_execution_context_t::run_for_statement (this=this@entry=0x55800215c970, header=..., block_contents=...) at ../src/parse_execution.cpp:412 retval = <optimized out> val = L"/home/brain/.config/fish/conf.d/omf.fish" __for_range = std::vector of length 1, capacity 3 = {L"/home/brain/.config/fish/conf.d/omf.fish"} __for_begin = <optimized out> __for_end = <optimized out> var_name_node = <optimized out> for_var_name = L"file" arguments = std::vector of length 1, capacity 3 = {L"/home/brain/.config/fish/conf.d/omf.fish"} ret = parse_execution_success var = {storage = "\220\327\025\002\200U\000\000x\346\027\002\200U\000\000\320\030\026\002\200U\000\000\240\356Q\000\200U\000", filled = false} fb = 0x558002162dc0 #27 0x0000558000557e6c in parse_execution_context_t::run_block_statement (this=this@entry=0x55800215c970, statement=..., associated_block=associated_block@entry=0x558002156110) at ../src/parse_execution.cpp:345 header = <optimized out> bheader = {tree = 0x558002156010, nodeptr = 0x55800219354c} contents = <optimized out> ret = parse_execution_success #28 0x0000558000555e23 in parse_execution_context_t::run_1_job (this=this@entry=0x55800215c970, job_node=..., associated_block=associated_block@entry=0x558002156110) at /usr/include/c++/9/bits/shared_ptr_base.h:1020 result = parse_execution_success statement = <optimized out> specific_statement = @0x558002193538: {source_start = 10031, source_length = 453, parent = 3375, child_start = 3379, child_count = 4 '\004', type = symbol_block_statement, keyword = parse_keyword_none, flags = 0 '\000', tag = 0 '\000'} tmodes = {c_iflag = 0, c_oflag = 0, c_cflag = 0, c_lflag = 0, c_line = 0 '\000', c_cc = '\000' <repeats 31 times>, c_ispeed = 0, c_ospeed = 0} saved_eval_level = {ref = 0x5580005b2178 <s_principal_parser+88>, saved_value = 0, restored = false} saved_node = {ref = 0x55800215c9a0, saved_value = {tree = 0x0, nodeptr = 0x0}, restored = false} start_time = 0 parse_time = 0 exec_time = 0 profile_item = 0x0 job = <optimized out> #29 0x0000558000556224 in parse_execution_context_t::run_job_conjunction (this=this@entry=0x55800215c970, job_expr=..., associated_block=associated_block@entry=0x558002156110) at ../src/tnode.h:130 skip = <optimized out> result = parse_execution_success cursor = {tree = 0x558002156010, nodeptr = <optimized out>} continuation = {tree = 0x0, nodeptr = 0x0} #30 0x0000558000559969 in parse_execution_context_t::run_job_list<grammar::job_list> (this=this@entry=0x55800215c970, job_list=..., associated_block=associated_block@entry=0x558002156110) at ../src/tnode.h:210 job_conj = {tree = <optimized out>, nodeptr = 0x5580021934ac} result = parse_execution_success #31 0x0000558000557694 in parse_execution_context_t::eval_node (this=0x55800215c970, job_list=..., associated_block=associated_block@entry=0x558002156110, io=...) at ../src/parse_execution.cpp:1375 block_io_push = {ref = 0x55800215c980, saved_value = {<std::vector<std::shared_ptr<io_data_t>, std::allocator<std::shared_ptr<io_data_t> > >> = std::vector of length 0, capacity 0, <No data fields>}, restored = false} status = parse_execution_success func_name = L"" infinite_recursive_node = {tree = <optimized out>, nodeptr = 0x0} #32 0x0000558000519ba4 in parser_t::eval_node<grammar::job_list> (this=this@entry=0x5580005b2120 <s_principal_parser>, ps=std::shared_ptr<const struct parsed_source_t> (use count 17, weak count 0) = {...}, node=..., io=..., block_type=block_type@entry=TOP, parent_job=std::shared_ptr<class job_t> (empty) = {...}) at /usr/include/c++/9/bits/unique_ptr.h:283 scope_block = 0x558002156110 exc = <optimized out> result = <optimized out> #33 0x00005580005172f4 in parser_t::eval (this=this@entry=0x5580005b2120 <s_principal_parser>, ps=std::shared_ptr<const struct parsed_source_t> (use count 17, weak count 0) = {...}, io=..., block_type=block_type@entry=TOP) at /usr/include/c++/9/ext/atomicity.h:96 start = {tree = 0x558002156010, nodeptr = 0x558002182d50} #34 0x000055800052674c in read_ni (fd=fd@entry=3, io=...) at /usr/include/c++/9/ext/atomicity.h:96 str = L"# Main file for fish command completions. This file contains various\n# common helper functions for the command completions. All actual\n# completions are located in the completions subdirectory.\n#\n# Se"... errors = std::vector of length 0, capacity 0 pstree = std::shared_ptr<const parsed_source_t> (use count 17, weak count 0) = {get() = 0x558002155ff0} parser = @0x5580005b2120: {cancellation_requested = 0, is_within_fish_initialization = true, execution_context = std::unique_ptr<parse_execution_context_t> = {get() = 0x55800217c590}, forbidden_function = std::vector of length 0, capacity 1, my_job_list = std::__cxx11::list = {[0] = std::shared_ptr<job_t> (use count 5, weak count 0) = {get() = 0x55800215cc70}, [1] = std::shared_ptr<job_t> (use count 5, weak count 0) = {get() = 0x55800215d790}}, block_stack = std::vector of length 5, capacity 16 = {std::unique_ptr<block_t> = {get() = 0x558002156170}, std::unique_ptr<block_t> = {get() = 0x5580021561d0}, std::unique_ptr<block_t> = {get() = 0x558002156110}, std::unique_ptr<block_t> = {get() = 0x558002162dc0}, std::unique_ptr<block_t> = {get() = 0x55800217e260}}, eval_level = 3, profile_items = std::vector of length 0, capacity 0, global_event_blocks = empty std::__cxx11::list} in_stream = <optimized out> acc = std::vector of length 0, capacity 16384 des = <optimized out> res = 0 #35 0x0000558000530f9a in reader_read (fd=fd@entry=3, io=...) at /usr/include/c++/9/ext/new_allocator.h:119 res = <optimized out> inter = 0 data = <optimized out> #36 0x0000558000490468 in builtin_source (parser=..., streams=..., argv=<optimized out>) at /usr/include/c++/9/ext/atomicity.h:98 __FUNCTION__ = "builtin_source" cmd = 0x55800215c9f8 L"source" argc = <optimized out> opts = {print_help = false} optind = 1 retval = <optimized out> fd = 3 buf = {st_dev = 64769, st_ino = 924371, st_nlink = 1, st_mode = 33188, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, st_size = 10485, st_blksize = 4096, st_blocks = 24, st_atim = {tv_sec = 1551877238, tv_nsec = 444598052}, st_mtim = {tv_sec = 1550583557, tv_nsec = 0}, st_ctim = {tv_sec = 1550602733, tv_nsec = 727904880}, __glibc_reserved = {0, 0, 0}} fn = <optimized out> fn_intern = 0x55800215c060 L"/usr/share/fish/config.fish" sb = 0x5580021561d0 #37 0x000055800046ab06 in builtin_run (parser=..., job_pgid=-2, argv=0x55800215c9e0, streams=...) at ../src/builtin.cpp:516 grab_tty = <optimized out> pgroup_to_restore = -1 ret = <optimized out> data = 0x5580005afb80 <builtin_datas+1056> #38 0x00005580004d5ac0 in exec_internal_builtin_proc (streams=..., proc_io_chain=..., pipe_read=<optimized out>, p=0x55800215baf0, j=std::shared_ptr<class job_t> (use count 5, weak count 0) = {...}, parser=...) at /usr/include/c++/9/bits/shared_ptr_base.h:1020 local_builtin_stdin = 0 close_stdin = <optimized out> stdin_is_directly_redirected = <optimized out> fg = 1 local_builtin_stdin = <optimized out> close_stdin = <optimized out> stdin_is_directly_redirected = <optimized out> fg = <optimized out> in = <optimized out> in_fd = <optimized out> in_pipe = <optimized out> in_file = <optimized out> stdin_io = <optimized out> #39 exec_process_in_job (stdout_read_limit=0, all_ios=..., out_pipe_next_read=0x7ffe1d66c6f0, pipe_current_read=..., j=std::shared_ptr<class job_t> (empty) = {...}, p=0x55800215baf0, parser=...) at ../src/exec.cpp:967 builtin_io_streams = {out = {buffer_ = {buffer_limit_ = 0, contents_size_ = 0, elements_ = std::vector of length 0, capacity 0, discard = false}}, err = {buffer_ = {buffer_limit_ = 0, contents_size_ = 0, elements_ = std::vector of length 0, capacity 0, discard = false}}, stdin_fd = 0, stdin_is_directly_redirected = false, out_is_redirected = false, err_is_redirected = false, io_chain = 0x7ffe1d66c780} process_net_io_chain = {<std::vector<std::shared_ptr<io_data_t>, std::allocator<std::shared_ptr<io_data_t> > >> = std::vector of length 0, capacity 0, <No data fields>} pipes_to_next_command = <optimized out> pipe_current_write = {fd_ = -1} pipe_write = std::shared_ptr<io_pipe_t> (empty) = {get() = <optimized out>} pipe_read = std::shared_ptr<io_pipe_t> (empty) = {get() = <optimized out>} process_net_io_chain = <optimized out> pipes_to_next_command = <optimized out> pipe_current_write = <optimized out> pipe_write = <optimized out> pipe_read = <optimized out> local_pipe = <optimized out> builtin_io_streams = <optimized out> #40 exec_job (parser=..., j=std::shared_ptr<class job_t> (use count 5, weak count 0) = {...}) at ../src/exec.cpp:1064 current_read = {fd_ = -1} unique_p = std::unique_ptr<process_t> = {get() = 0x55800215baf0} __for_range = <optimized out> __for_begin = <optimized out> __for_end = <optimized out> exec_error = false parent_job = std::shared_ptr<job_t> (empty) = {get() = <optimized out>} stdout_read_limit = <optimized out> all_ios = {<std::vector<std::shared_ptr<io_data_t>, std::allocator<std::shared_ptr<io_data_t> > >> = std::vector of length 0, capacity 0, <No data fields>} pipe_next_read = {fd_ = -1} #41 0x0000558000555a3f in parse_execution_context_t::run_1_job (this=this@entry=0x55800215cf60, job_node=..., associated_block=associated_block@entry=0x558002156170) at /usr/include/c++/9/ext/atomicity.h:96 job_contained_external_command = false pop_result = <optimized out> populated_job = true tmodes = {c_iflag = 0, c_oflag = 0, c_cflag = 0, c_lflag = 0, c_line = 0 '\000', c_cc = '\000' <repeats 31 times>, c_ispeed = 0, c_ospeed = 0} saved_eval_level = {ref = 0x5580005b2178 <s_principal_parser+88>, saved_value = -1, restored = false} saved_node = {ref = 0x55800215cf90, saved_value = {tree = 0x0, nodeptr = 0x0}, restored = false} start_time = 0 parse_time = 0 exec_time = 0 profile_item = 0x0 job = std::shared_ptr<job_t> (use count 5, weak count 0) = {get() = 0x55800215d790} #42 0x0000558000556224 in parse_execution_context_t::run_job_conjunction (this=this@entry=0x55800215cf60, job_expr=..., associated_block=associated_block@entry=0x558002156170) at ../src/tnode.h:130 skip = <optimized out> result = parse_execution_success cursor = {tree = 0x55800215cac0, nodeptr = <optimized out>} continuation = {tree = 0x0, nodeptr = 0x0} #43 0x0000558000559969 in parse_execution_context_t::run_job_list<grammar::job_list> (this=this@entry=0x55800215cf60, job_list=..., associated_block=associated_block@entry=0x558002156170) at ../src/tnode.h:210 job_conj = {tree = <optimized out>, nodeptr = 0x55800215de88} result = parse_execution_success #44 0x0000558000557694 in parse_execution_context_t::eval_node (this=0x55800215cf60, job_list=..., associated_block=associated_block@entry=0x558002156170, io=...) at ../src/parse_execution.cpp:1375 block_io_push = {ref = 0x55800215cf70, saved_value = {<std::vector<std::shared_ptr<io_data_t>, std::allocator<std::shared_ptr<io_data_t> > >> = std::vector of length 0, capacity 0, <No data fields>}, restored = false} status = parse_execution_success func_name = L"" infinite_recursive_node = {tree = <optimized out>, nodeptr = 0x0} #45 0x0000558000519ba4 in parser_t::eval_node<grammar::job_list> (this=this@entry=0x5580005b2120 <s_principal_parser>, ps=std::shared_ptr<const struct parsed_source_t> (use count 4, weak count 0) = {...}, node=..., io=..., block_type=block_type@entry=TOP, parent_job=std::shared_ptr<class job_t> (empty) = {...}) at /usr/include/c++/9/bits/unique_ptr.h:283 scope_block = 0x558002156170 exc = <optimized out> result = <optimized out> #46 0x00005580005172f4 in parser_t::eval (this=0x5580005b2120 <s_principal_parser>, ps=std::shared_ptr<const struct parsed_source_t> (use count 4, weak count 0) = {...}, io=..., block_type=TOP) at /usr/include/c++/9/ext/atomicity.h:96 start = {tree = 0x55800215cac0, nodeptr = 0x55800215de60} #47 0x0000558000518e86 in parser_t::eval (this=0x5580005b2120 <s_principal_parser>, cmd=L"builtin source /usr/share/fish/config.fish", io=..., block_type=TOP) at /usr/include/c++/9/ext/atomicity.h:96 error_list = std::vector of length 0, capacity 0 ps = std::shared_ptr<const parsed_source_t> (use count 4, weak count 0) = {get() = 0x55800215caa0} #48 0x0000558000467e39 in source_config_in_directory (dir=...) at /usr/include/c++/9/bits/basic_string.h:936 config_pathname = L"/usr/share/fish/config.fish" escaped_dir = L"/usr/share/fish" escaped_pathname = L"/usr/share/fish/config.fish" cmd = L"builtin source /usr/share/fish/config.fish" parser = @0x5580005b2120: {cancellation_requested = 0, is_within_fish_initialization = true, execution_context = std::unique_ptr<parse_execution_context_t> = {get() = 0x55800217c590}, forbidden_function = std::vector of length 0, capacity 1, my_job_list = std::__cxx11::list = {[0] = std::shared_ptr<job_t> (use count 5, weak count 0) = {get() = 0x55800215cc70}, [1] = std::shared_ptr<job_t> (use count 5, weak count 0) = {get() = 0x55800215d790}}, block_stack = std::vector of length 5, capacity 16 = {std::unique_ptr<block_t> = {get() = 0x558002156170}, std::unique_ptr<block_t> = {get() = 0x5580021561d0}, std::unique_ptr<block_t> = {get() = 0x558002156110}, std::unique_ptr<block_t> = {get() = 0x558002162dc0}, std::unique_ptr<block_t> = {get() = 0x55800217e260}}, eval_level = 3, profile_items = std::vector of length 0, capacity 0, global_event_blocks = empty std::__cxx11::list} #49 0x00005580004658a3 in read_init (paths=...) at ../src/fish.cpp:386 config_dir = <error: Cannot access memory at address 0xfd01> config_dir = <optimized out> #50 main (argc=3, argv=0x7ffe1d66e458) at ../src/fish.cpp:386 res = 1 my_optind = 3 dummy_argv = {0x55800055dc85 "fish", 0x0} opts = {features = L"", batch_cmds = std::vector of length 1, capacity 1 = {"/usr/bin/gnome-session"}, postconfig_cmds = std::vector of length 0, capacity 0} paths = {data = L"/usr/share/fish", sysconf = L"/etc/fish", doc = L"/usr/share/doc/fish", bin = L"/usr/bin"} parser = @0x5580005b2120: {cancellation_requested = 0, is_within_fish_initialization = true, execution_context = std::unique_ptr<parse_execution_context_t> = {get() = 0x55800217c590}, forbidden_function = std::vector of length 0, capacity 1, my_job_list = std::__cxx11::list = {[0] = std::shared_ptr<job_t> (use count 5, weak count 0) = {get() = 0x55800215cc70}, [1] = std::shared_ptr<job_t> (use count 5, weak count 0) = {get() = 0x55800215d790}}, block_stack = std::vector of length 5, capacity 16 = {std::unique_ptr<block_t> = {get() = 0x558002156170}, std::unique_ptr<block_t> = {get() = 0x5580021561d0}, std::unique_ptr<block_t> = {get() = 0x558002156110}, std::unique_ptr<block_t> = {get() = 0x558002162dc0}, std::unique_ptr<block_t> = {get() = 0x55800217e260}}, eval_level = 3, profile_items = std::vector of length 0, capacity 0, global_event_blocks = empty std::__cxx11::list} empty_ios = {<std::vector<std::shared_ptr<io_data_t>, std::allocator<std::shared_ptr<io_data_t> > >> = std::vector of length 0, capacity 0, <No data fields>} exit_status = <optimized out>
It would be welcome if you provided a reproducer. I have not idea what fish is, how it is used and how the crash is provoked. The only fish a know is 🐟 and that does contain any PCRE2 code. At least I think.
(In reply to Petr Pisar from comment #1) > It would be welcome if you provided a reproducer. I have not idea what fish > is, how it is used and how the crash is provoked. The only fish a know is 🐟 > and that does contain any PCRE2 code. At least I think. `dnf install fish` and make sure that you have this latest versions of 'pcre2*'.
(In reply to Igor Gnatenko from comment #2) > (In reply to Petr Pisar from comment #1) > > It would be welcome if you provided a reproducer. I have not idea what fish > > is, how it is used and how the crash is provoked. The only fish a know is 🐟 > > and that does contain any PCRE2 code. At least I think. > > `dnf install fish` and make sure that you have this latest versions of > 'pcre2*'. And run `fish` :)
Thanks. I can reproduce it now. It would make debugging much easier if the fish build system did not hard-code -O2 compiler option.
I diagnosed this issue as a bug in PCRE2 introduced within a new PCRE2-10.33-RC1 feature that forgot to check for mcontext pointer validity. I proposed a fix to an upstream and I will apply it soon to Fedora unless no objections emerges.