Commit ea7344da authored by Geoff Simmons's avatar Geoff Simmons

add the configure option to enable the stack protector (on by default)

parent c787c253
......@@ -69,6 +69,19 @@ AC_PATH_PROG([VARNISHTEST], [varnishtest], [],
AC_PATH_PROG([VARNISHD], [varnishd], [],
[$LIBVARNISHAPI_SBINDIR:$LIBVARNISHAPI_BINDIR:$PATH])
# --enable-stack-protector
AC_ARG_ENABLE(stack-protector,
AS_HELP_STRING([--enable-stack-protector],[enable stack protector (default is YES)]),
[],
[enable_stack_protector=yes])
if test "x$enable_stack_protector" != "xno"; then
AX_CHECK_COMPILE_FLAG([-fstack-protector],
AX_CHECK_LINK_FLAG([-fstack-protector],
[CFLAGS="${CFLAGS} -fstack-protector"], [], []),
[], [])
fi
AC_CONFIG_FILES([
Makefile
src/Makefile
......
......@@ -297,17 +297,18 @@ The VMOD allocates memory in various ways for new blobs and
strings. The ``blob`` object and its methods allocate memory from the
heap, and hence they are only limited by available virtual memory.
The ``encode()`` and ``decode()`` functions allocate Varnish
workspace. If these functions are failing, as indicated by "out of
space" messages in the Varnish log (with the ``VCL_Error`` tag), then
you will need to increase the varnishd parameters ``workspace_client``
and/or ``workspace_backend``.
The ``transcode()`` function also allocates workspace for the string
that it returns, and it allocates space on the stack for a temporary
BLOB. If this function causes stack overflow, you may need to increase
the stack size for the varnishd process, for example with ``ulimit
-s``.
The ``encode()``, ``decode()`` and ``transcode()`` functions allocate
Varnish workspace. If these functions are failing, as indicated by
"out of space" messages in the Varnish log (with the ``VCL_Error``
tag), then you will need to increase the varnishd parameters
``workspace_client`` and/or ``workspace_backend``.
The ``transcode()`` function also allocates space on the stack for a
temporary BLOB. If this function causes stack overflow, you may need
to increase the stack size for the varnishd process, for example with
``ulimit -s``. By default, the VMOD is built with the stack protector
enabled (compile option ``-fstack-protector``), but it can be disabled
with the ``./configure`` option ``--disable-stack-protector``.
AUTHORS
=======
......
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