Closed 0xf00fc7c8 closed 3 years ago
Either way, I have pushed that change to master.
The build will default to using pcre's JIT either via our 3rdparty or via a system pcre library unless PCRE_NO_JIT is defined during the build.
In other words I used "#ifndef PCRE_NO_JIT" to protect all of the pcre JIT code snippets I added in the previous commit. I did a test build without PCRE_NO_JIT being defined (the default) and it compiled and runs just fine on my macOS.
We can add that to the Linux/*nix build documentation.
In fact, if I ever get a newer macOS M1/M*/AArch64/ARM64 machine, I am not sure that the pcre jit (especially in pcre version 1 library since it is now at end of life) would ever support it so that flag would be needed for that new arch as well.
At some point I will look into everything that needs to be changed in Sigil in order to use the latest pcre2 version of the library.
When I use the find tool with the PCRE expression
<ins.*class="adsbygoogle"(.|\n)*<\/ins>
, and it finds a match, it causes a segmentation fault. After compiling with debug symbols and running a backtrace, I notice there seems to an infinite loop caused by the search and replace logic in 3rdparty/pcre/pcre_exec.c. I couldn't exactly tell what was wrong with the code, but I'm guessing the infinte loop caused a stack overflow, which caused a segfault? I added as much of the backtrace as I thought would be useful. I also uploaded a epub file I was editing (as a zip file). Disciple of Immortal.zip