tags 674471 + patch
thanks

Osamu Aoki <os...@debian.org> writes:

> This package does not build on armel which is release architecture
> (and sparc).
>
> https://buildd.debian.org/status/fetch.php?pkg=libskk&arch=armel&ver=0.0.12-1&stamp=1333795311
>
>
> **
> ERROR:cdb-dict.c:23:cdb_dict: assertion failed (len == 2): (0 == 2)
> /bin/bash: line 5: 27443 Aborted G_DEBUG=gc-friendly
> G_SLICE=,always-malloc LIBSKK_DATA_PATH=.. /bin/bash ../libtool
> --mode=execute ${dir}$tst
> /libskk/cdb-dict: FAIL: cdb-dict
> ...
> ==================================
> 1 of 8 tests failed

Thanks.  It seems to be an ARM alignment issue (patch attached).  I'll
upload a new package soon.

>From fbbea6190782da447caddc903cbc31a0d8676f38 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <u...@unixuser.org>
Date: Fri, 25 May 2012 11:19:43 +0900
Subject: [PATCH] cdb: make sure that integer does not stride across 4-byte
 alignments

Fixes Debian bug#674471.
---
 libskk/cdb-dict.vala |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libskk/cdb-dict.vala b/libskk/cdb-dict.vala
index a5a49fa..db2c99b 100644
--- a/libskk/cdb-dict.vala
+++ b/libskk/cdb-dict.vala
@@ -51,7 +51,10 @@ namespace Skk {
         }
 
         static uint32 read_uint32 (uint8 *p) {
-            return uint32.from_little_endian (*((uint32 *) p));
+            // Make sure that Q does not stride across 4-byte
+            // alignment on ARM (Debian bug#674471).
+            uint8 q[4] = (uint8[]) p;
+            return uint32.from_little_endian (*((uint32 *) q));
         }
 
         /**
-- 
1.7.10.1

Regards,
-- 
Daiki Ueno

Reply via email to