Commit 73c9415e authored by Daniel Black's avatar Daniel Black

MDEV-31727: pcre stack size not functioning on clang-16

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.
parent 3e7561cf
...@@ -513,7 +513,7 @@ Returns: MATCH_MATCH if matched ) these values are >= 0 ...@@ -513,7 +513,7 @@ Returns: MATCH_MATCH if matched ) these values are >= 0
static int static int
match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode, match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb, 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 #endif
static int static int
match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode, match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment