Opened 6 years ago

Last modified 6 years ago

#58437 new defect

pcre, pcre2 jit libraries hang calling functions, resulting in segmentation faults — at Version 3

Reported by: essandess (Steve Smith) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: larryv (Lawrence Velázquez)
Port: pcre pcre2

Description (last modified by essandess (Steve Smith))

The pcre, pcre2 jit libraries hang when called in some situations, causing segmentation faults.

This is observed when they are used as dependencies for https://github.com/rspamd/rspamd.

Here's a core dump trace using pcre: https://github.com/rspamd/rspamd/issues/2884#issuecomment-489235483

The offending routines in this example are: sljit_free_code and _pcre_jit_compile.

See this PR for a Portfile example of the rspamd port that forces the use of the native /usr/lib/libpcre.dylib library (compiled without jit) to avoid this issue: https://github.com/macports/macports-ports/commit/3778fcef647b9d3cfa19f40fd4d59aa97ae1f25a

In the current rspamd build that uses native pcre, it reports in its logs:

2019-05-04 05:03:59 #69648(main) rspamd_regexp_library_init: pcre is compiled without JIT support, so many optimizations are impossible

Getting working jit in pcre and pcre2 would be great to have.

Change History (3)

comment:1 Changed 6 years ago by essandess (Steve Smith)

Description: modified (diff)

comment:2 Changed 6 years ago by essandess (Steve Smith)

Description: modified (diff)

comment:3 Changed 6 years ago by essandess (Steve Smith)

Description: modified (diff)
Note: See TracTickets for help on using tickets.