Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add very basic 64bit Windows DEV job #480

Merged
merged 1 commit into from
Sep 18, 2024
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
24 changes: 23 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
run: ./pcre2posix_test -v

bat:
name: MSVC
name: 32bit MSVC
runs-on: windows-latest
steps:
- name: Checkout
Expand All @@ -89,6 +89,28 @@ jobs:
ctest -C Debug .
type Testing\Temporary\LastTest.log

pterodactyl:
name: MSVC
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Configure
run: cmake -DPCRE2_BUILD_PCRE2_16=ON -DPCRE2_BUILD_PCRE2_32=ON -DPCRE2_DEBUG=ON -DPCRE2_BUILD_PCRE2GREP=OFF -DPCRE2_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF -DCMAKE_COMPILE_WARNING_AS_ERROR=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
Expand Down
8 changes: 4 additions & 4 deletions src/pcre2_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -8794,10 +8794,10 @@ for (;;)
{
if (lengthptr == NULL)
{
PCRE2_SIZE branch_length = code - last_branch;
uint32_t branch_length = (uint32_t)(code - last_branch);
carenas marked this conversation as resolved.
Show resolved Hide resolved
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;
Expand All @@ -8808,7 +8808,7 @@ for (;;)
/* Fill in the ket */

*code = OP_KET;
PUT(code, 1, (int)(code - start_bracket));
PUT(code, 1, (uint32_t)(code - start_bracket));
code += 1 + LINK_SIZE;

/* Set values to pass back */
Expand Down Expand Up @@ -11006,7 +11006,7 @@ if (errorcode == 0 && cb.had_recurse)
}
}

PUT(rcode, 1, rgroup - codestart);
PUT(rcode, 1, (uint32_t)(rgroup - codestart));
}
}

Expand Down
11 changes: 5 additions & 6 deletions src/pcre2test.c
Original file line number Diff line number Diff line change
Expand Up @@ -5071,15 +5071,14 @@ switch(cmd)
{
while (isspace(*argptr)) argptr++;
if (*argptr == 0) break;
for (i = 1; i < sizeof(newlines)/sizeof(char *); i++)
for (uint16_t j = 1; j < sizeof(newlines)/sizeof(char *); j++)
carenas marked this conversation as resolved.
Show resolved Hide resolved
{
size_t nlen = strlen(newlines[i]);
if (strncmpic(argptr, (const uint8_t *)newlines[i], nlen) == 0 &&
size_t nlen = strlen(newlines[j]);
if (strncmpic(argptr, (const uint8_t *)newlines[j], nlen) == 0 &&
isspace(argptr[nlen]))
{
if (i == NEWLINE_DEFAULT) return PR_OK; /* Default is valid */
PCRE2_ASSERT(i <= UINT16_MAX);
if (first_listed_newline == 0) first_listed_newline = (uint16_t)i;
if (j == NEWLINE_DEFAULT) return PR_OK; /* Default is valid */
if (first_listed_newline == 0) first_listed_newline = j;
}
}
while (*argptr != 0 && !isspace(*argptr)) argptr++;
Expand Down
Loading