Giter Club home page Giter Club logo

Comments (12)

czchen avatar czchen commented on June 12, 2024

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.

kanru avatar kanru commented on June 12, 2024

I could run the test on Sparc environment for you :p

from libchewing.

czchen avatar czchen commented on June 12, 2024

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.

czchen avatar czchen commented on June 12, 2024

Hi @kanru, please help to test this in Sparc, thanks.

from libchewing.

kanru avatar kanru commented on June 12, 2024

I can't connect to the sparc box right now.. I'll try again tomorrow.

from libchewing.

happyaron avatar happyaron commented on June 12, 2024

I can confirm that 52831f4 builds fine on sparc (debian sid chroot) by executing ./autogen && ./configure && make .

from libchewing.

kanru avatar kanru commented on June 12, 2024

Did you run the test suite? make check

from libchewing.

happyaron avatar happyaron commented on June 12, 2024

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 forall'.

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.

czchen avatar czchen commented on June 12, 2024

Is it possible to get the core dump? I want to know which line cause the bus error.

from libchewing.

kanru avatar kanru commented on June 12, 2024
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.

czchen avatar czchen commented on June 12, 2024

Too bad we have unaligned memory access in phrase. I need some time to implement this.

from libchewing.

czchen avatar czchen commented on June 12, 2024

Hi,

Please help to try the following branch, thanks.

https://github.com/czchen/libchewing/tree/sparc

from libchewing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.