Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:

./configure CFLAGS="$CFLAGS_GCC_STYLE" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-Werror
make -j3
make check
make check || (cat ./test-suite.log; false)

make install "DESTDIR=`pwd`/install-dir"
maint/RunManifestTest install-dir maint/manifest-makeinstall-freebsd
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:

./configure CC="cc -m32" CFLAGS="$CFLAGS_SOLARIS_CC" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-errwarn
make
make check
make check || (cat ./test-suite.log; false)

make install "DESTDIR=`pwd`/install-dir"
maint/RunManifestTest install-dir maint/manifest-makeinstall-solaris
Expand All @@ -257,7 +257,7 @@ jobs:

./configure CC="cc -m64" CFLAGS="$CFLAGS_SOLARIS_CC" --enable-jit --enable-pcre2-16 --enable-pcre2-32 --enable-errwarn
make
make check
make check || (cat ./test-suite.log; false)

make install "DESTDIR=`pwd`/install-dir"
maint/RunManifestTest install-dir maint/manifest-makeinstall-solaris
Expand Down
67 changes: 66 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
run: make -j3

- name: Test
run: make check
run: make check || (cat ./test-suite.log; false)

- name: Install
run: |
Expand Down Expand Up @@ -331,6 +331,71 @@ jobs:
shell: msys2 {0}
run: cd build && ctest -j3 --output-on-failure

ptarmigan:
# Tests with various unusual processor architectures
name: Multiarch
strategy:
fail-fast: false
matrix:
include:
# S390x is important, because it's basically the only supported big-endian
# architecture I can find anywhere. I used to work on SPARC and PPC-be systems
# a long time ago, but even Debian has dropped those architectures now, so
# it's nice that there's *least one* arch remaining to shake out endian
# assumptions.
- arch: "s390x"
distro: ubuntu_latest
# Big-iron POWER only (this is not the PowerPC arch used in old Apple Macs)
- arch: "ppc64le"
distro: "ubuntu_latest"
# A 32-bit Linux build. i386 is mostly gone now, so ARMv7 is all that's left.
- arch: "armv7"
distro: "ubuntu_latest"
# The only really widely-deployed non-x86 archicture, at least that's likely
# to be running PCRE2.
- arch: "aarch64"
distro: "ubuntu_latest"
# Not used by anyone yet, really, but potentially the "next big thing".
- arch: "riscv64"
distro: "ubuntu_latest"
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write # Necessary for uraimo/run-on-arch-action to use GitHub's Docker repository as a cache
if: github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

- name: Prepare
run: ./autogen.sh

- uses: uraimo/run-on-arch-action@ac33288c3728ca72563c97b8b88dda5a65a84448 # v2.8.1
name: Configure, build, and test
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}

# Not required, but speeds up builds by storing container images in
# a GitHub package registry.
githubToken: ${{ github.token }}

env: | # YAML, but pipe character is necessary
CFLAGS_GCC_STYLE: ${{ env.CFLAGS_GCC_STYLE }}

install: |
apt-get -qq update
apt-get -qq install -y gcc cmake ninja-build zlib1g-dev libbz2-dev

run: |
set -e
# TODO: Set -DCMAKE_COMPILE_WARNING_AS_ERROR=ON (there's currently a build failure on S390x)
cmake -G Ninja -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON -DPCRE2_DEBUG=ON -DCMAKE_C_FLAGS="$CFLAGS_GCC_STYLE -Wno-format-truncation -Wno-format-overflow" -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -B build
ninja -C build
(cd build && ctest -j3 --output-on-failure)

