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

PCRE 10.39, gcc, SPARC LP64 mode fails w/ SLJIT_COMPILE_ASSERT(sizeof (PCRE2_SIZE) <= sizeof (sljit_sw), pcre2_size_must_be_lower_than_sljit_sw_size) #152

Closed
nbriggs opened this issue Oct 14, 2022 · 1 comment

Comments

@nbriggs
Copy link

nbriggs commented Oct 14, 2022

In file included from /tmp/php-8.1.11/ext/pcre/pcre2lib/sljit/sljitLir.h:83,
                 from /tmp/php-8.1.11/ext/pcre/pcre2lib/sljit/sljitLir.c:27,
                 from /tmp/php-8.1.11/ext/pcre/pcre2lib/pcre2_jit_compile.c:79:
/tmp/php-8.1.11/ext/pcre/pcre2lib/pcre2_jit_compile.c: In function ‘do_callout’:
/tmp/php-8.1.11/ext/pcre/pcre2lib/sljit/sljitConfigInternal.h:831:29: error: duplicate case value
  831 |         switch(0) { case 0: case ((x) ? 1 : 0): break; }
      |                             ^~~~
/tmp/php-8.1.11/ext/pcre/pcre2lib/pcre2_jit_compile.c:9470:1: note: in expansion of macro ‘SLJIT_COMPILE_ASSERT’
 9470 | SLJIT_COMPILE_ASSERT(sizeof (PCRE2_SIZE) <= sizeof (sljit_sw), pcre2_size_must_be_lower_than_sljit_sw_size);
      | ^~~~~~~~~~~~~~~~~~~~
/tmp/php-8.1.11/ext/pcre/pcre2lib/sljit/sljitConfigInternal.h:831:21: note: previously used here
  831 |         switch(0) { case 0: case ((x) ? 1 : 0): break; }
      |                     ^~~~
/tmp/php-8.1.11/ext/pcre/pcre2lib/pcre2_jit_compile.c:9470:1: note: in expansion of macro ‘SLJIT_COMPILE_ASSERT’
 9470 | SLJIT_COMPILE_ASSERT(sizeof (PCRE2_SIZE) <= sizeof (sljit_sw), pcre2_size_must_be_lower_than_sljit_sw_size);
      | ^~~~~~~~~~~~~~~~~~~~

If one completes the missing pattern for 64 bit SPARC in the same way the MIPS 64-bit is configured, it turns out that it depends on sljitNativeSPARC_64.c which is missing from the release.

The gcc predefined macros are attached.
gcc-predefined-macros.txt

@zherczeg
Copy link
Collaborator

Sparc support has never completed, so I decided to remove it. So the next release will not have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants