[pcre-dev] [Bug 1642] Tests fail due to stack space being li…

Pàgina inicial
Delete this message
Autor: admin
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 1642] Tests fail due to stack space being limited to 16 M
https://bugs.exim.org/show_bug.cgi?id=1642

--- Comment #8 from Elliot Saba <staticfloat@???> ---
Putting __attribute__((noinline)) on line 579 between the "static int" and
"match(REGISTER..." doesn't change anything.

My ./configure invocation looks like this (stripping out the --prefix and
--libdir stuff):

$ ./configure --build=x86_64-apple-darwin14.3.0 F77="gfortran
-mmacosx-version-min=10.7 -m64" CC="clang -stdlib=libc++
-mmacosx-version-min=10.7 -m64 " CXX="clang++ -stdlib=libc++
-mmacosx-version-min=10.7 -m64 " --enable-jit


The compile line coming out of my setup when running `make V=1` is such:

./libtool --tag=CC --mode=compile clang -stdlib=libc++
-mmacosx-version-min=10.7 -m64 -DHAVE_CONFIG_H -I. -I./src -I./src -I./src
-DPCRE2_CODE_UNIT_WIDTH=8 -fvisibility=hidden -D_THREAD_SAFE -pthread
-I/Users/sabae/local/include -I/usr/local/include -MT
src/libpcre2_8_la-pcre2_compile.lo -MD -MP -MF
src/.deps/libpcre2_8_la-pcre2_compile.Tpo -c -o
src/libpcre2_8_la-pcre2_compile.lo `test -f 'src/pcre2_compile.c'


If I add "-O3" to the compile flags, I get something much more reasonable and
the tests pass!

(lldb) disassemble -n match -c 10
libpcre2-8.0.dylib`match:
0x100065610: pushq %rbp
0x100065611: movq %rsp, %rbp
0x100065614: pushq %r15
0x100065616: pushq %r14
0x100065618: pushq %r13
0x10006561a: pushq %r12
0x10006561c: pushq %rbx
0x10006561d: subq $0x1d8, %rsp


So that's only 528 bytes. With these settings, the tests pass just fine.
Should that be the "official" solution, or is my patch still valuable? I will
admit, it is slightly annoying that there is a seemingly innocuous set of
compiler options (no optimization flags present) that will cause the test suite
to fail.

--
You are receiving this mail because:
You are on the CC list for the bug.