zebrilus:
# Tests with: Zig compiler
name: Zig
Expand Down
4 changes: 2 additions & 2 deletions src/pcre2_jit_char_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ static PCRE2_SPTR SLJIT_FUNC do_extuni_utf(jit_arguments *args, PCRE2_SPTR cc)
{
PCRE2_SPTR start_subject = args->begin;
PCRE2_SPTR end_subject = args->end;
int lgb, rgb, ricount;
int lgb = 0, rgb, ricount;
PCRE2_SPTR prevcc, endcc, bptr;
BOOL first = TRUE;
BOOL was_ep_ZWJ = FALSE;
Expand Down Expand Up @@ -1569,7 +1569,7 @@ static PCRE2_SPTR SLJIT_FUNC do_extuni_utf_invalid(jit_arguments *args, PCRE2_SP
{
PCRE2_SPTR start_subject = args->begin;
PCRE2_SPTR end_subject = args->end;
int lgb, rgb, ricount;
int lgb = 0, rgb, ricount;
PCRE2_SPTR prevcc, endcc, bptr;
BOOL first = TRUE;
BOOL was_ep_ZWJ = FALSE;
Expand Down
6 changes: 3 additions & 3 deletions src/pcre2_jit_simd_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ if (char1 != char2)

#else /* PCRE2_CODE_UNIT_WIDTH == 32 */

for (int i = 0; i < 2; i++)
for (i = 0; i < 2; i++)
{
replicate_imm_vector(compiler, i, cmp1_ind, char1 | bit, TMP1);

Expand Down Expand Up @@ -1483,7 +1483,7 @@ if (char1 != char2)

#else /* PCRE2_CODE_UNIT_WIDTH == 32 */

for (int i = 0; i < 2; i++)
for (i = 0; i < 2; i++)
{
replicate_imm_vector(compiler, i, cmp1_ind, char1 | bit, TMP3);

Expand Down Expand Up @@ -1699,7 +1699,7 @@ if (char2a != char2b)

#else /* PCRE2_CODE_UNIT_WIDTH == 32 */

for (int i = 0; i < 2; i++)
for (i = 0; i < 2; i++)
{
replicate_imm_vector(compiler, i, cmp1a_ind, char1a | bit1, TMP1);

Expand Down
4 changes: 2 additions & 2 deletions src/pcre2test.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ static modstruct modlist[] = {
{ "null_pattern", MOD_PAT, MOD_CTL, CTL2_NULL_PATTERN, PO(control2) },
{ "null_replacement", MOD_DAT, MOD_CTL, CTL2_NULL_REPLACEMENT, DO(control2) },
{ "null_subject", MOD_DAT, MOD_CTL, CTL2_NULL_SUBJECT, DO(control2) },
{ "offset", MOD_DAT, MOD_INT, 0, DO(offset) },
{ "offset", MOD_DAT, MOD_SIZ, 0, DO(offset) },
{ "offset_limit", MOD_CTM, MOD_SIZ, 0, MO(offset_limit)},
{ "optimization_full", MOD_CTC, MOD_OPTMZ, PCRE2_OPTIMIZATION_FULL, 0 },
{ "optimization_none", MOD_CTC, MOD_OPTMZ, PCRE2_OPTIMIZATION_NONE, 0 },
Expand All @@ -776,7 +776,7 @@ static modstruct modlist[] = {
{ "start_optimize", MOD_CTC, MOD_OPTMZ, PCRE2_START_OPTIMIZE, 0 },
{ "start_optimize_off", MOD_CTC, MOD_OPTMZ, PCRE2_START_OPTIMIZE_OFF, 0 },
{ "startchar", MOD_PND, MOD_CTL, CTL_STARTCHAR, PO(control) },
{ "startoffset", MOD_DAT, MOD_INT, 0, DO(offset) },
{ "startoffset", MOD_DAT, MOD_SIZ, 0, DO(offset) },
{ "subject_literal", MOD_PATP, MOD_CTL, CTL2_SUBJECT_LITERAL, PO(control2) },
{ "substitute_callout", MOD_PND, MOD_CTL, CTL2_SUBSTITUTE_CALLOUT, PO(control2) },
{ "substitute_case_callout", MOD_PND, MOD_CTL, CTL2_SUBSTITUTE_CASE_CALLOUT, PO(control2) },
Expand Down