Summary: | uim-module-manager segv on IA64 | ||
---|---|---|---|
Product: | UIM | Reporter: | Masahito Omote <omote> |
Component: | libuim: Scheme interpreter | Assignee: | uim-bugs |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | blocker | ||
Priority: | high | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Masahito Omote
2008-06-23 07:43:02 UTC
(In reply to comment #0) > As described above, uim-module-manager segv on IA64. > > Here is the result of gdb backtrace. And full compilation log are avalable at > http://buildd.debian.org/fetch.cgi?&pkg=uim&ver=1%3A1.5.1-1&arch=ia64&stamp=1211829196&file=log Possibly OS and/or GCC version specific issue? I don't see any problem on ia64 (Itanium 2) SUSE Linux (with kernel 2.6.16.27, glibc-2.4, and gcc-4.1). uim 1.5.1 compiles flawlessly on this, and works well in a casual test using uim-fep (with module_names = "tcode" "trycode" "tutcode" "byeoru" "latin" "elatin" "pyload" "hangul" "viqr" "ipa-x-sampa" "look" ). I'll try with GCC-4.3.1 on SUSE ia64 later. OK, that must be realted to GCC 4.3 on IA-64. I can reproduce the segfault with uim 1.5.1 on ia64 SUSE Linux using GCC 4.3.1. (In reply to comment #2) > OK, that must be realted to GCC 4.3 on IA-64. I can reproduce the segfault > with uim 1.5.1 on ia64 SUSE Linux using GCC 4.3.1. And found that compiling uim-scm-sigscheme.c with -O0 instead of -O2 should be a workaround for GCC 4.3 on IA64. Does it work for you, Omote san? (In reply to comment #3) > And found that compiling uim-scm-sigscheme.c with -O0 instead of -O2 should be > a workaround for GCC 4.3 on IA64. Does it work for you, Omote san? Another way to avoid GCC 4.3's optimization problem on IA64 is just assign something in init_buf[] in read_symbol(). For example, following change in sigscheme/src/read.c will stop the segfault even with -O2 using GCC 4.3.1 on SUSE. --- read.c.orig 2008-03-01 23:30:43.000000000 +0900 +++ read.c 2008-06-25 10:50:46.000000000 +0900 @@ -918,6 +918,7 @@ int err; ScmLBuf(char) lbuf; char init_buf[SCM_INITIAL_SYMBOL_BUF_SIZE]; + init_buf[0] = '\0'; CDBG((SCM_DBG_PARSER, "read_symbol")); (In reply to comment #4) > (In reply to comment #3) > > And found that compiling uim-scm-sigscheme.c with -O0 instead of -O2 should be > > a workaround for GCC 4.3 on IA64. Does it work for you, Omote san? > First workaround does not work well on Debian. make -C ../uim uim-module-manager && \ LIBUIM_SYSTEM_SCM_FILES=/home/omote/uim/uim-1.5.1/sigscheme/lib LIBUIM_SCM_FILES=/home/omote/uim/uim-1.5.1/scm LIBUIM_PLUGIN_LIB_DIR=/home/omote/uim/uim-1.5.1/uim/.libs ../uim/uim-module-manager \ --path ../scm --register "skk" "tcode" "trycode" "tutcode" "byeoru" "latin" "elatin" "pyload" "hangul" "viqr" "ipa-x-sampa" "look" make[2]: Entering directory `/home/omote/uim/uim-1.5.1/uim' make[2]: `uim-module-manager' is up to date. make[2]: Leaving directory `/home/omote/uim/uim-1.5.1/uim' lt-uim-module-manager: ../sigscheme/src/storage-gc.c:640: within_heapp: Assertion `!((scm_uintobj_t)(((obj) & ~((((scm_uintobj_t)1 << ((0) + (1))) - ((scm_uintobj_t)1 << (0))) | (((scm_uintobj_t)1 << (((1 + 0)) + (2))) - ((scm_uintobj_t)1 << ((1 + 0))))))) % sizeof(ScmCell))' failed. /bin/sh: line 2: 18010 Aborted LIBUIM_SYSTEM_SCM_FILES=/home/omote/uim/uim-1.5.1/sigscheme/lib LIBUIM_SCM_FILES=/home/omote/uim/uim-1.5.1/scm LIBUIM_PLUGIN_LIB_DIR=/home/omote/uim/uim-1.5.1/uim/.libs ../uim/uim-module-manager --path ../scm --register "skk" "tcode" "trycode" "tutcode" "byeoru" "latin" "elatin" "pyload" "hangul" "viqr" "ipa-x-sampa" "look" make[1]: *** [installed-modules.scm] Error 134 make[1]: Leaving directory `/home/omote/uim/uim-1.5.1/scm' make: *** [all-recursive] Error 1 merulo% > Another way to avoid GCC 4.3's optimization problem on IA64 is just assign > something in init_buf[] in read_symbol(). For example, following change in > sigscheme/src/read.c will stop the segfault even with -O2 using GCC 4.3.1 on > SUSE. > > > --- read.c.orig 2008-03-01 23:30:43.000000000 +0900 > +++ read.c 2008-06-25 10:50:46.000000000 +0900 > @@ -918,6 +918,7 @@ > int err; > ScmLBuf(char) lbuf; > char init_buf[SCM_INITIAL_SYMBOL_BUF_SIZE]; > + init_buf[0] = '\0'; > > CDBG((SCM_DBG_PARSER, "read_symbol")); > This workaround works out well. I take this workaround. Thank you. Cannot reproduce with uim 1.6.0. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.