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)
- First letter flies to front of line in pinyin HOT 9
- Prepare release v0.8.5
- 拼音模式應直接輸出非拼音符號 HOT 2
- Emoji 關聯詞輸入
- Linking fails with missing `chewing_version*` symbols on Arch Linux HOT 2
- Design callback based API
- Prepare 0.9.0-rc.1
- Define compile time version macros
- Disable notifications output on input mode switch
- Add option to use Shift key to toggle english/chinese mode
- Simple mode show open candidate window by default
- Automatically freeze preedit to selection
- Prepare 0.9.0-rc.2
- Ship compat headers chewingio.h and others
- New APIs for remappable keybindings
- Prepare 0.9.0-rc.3
- New APIs to manage dynamic dictionaries
- Release 0.9.0
- v0.9.0 is not ABI compatible due to symbol versioning HOT 1
- Add option to use Shift key to move cursor when typing in buffer
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.