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.
This commit is contained in:
Daniel Black 2023-07-18 12:58:58 +10:00
parent 3e7561cf35
commit 73c9415e6a

View File

@ -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,