Add patch backport
This commit is contained in:
parent
747aa5e45f
commit
cd2c60fe2b
@ -0,0 +1,40 @@
|
|||||||
|
From 7c00ed22d9b5c33f5b33221e906946b11a9bde3b Mon Sep 17 00:00:00 2001
|
||||||
|
From: DreamNik <dreamnik@mail.ru>
|
||||||
|
Date: Sun, 29 Sep 2013 10:45:58 +0000
|
||||||
|
Subject: make_and_run_test_nodes: avoid undefined behaviour
|
||||||
|
|
||||||
|
In code that looks like n[i] = v(&i), where v increments i, C leaves it
|
||||||
|
undefined whether the old or new value of i is used to locate n[i].
|
||||||
|
As it happens, gcc used the pre-increment value of i, but MSVC
|
||||||
|
used the post-increment value.
|
||||||
|
|
||||||
|
Fix this by inserting a sequence point to disambiguate the intended order.
|
||||||
|
|
||||||
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69924
|
||||||
|
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
|
||||||
|
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
||||||
|
[wrote commit message, fixed whitespace -smcv]
|
||||||
|
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
||||||
|
---
|
||||||
|
diff --git a/dbus/dbus-marshal-recursive-util.c b/dbus/dbus-marshal-recursive-util.c
|
||||||
|
index 9512414..a2aaaf9 100644
|
||||||
|
--- a/dbus/dbus-marshal-recursive-util.c
|
||||||
|
+++ b/dbus/dbus-marshal-recursive-util.c
|
||||||
|
@@ -1785,10 +1785,13 @@ make_and_run_test_nodes (void)
|
||||||
|
start_next_test ("All values in one big toplevel %d iteration\n", 1);
|
||||||
|
{
|
||||||
|
TestTypeNode *nodes[N_VALUES];
|
||||||
|
+ TestTypeNode *node;
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
- while ((nodes[i] = value_generator (&i)))
|
||||||
|
- ;
|
||||||
|
+ while ((node = value_generator (&i)))
|
||||||
|
+ {
|
||||||
|
+ nodes[i - 1] = node;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
run_test_nodes (nodes, N_VALUES);
|
||||||
|
|
||||||
|
--
|
||||||
|
cgit v0.9.0.2-2-gbebe
|
@ -51,6 +51,7 @@ BuildRequires: /usr/bin/Xvfb
|
|||||||
# FIXME this should be upstreamed; need --daemon-bindir=/bin and --bindir=/usr/bin or something?
|
# FIXME this should be upstreamed; need --daemon-bindir=/bin and --bindir=/usr/bin or something?
|
||||||
Patch0: bindir.patch
|
Patch0: bindir.patch
|
||||||
Patch1: 0001-name-test-Don-t-run-test-autolaunch-if-we-don-t-have.patch
|
Patch1: 0001-name-test-Don-t-run-test-autolaunch-if-we-don-t-have.patch
|
||||||
|
Patch2: avoid-undefined-7c00ed22d9b5c33f5b33221e906946b11a9bde3b.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
D-BUS is a system for sending messages between applications. It is
|
D-BUS is a system for sending messages between applications. It is
|
||||||
@ -101,6 +102,7 @@ in this separate package so server systems need not install X.
|
|||||||
|
|
||||||
%patch0 -p1 -b .bindir
|
%patch0 -p1 -b .bindir
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
if test -f autogen.sh; then env NOCONFIGURE=1 ./autogen.sh; else autoreconf -v -f -i; fi
|
if test -f autogen.sh; then env NOCONFIGURE=1 ./autogen.sh; else autoreconf -v -f -i; fi
|
||||||
@ -246,6 +248,8 @@ fi
|
|||||||
%changelog
|
%changelog
|
||||||
* Mon Nov 11 2013 Colin Walters <walters@verbum.org> - 1:1.6.18-1
|
* Mon Nov 11 2013 Colin Walters <walters@verbum.org> - 1:1.6.18-1
|
||||||
- New upstream version
|
- New upstream version
|
||||||
|
- Added backported patch which should fix the test suite; thanks to
|
||||||
|
Yanko Kaneti for the suggestion.
|
||||||
|
|
||||||
* Wed Jul 24 2013 Colin Walters <walters@verbum.org> - 1:1.6.12-4
|
* Wed Jul 24 2013 Colin Walters <walters@verbum.org> - 1:1.6.12-4
|
||||||
- Add patch to fix test-marshal on s390.
|
- Add patch to fix test-marshal on s390.
|
||||||
|
Loading…
Reference in New Issue
Block a user