Comments (12)
I need more time to setup the environment for this issue. After reviewing, however, I found that here and here does not comply with alignment rule in Sparc. This two parts will cause bus error in Sparc, and they might be the cause of this issue.
from libchewing.
I could run the test on Sparc environment for you :p
from libchewing.
That's great.
But the current problem is, this issue is difficult to fix due to the following reasons:
- This is related to uhash.dat, so we cannot just change the binary format. And for this issue, changing binary format to align uint16_t requirement is the most easy way to fix.
- Use the save way to read unaligned data in Sparc require knowing endianness of the platform, so we might need to do endianness detection at compiling time or runtime.
from libchewing.
Hi @kanru, please help to test this in Sparc, thanks.
from libchewing.
I can't connect to the sparc box right now.. I'll try again tomorrow.
from libchewing.
I can confirm that 52831f4 builds fine on sparc (debian sid chroot) by executing ./autogen && ./configure && make .
from libchewing.
Did you run the test suite? make check
from libchewing.
Ah sorry, make check failed:
make check-TESTS
make[2]: Entering directory /tmp/buildd/libchewing/test' make[3]: Entering directory
/tmp/buildd/libchewing/test'
../build-aux/test-driver: line 95: 45416 Bus error "$@" > $log_file 2>&1
FAIL: test-bopomofo
../build-aux/test-driver: line 95: 45422 Bus error "$@" > $log_file 2>&1
FAIL: test-config
../build-aux/test-driver: line 95: 45428 Bus error "$@" > $log_file 2>&1
FAIL: test-easy-symbol
PASS: test-fullshape
PASS: test-key2pho
PASS: test-keyboard
PASS: test-mmap
PASS: test-path
../build-aux/test-driver: line 95: 45464 Bus error "$@" > $log_file 2>&1
FAIL: test-reset
../build-aux/test-driver: line 95: 45470 Bus error "$@" > $log_file 2>&1
FAIL: test-regression
PASS: test-symbol
PASS: test-special-symbol
../build-aux/test-driver: line 95: 45488 Bus error "$@" > $log_file 2>&1
FAIL: test-userphrase
PASS: test-utf8
PASS: test-memory-fail
make[4]: Entering directory /tmp/buildd/libchewing/test' make[4]: Nothing to be done for
all'.
make[4]: Leaving directory `/tmp/buildd/libchewing/test'
Testsuite summary for libchewing 0.3.4
TOTAL: 15
PASS: 9
SKIP: 0
XFAIL: 0
FAIL: 6
XPASS: 0
ERROR: 0
See test/test-suite.log
Please report to [email protected]
make[3]: *** [test-suite.log] Error 1
make[3]: Leaving directory /tmp/buildd/libchewing/test' make[2]: *** [check-TESTS] Error 2 make[2]: Leaving directory
/tmp/buildd/libchewing/test'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/tmp/buildd/libchewing/test'
make: *** [check-recursive] Error 1
from libchewing.
Is it possible to get the core dump? I want to know which line cause the bus error.
from libchewing.
Program received signal SIGBUS, Bus error.
Str2Phrase (pgdata=0xf7e10008, phr_ptr=0x38ec0) at dict.c:148
148 phr_ptr->freq = *(int *) pgdata->static_data.dict_cur_pos;
(gdb) bt
#0 Str2Phrase (pgdata=0xf7e10008, phr_ptr=0x38ec0) at dict.c:148
#1 0x00019364 in GetPhraseFirst (pgdata=<optimized out>, phr_ptr=0x38ec0, phone_phr_id=<optimized out>) at dict.c:164
#2 0x0001ad3c in CheckChoose (nSelect=0, selectInterval=<optimized out>, selectStr=<optimized out>, pp_phr=<synthetic pointer>, to=2, from=1,
ph_id=106824, pgdata=0xf7e10008) at tree.c:263
#3 FindInterval (ptd=0xffff5fb8, pgdata=0xf7e10008) at tree.c:396
#4 Phrasing (pgdata=0xf7e10008) at tree.c:979
#5 0x00017500 in CallPhrasing (pgdata=0xf7e10008) at chewingutil.c:808
#6 0x00014e08 in chewing_handle_Default (ctx=<optimized out>, key=52) at chewingio.c:1246
#7 0x000128fc in type_keystroke (param=0xffffd5f0, get_char=0x123a0 <get_char_by_string>, ctx=0x36070) at testhelper.c:228
#8 type_keystroke_by_string (ctx=0x36070, keystroke=0x1fa68 "u6g;4x96<L><L><L>") at testhelper.c:275
#9 0x00010f08 in test_select_candidate_no_phrase_choice_rearward () at test-bopomofo.c:53
#10 0x000111ac in test_select_candidate () at test-bopomofo.c:144
#11 0x00010ce4 in main () at test-bopomofo.c:691
from libchewing.
Too bad we have unaligned memory access in phrase. I need some time to implement this.
from libchewing.
Hi,
Please help to try the following branch, thanks.
https://github.com/czchen/libchewing/tree/sparc
from libchewing.
Related Issues (20)
- Ensure libchewing with rust preset can build with system dependency without using network
- Allow configurable default system dictionary path
- Accept CSV formatted source dictionary
- Tool supports dictionary introspection and dumping
- libChewing on macPorts is not the latest. HOT 1
- Fix remaining FIXMEs then rerun the fuzzer
- 使用上下鍵選字(Use arrow keys to select characters) HOT 6
- Stabilize supported dictionary formats
- Fix Clippy errors and warnings
- Add some more tests for auto-commit
- Prepare for 0.7.0 release
- Redesign key mapping and event handling API
- When space key as selection and English mode both are enabled, space key should insert space
- 簡易符號輸入字元可以增加超過10個字元 HOT 1
- 希望選字選單可以依照常用字排序 HOT 2
- 實驗使用 trie dictionary + log 來取代 cdb/sqlite 格式的使用者詞庫
- 無法選擇第二頁之後的詞
- Include more IO methods in the fuzzing harness
- Refactor Error handling
- ubuntu 的全形半形轉換 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libchewing.