summaryrefslogtreecommitdiffstats
path: root/third_party/instrumented_libraries
diff options
context:
space:
mode:
authorearthdok <earthdok@chromium.org>2014-12-01 13:11:07 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-01 21:11:23 +0000
commit6b0dcfd9761235e93b45fa9ee9d90474c12adb11 (patch)
tree44343350be036c7209db892f1df1cbf75fecf677 /third_party/instrumented_libraries
parentd7777f96f98668918102861a262b311ae8c8bd74 (diff)
downloadchromium_src-6b0dcfd9761235e93b45fa9ee9d90474c12adb11.zip
chromium_src-6b0dcfd9761235e93b45fa9ee9d90474c12adb11.tar.gz
chromium_src-6b0dcfd9761235e93b45fa9ee9d90474c12adb11.tar.bz2
Instrumented libraries: add libva1 for ChromeOS.
BUG=419367 TBR=glider@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/768223002 Cr-Commit-Position: refs/heads/master@{#306251}
Diffstat (limited to 'third_party/instrumented_libraries')
-rw-r--r--third_party/instrumented_libraries/instrumented_libraries.gyp10
-rw-r--r--third_party/instrumented_libraries/patches/libva1.diff22
-rwxr-xr-xthird_party/instrumented_libraries/scripts/libva1.sh11
3 files changed, 43 insertions, 0 deletions
diff --git a/third_party/instrumented_libraries/instrumented_libraries.gyp b/third_party/instrumented_libraries/instrumented_libraries.gyp
index 608caf0..339565e 100644
--- a/third_party/instrumented_libraries/instrumented_libraries.gyp
+++ b/third_party/instrumented_libraries/instrumented_libraries.gyp
@@ -159,6 +159,7 @@
['chromeos==1', {
'dependencies': [
'<(_sanitizer_type)-brltty',
+ '<(_sanitizer_type)-libva1',
],
}]
],
@@ -693,5 +694,14 @@
'dependencies=': [],
'includes': ['standard_instrumented_package_target.gypi'],
},
+ {
+ 'package_name': 'libva1',
+ 'dependencies=': [],
+ # Backport a use-after-free fix:
+ # http://cgit.freedesktop.org/libva/diff/va/va.c?h=staging&id=d4988142a3f2256e38c5c5cdcdfc1b4f5f3c1ea9
+ 'patch': 'patches/libva1.diff',
+ 'run_before_build': 'scripts/libva1.sh',
+ 'includes': ['standard_instrumented_package_target.gypi'],
+ },
],
}
diff --git a/third_party/instrumented_libraries/patches/libva1.diff b/third_party/instrumented_libraries/patches/libva1.diff
new file mode 100644
index 0000000..2e4ca73
--- /dev/null
+++ b/third_party/instrumented_libraries/patches/libva1.diff
@@ -0,0 +1,22 @@
+diff --git a/va/va.c b/va/va.c
+index 6cb17ef..0ba595b 100644
+--- a/va/va.c
++++ b/va/va.c
+@@ -515,15 +515,15 @@ VAStatus vaTerminate (
+ free(old_ctx->vtable_vpp);
+ old_ctx->vtable_vpp = NULL;
+
+- if (VA_STATUS_SUCCESS == vaStatus)
+- pDisplayContext->vaDestroy(pDisplayContext);
+-
+ VA_TRACE_LOG(va_TraceTerminate, dpy);
+
+ va_TraceEnd(dpy);
+
+ va_FoolEnd(dpy);
+
++ if (VA_STATUS_SUCCESS == vaStatus)
++ pDisplayContext->vaDestroy(pDisplayContext);
++
+ return vaStatus;
+ }
diff --git a/third_party/instrumented_libraries/scripts/libva1.sh b/third_party/instrumented_libraries/scripts/libva1.sh
new file mode 100755
index 0000000..d28002a
--- /dev/null
+++ b/third_party/instrumented_libraries/scripts/libva1.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This script does some preparations before build of instrumented libva1.
+
+# autogen is only required on Precise.
+NOCONFIGURE=1 ./autogen.sh
+
+sed -i "s|-no-undefined -Wl,--no-undefined||g" dummy_drv_video/Makefile.in