[beignet] 03/09: Fix a printf bug (upstream 90472)

Rebecca Palmer rnpalmer-guest at moszumanska.debian.org
Thu Nov 12 22:23:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

rnpalmer-guest pushed a commit to branch master
in repository beignet.

commit 0f513643be2323514c56806a3c21e83060cd1881
Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
Date:   Mon Nov 9 22:02:29 2015 +0000

    Fix a printf bug (upstream 90472)
---
 debian/changelog                      |  1 +
 debian/patches/printf-fix-90472.patch | 24 ++++++++++++++++++++++++
 debian/patches/series                 |  1 +
 3 files changed, 26 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b3aa4a6..7f3f610 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ beignet (1.1.1-2) UNRELEASED; urgency=medium
 
   * Add patches to support LLVM 3.6/3.7,
     use system default version. (Closes: #803643)
+  * Fix a printf bug.
 
  -- Rebecca N. Palmer <rebecca_palmer at zoho.com>  Mon, 09 Nov 2015 21:47:04 +0000
 
diff --git a/debian/patches/printf-fix-90472.patch b/debian/patches/printf-fix-90472.patch
new file mode 100644
index 0000000..63d09a3
--- /dev/null
+++ b/debian/patches/printf-fix-90472.patch
@@ -0,0 +1,24 @@
+Description: reset the variables in printf_parser to NULL.
+
+the PrintfParser variables g1Xg2Xg3 and wg_offset should be reinit
+after the builder is deleted, or else the variables will be freed and
+caused memory leak or crash
+
+Author: Luo Xionghu <xionghu.luo at intel.com>
+Origin: upstream http://cgit.freedesktop.org/beignet/commit/?id=dcc189bed5b395d6fbcdffa29e60e68cf1071310
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=90472
+
+diff --git a/backend/src/llvm/llvm_printf_parser.cpp b/backend/src/llvm/llvm_printf_parser.cpp
+index 1e8427c..bdaed8a 100644
+--- a/backend/src/llvm/llvm_printf_parser.cpp
++++ b/backend/src/llvm/llvm_printf_parser.cpp
+@@ -723,6 +723,8 @@ error:
+ 
+     deadprintfs.clear();
+     delete builder;
++    g1Xg2Xg3 = NULL;
++    wg_offset = NULL;
+ 
+     return changed;
+   }
+
diff --git a/debian/patches/series b/debian/patches/series
index 0e79d06..d1ed421 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ update-docs.patch
 allow-+-in-directory.patch
 llvm-36-convert-bug.patch
 llvm-37-support.patch
+printf-fix-90472.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/beignet.git



More information about the Pkg-opencl-commits mailing list