Summary: | sys-apps/grep-2.16[pcre] with dev-libs/libpcre[-jit]: segmentation fault in match (...) at pcre_exec.c:2621 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alex Efros <powerman-asdf> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | CONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | test.swp |
Description
Alex Efros
2014-06-22 13:56:37 UTC
(In reply to Alex Efros from comment #0) > [ebuild R ] dev-libs/libpcre-8.33:3 USE="bzip2 cxx readline > recursion-limit (unicode) zlib -jit -libedit -pcre16 -pcre32 -static-libs" 0 > kB I had no problems with these USE flags: [ebuild R ] dev-libs/libpcre-8.33:3 USE="bzip2 cxx jit pcre16 readline recursion-limit (unicode) zlib -libedit -pcre32 -static-libs" 0 kB When matching yours, I get: #0 0x00007ffff7f98b9b in match (eptr=0x43701e "werman", ecode=0x436513 "\020\tGr", mstart=0x437018 "\374J", offset_top=2, md=<optimized out>, eptrb=0x0, rdepth=0) at pcre_exec.c:2621 cp = <optimized out> prop = <optimized out> rrc = <optimized out> i = <optimized out> c = 167775279 utf = 1 minimize = 0 possessive = 0 caseless = <optimized out> condcode = <optimized out> charptr = <optimized out> callpat = <optimized out> data = <optimized out> next = <optimized out> pp = <optimized out> prev = <optimized out> saved_eptr = <optimized out> new_recursive = {prevrec = 0x0, group_num = 0, offset_save = 0x0, saved_max = 0, saved_capture_last = 0, subject_position = 0x0} cur_is_word = <optimized out> condition = <optimized out> prev_is_word = <optimized out> prop_type = <optimized out> prop_value = 0 prop_fail_result = 0 oclength = <optimized out> occhars = "\000\000\000\000\000" codelink = <optimized out> ctype = <optimized out> length = <optimized out> max = <optimized out> min = <optimized out> number = <optimized out> offset = <optimized out> op = 16 save_capture_last = <optimized out> save_offset1 = <optimized out> save_offset2 = <optimized out> save_offset3 = <optimized out> stacksave = {0, 0, 1, 0, 4, 0, 2147215763, 0, -134733744, 32767, -136427936, 32767, -15328, 32767, 33550246, 0, -1, 0, -134729328, 32767, -134726932, 32767, 0, 0, -15312, 32767, 8387561, 0, -134729328, 32767} newptrb = {epb_prev = 0x0, epb_saved_eptr = 0x0} #1 0x00007ffff7fa901f in pcre_exec (argument_re=0x4364d0, extra_data=0x436530, subject=subject@entry=0x437000 "b0VIM 7.4", length=<optimized out>, start_offset=start_offset@entry=0, options=options@entry=8192, offsets=offsets@entry=0x7fffffffc590, offsetcount=offsetcount@entry=300) at pcre_exec.c:6976 ---Type <return> to continue, or q <return> to quit--- save_end_subject = 0x43a000 "\n" new_start_match = <optimized out> rc = <optimized out> ocount = 300 arg_offset_max = 200 newline = <optimized out> using_temporary_offsets = <optimized out> anchored = <optimized out> startline = <optimized out> firstline = <optimized out> utf = 1 has_first_char = 0 has_req_char = 0 first_char = 0 '\000' first_char2 = 0 '\000' req_char = 0 '\000' req_char2 = 0 '\000' match_block = {match_call_count = 2, match_limit = 10000000, match_limit_recursion = 8192, offset_vector = 0x7fffffffc590, offset_end = 300, offset_max = 200, nltype = 0, nllen = 1, name_count = 0, name_entry_size = 0, skip_arg_count = 0, ignore_skip_arg = 0, name_table = 0x436510 "}", nl = "\n\253\377", <incomplete sequence \367>, lcc = 0x436080 "", fcc = 0x436180 "", ctypes = 0x4363c0 "\200", notbol = 0, noteol = 0, utf = 1, jscript_compat = 0, use_ucp = 0, endonly = 0, notempty = 0, notempty_atstart = 0, hitend = 0, bsr_anycrlf = 0, hasthen = 0, start_code = 0x436510 "}", start_subject = 0x437000 "b0VIM 7.4", end_subject = 0x43a000 "\n", start_match_ptr = 0x437018 "\374J", end_match_ptr = 0x43a001 "", start_used_ptr = 0x437018 "\374J", partial = 0, end_offset_top = 0, capture_last = 0, start_offset = 0, match_function_type = 0, eptrchain = 0x0, eptrn = -134728272, recursive = 0x0, callout_data = 0x0, mark = 0x0, nomatch_mark = 0x0, once_target = 0x7fffffffc590 "\377\377\377\377\377\377\377\377"} md = 0x7fffffffc400 tables = <optimized out> start_bits = 0x0 start_match = <optimized out> end_subject = <optimized out> start_partial = 0x0 match_partial = 0x0 req_char_ptr = 0x436fff "\nb0VIM 7.4" study = 0x436570 re = 0x4364d0 #2 [...] Specifically, with USE=-jit I get segmentation faults. (In reply to Jeroen Roovers from comment #1) > Specifically, with USE=-jit I get segmentation faults. Yeah, enabliing jit fix this, but that's not an option for me - I'm on hardened, and enabliing jit mean I'll have to "paxmark m" all binaries linked with libpcre. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19c92a966c7f9b03da46dc047e4655e5e95aed30 commit 19c92a966c7f9b03da46dc047e4655e5e95aed30 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-05-03 23:56:43 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-05-03 23:57:07 +0000 sys-apps/grep: add 3.7_p20220425 (unkeyworded). Notably switches to libpcre2 (yay). Pre-release for testing. Bug: https://bugs.gentoo.org/514454 Bug: https://bugs.gentoo.org/569816 Bug: https://bugs.gentoo.org/641186 Signed-off-by: Sam James <sam@gentoo.org> sys-apps/grep/Manifest | 2 + sys-apps/grep/grep-3.7_p20220425.ebuild | 72 +++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) |