Skip to content

Commit

Permalink
MDEV-31727: pcre stack size not functioning on clang-16
Browse files Browse the repository at this point in the history
noinline attribute was being ignored by clang-16 and reporting
32 stack size on Gentoo, 16 locally on Fedora 38.

Based on https://stackoverflow.com/questions/54481855/clang-ignoring-attribute-noinline
appended noopt in addition to the gcc recognised attributes.

After that the -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0)
returned 1056, simlar to gcc.

From https://bugs.gentoo.org/910188.

Thanks Zhixu Liu for the great bug report.
  • Loading branch information
grooverdan committed Jul 21, 2023
1 parent 3e7561c commit 73c9415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pcre/pcre_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ Returns: MATCH_MATCH if matched ) these values are >= 0
static int
match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
unsigned int rdepth) __attribute__((noinline,noclone));
unsigned int rdepth) __attribute__((optnone,noinline,noclone));
#endif
static int
match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
Expand Down

0 comments on commit 73c9415

Please sign in to comment.