561819aada
- add fix for nouveau with gcc 4.8
32 lines
1017 B
Diff
32 lines
1017 B
Diff
From 482abbfafb56cbceaf5355c026434e638cddd0f1 Mon Sep 17 00:00:00 2001
|
|
From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
|
|
Date: Thu, 7 Nov 2013 13:30:19 +0100
|
|
Subject: [PATCH] nouveau: prevent undefined behavior in nouveau_pushbuf_reloc
|
|
with gcc-4.8
|
|
|
|
Reported-by: ronald645@gmail.com
|
|
Bisected-by (gcc): Andreas Radke <a.radke@arcor.de>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71116
|
|
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
|
|
---
|
|
nouveau/pushbuf.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/nouveau/pushbuf.c b/nouveau/pushbuf.c
|
|
index 0fd0c47..4f77881 100644
|
|
--- a/nouveau/pushbuf.c
|
|
+++ b/nouveau/pushbuf.c
|
|
@@ -739,7 +739,8 @@ void
|
|
nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo,
|
|
uint32_t data, uint32_t flags, uint32_t vor, uint32_t tor)
|
|
{
|
|
- *push->cur++ = pushbuf_krel(push, bo, data, flags, vor, tor);
|
|
+ *push->cur = pushbuf_krel(push, bo, data, flags, vor, tor);
|
|
+ push->cur++;
|
|
}
|
|
|
|
int
|
|
--
|
|
1.8.3.1
|
|
|