summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2011-07-18 08:43:59 -0700
committerCode Review <code-review@webmproject.org>2011-07-18 08:43:59 -0700
commit74ad25a4c6224b04cb85256ba0b81a5fc9b03041 (patch)
treec8edf1b08d1deac4c3046d07851004d5229a0b1b
parentda39e505dd99c3cf89a9585e0dfee477f436de37 (diff)
parentb73a3693e581583e9ec676f4396d0c3d173e2462 (diff)
downloadlibvpx-74ad25a4c6224b04cb85256ba0b81a5fc9b03041.tar
libvpx-74ad25a4c6224b04cb85256ba0b81a5fc9b03041.tar.gz
libvpx-74ad25a4c6224b04cb85256ba0b81a5fc9b03041.tar.bz2
libvpx-74ad25a4c6224b04cb85256ba0b81a5fc9b03041.zip
Merge "Disable __longjmp_chk protection"
-rw-r--r--vpx/internal/vpx_codec_internal.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/vpx/internal/vpx_codec_internal.h b/vpx/internal/vpx_codec_internal.h
index a1ff1921e..7cc2c3a62 100644
--- a/vpx/internal/vpx_codec_internal.h
+++ b/vpx/internal/vpx_codec_internal.h
@@ -45,6 +45,7 @@
#define VPX_CODEC_INTERNAL_H
#include "../vpx_decoder.h"
#include "../vpx_encoder.h"
+#include "vpx_config.h"
#include <stdarg.h>
@@ -435,6 +436,23 @@ vpx_codec_pkt_list_get(struct vpx_codec_pkt_list *list,
#include <stdio.h>
#include <setjmp.h>
+
+/* GLIBC started intercepting calls to longjmp in version 2.11, if the
+ * FORTIFY_SOURCE flag is defined (it's defined by default on Ubuntu).
+ * This can cause problems running under older versions of GLIBC (ie,
+ * for binary distributions), so work around it by linking to the
+ * underlying longjmp call directly.
+ */
+#if defined(__GNUC_PREREQ)
+#if __GNUC_PREREQ (2,11)
+#if ARCH_X86_64
+__asm__(".symver __longjmp_chk,longjmp@GLIBC_2.2.5");
+#else
+__asm__(".symver __longjmp_chk,longjmp@GLIBC_2.0");
+#endif
+#endif
+#endif
+
struct vpx_internal_error_info
{
vpx_codec_err_t error_code;