[Pkg-ime-devel] brise: change to arch:all?
Guo Yixuan
culu.gyx at gmail.com
Thu May 29 01:09:13 UTC 2014
On Sun, May 25, 2014 at 11:04 PM, Guo Yixuan <culu.gyx at gmail.com> wrote:
> I've built librime and tried to build brise, under sparc. And it just
failed
> with a bus error (SIGBUS), similar to many other architectures.[1]
>
> It appears to be a misaligned access, thus probably a bug in g++.
> (I've tried both g++-4.8 and g++-4.9)
>
> $ gdb rime_deployer
[...]
> Program received signal SIGBUS, Bus error.
> 0xf7e795bc in rime::Table::BuildHeadIndex (this=this at entry=0x37b4c,
vocabulary=..., num_syllables=num_syllables at entry=422)
> at /mnt/sdb2/pkg2/ime/librime/src/dict/table.cc:300
> 300 for (const auto& v : vocabulary) {
> (gdb) x/i $pc
> => 0xf7e795bc <rime::Table::BuildHeadIndex(rime::Vocabulary const&,
unsigned int)+188>: st %i2, [ %l2 + %l1 ]
> (gdb) p/x $l2
> $2 = 0xf1838000
> (gdb) p/x $l1
> $3 = 0xdca
> (gdb) x/i $npc
> 0xf7e795c0 <rime::Table::BuildHeadIndex(rime::Vocabulary const&,
unsigned int)+192>: add %fp, -12, %i2
> (gdb) p $i2
> $4 = 422
>
> Because (%l2 + %l1) % 4 != 0, the instruction
> "st %i2, [ %l2 + %l1 ]" generated a SIGBUS,
>
> arm* and mips* are also RISC with stricter memory
> alignment requirement, so the other FTBFSes could
> be of the same reason.
>
> [1] https://buildd.debian.org/status/package.php?p=brise
I made the wrong guess. In fact, this misaligned access
is intended, to store num_syllables (422 or 0x1a6) to
offset 0xdca in luna_pinyin.table.bin:
on amd64:
$ hd /usr/share/rime-data/luna_pinyin.table.bin
[...]
00000da0 7a 68 75 6e 00 7a 68 75 6f 00 7a 69 00 7a 6f 6e
|zhun.zhuo.zi.zon|
00000db0 67 00 7a 6f 75 00 7a 75 00 7a 75 61 6e 00 7a 75
|g.zou.zu.zuan.zu|
00000dc0 69 00 7a 75 6e 00 7a 75 6f 00 a6 01 00 00 0c 00
|i.zun.zuo.......|
00000dd0 00 00 c4 13 00 00 53 14 00 00 9d 00 00 00 fb 80
|......S.........|
00000de0 00 00 83 88 00 00 88 00 00 00 03 00 01 00 87 06
|................|
[...]
on sparc:
$ hd data/luna_pinyin.table.bin # SIGBUS occured when writing at 0xdca
00000da0 7a 68 75 6e 00 7a 68 75 6f 00 7a 69 00 7a 6f 6e
|zhun.zhuo.zi.zon|
00000db0 67 00 7a 6f 75 00 7a 75 00 7a 75 61 6e 00 7a 75
|g.zou.zu.zuan.zu|
00000dc0 69 00 7a 75 6e 00 7a 75 6f 00 00 00 00 00 00 00
|i.zun.zuo.......|
00000dd0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|................|
*
0296cec0
I'm not sure if there's any easy fix for this problem...
Regards,
Yixuan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-ime-devel/attachments/20140528/3c999b62/attachment-0001.html>
More information about the Pkg-ime-devel
mailing list