Bug#636673: xorg-server: sh4: FTBFS: ERROR:../../test/input.c:1218:dix_valuator_alloc: assertion failed: (((void*)v->axisVal - (void*)v) % sizeof(double) == 0)
Source: xorg-server
Version: 2:1.10.2.902-1
Severity: wishlist
Tags: patch
User: debian-sh4@superh.org
Usertags: sh4
X-Debbugs-CC: debian-superh@lists.debian.org
Hi,
xorg-server FTBFS on sh4.
Because SH is not aligned at size of double.
When structure has double value, It is aligned in 4byte (long).
-----
/dix/input/valuator-masks: OK
/dix/input/attributes: OK
/dix/input/init-valuators: OK
[dix] EventToCore: Not implemented yet
[dix] EventToCore: Not implemented yet
[dix] EventToCore: Not implemented yet
/dix/input/event-core-conversion: OK
/dix/input/event-xi1-conversion: OK
/dix/input/check-grab-values: OK
/dix/input/xi2-struct-sizes: OK
/dix/input/grab_matching: OK
/dix/input/valuator_mode: OK
/include/byte_padding_macros: OK
**
ERROR:../../test/input.c:1218:dix_valuator_alloc: assertion failed:
(((void*)v->axisVal - (void*)v) % sizeof(double) == 0)
/bin/sh: line 5: 613 Aborted ${dir}$tst
/include/bit_test_macros: OK
/Xi/xiproperty/register-unregister: OK
/dix/input/valuator-alloc: FAIL: input
/dix/xtest/init: OK
/dix/xtest/properties: OK
PASS: xtest
========================================================================
1 of 3 tests failed
Please report to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
========================================================================
-----
I made a patch which revised this problem. Could you apply this patch?
Best regards,
Nobuhiro
--
Nobuhiro Iwamatsu
iwamatsu at {nigauri.org / debian.org}
GPG ID: 40AD1FA6
diff --git a/test/input.c b/test/input.c
index 4c80fcc..90639a2 100644
--- a/test/input.c
+++ b/test/input.c
@@ -1213,7 +1213,7 @@ static void dix_valuator_alloc(void)
g_assert(v);
g_assert(v->numAxes == num_axes);
-#ifndef __i386__
+#if !defined(__i386__) && !defined(__sh__)
/* must be double-aligned on 64 bit */
g_assert(((void*)v->axisVal - (void*)v) % sizeof(double) == 0);
g_assert(((void*)v->axes - (void*)v) % sizeof(double) == 0);
Reply to: