diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index f8e538ca4..7b6a10785 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -68,7 +68,7 @@ jobs: run: ./pcre2posix_test -v bat: - name: MSVC + name: 32bit MSVC runs-on: windows-latest steps: - name: Checkout @@ -89,6 +89,28 @@ jobs: ctest -C Debug . type Testing\Temporary\LastTest.log + pterodactyl: + name: 64bit MSVC + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Configure + run: cmake -DPCRE2_SUPPORT_JIT=ON -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_DEBUG=ON -DCMAKE_VERBOSE_MAKEFILE=ON -B build + + - name: Build + run: cmake --build build + + - name: Test + shell: cmd + run: | + cd build + ctest -C Debug . + type Testing\Temporary\LastTest.log + bigbird: name: manyconfig runs-on: ubuntu-latest diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 3491c4122..69abae1b1 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -43,7 +43,7 @@ jobs: # Upload the results as artifacts (optional). - name: "Upload artifact" - uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2.3.1 + uses: actions/upload-artifact@v4 with: name: SARIF file path: results.sarif diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c index 48dae18fa..7c7967c04 100644 --- a/src/pcre2_compile.c +++ b/src/pcre2_compile.c @@ -8774,10 +8774,10 @@ for (;;) { if (lengthptr == NULL) { - PCRE2_SIZE branch_length = code - last_branch; + uint32_t branch_length = (uint32_t)(code - last_branch); do { - PCRE2_SIZE prev_length = GET(last_branch, 1); + uint32_t prev_length = GET(last_branch, 1); PUT(last_branch, 1, branch_length); branch_length = prev_length; last_branch -= branch_length; @@ -10986,7 +10986,7 @@ if (errorcode == 0 && cb.had_recurse) } } - PUT(rcode, 1, rgroup - codestart); + PUT(rcode, 1, (uint32_t)(rgroup - codestart)); } } diff --git a/src/pcre2_intmodedep.h b/src/pcre2_intmodedep.h index a798cdd4f..27e64e6b6 100644 --- a/src/pcre2_intmodedep.h +++ b/src/pcre2_intmodedep.h @@ -106,7 +106,7 @@ values of 3 or 4 are also supported. */ (a[n] = (PCRE2_UCHAR)((d) >> 8)), \ (a[(n)+1] = (PCRE2_UCHAR)((d) & 255)) #define GET(a,n) \ - (unsigned int)(((a)[n] << 8) | (a)[(n)+1]) + (uint32_t)(((a)[n] << 8) | (a)[(n)+1]) #define MAX_PATTERN_SIZE (1 << 16) #elif LINK_SIZE == 3 @@ -115,7 +115,7 @@ values of 3 or 4 are also supported. */ (a[(n)+1] = (PCRE2_UCHAR)((d) >> 8)), \ (a[(n)+2] = (PCRE2_UCHAR)((d) & 255)) #define GET(a,n) \ - (unsigned int)(((a)[n] << 16) | ((a)[(n)+1] << 8) | (a)[(n)+2]) + (uint32_t)(((a)[n] << 16) | ((a)[(n)+1] << 8) | (a)[(n)+2]) #define MAX_PATTERN_SIZE (1 << 24) #elif LINK_SIZE == 4 @@ -125,7 +125,7 @@ values of 3 or 4 are also supported. */ (a[(n)+2] = (PCRE2_UCHAR)((d) >> 8)), \ (a[(n)+3] = (PCRE2_UCHAR)((d) & 255)) #define GET(a,n) \ - (unsigned int)(((a)[n] << 24) | ((a)[(n)+1] << 16) | ((a)[(n)+2] << 8) | (a)[(n)+3]) + (uint32_t)(((a)[n] << 24) | ((a)[(n)+1] << 16) | ((a)[(n)+2] << 8) | (a)[(n)+3]) #define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */ #else