Bug 26950 - Assertion failure in sigscheme/src/storage-gc.c on amd64 linux
Summary: Assertion failure in sigscheme/src/storage-gc.c on amd64 linux
Status: RESOLVED FIXED
Alias: None
Product: UIM
Classification: Unclassified
Component: libuim: Scheme interpreter (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: uim-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-08 03:07 UTC by Jae-hyeon Park
Modified: 2010-03-09 20:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jae-hyeon Park 2010-03-08 03:07:48 UTC
Giving the --enable-debug option to configure causes an assertion failure in lt-uim-module-manager during compilation.  The workarounds in the report of #16477 do not work, i.e. assertion fails even if I replace all the -O2 options by -O0 and insert the line "init_buf[0] = '\0';" to sigscheme/src/read.c.  The error occurs for r6235 as well as for version 1.5.7.


How to reproduce:


Unpack uim-1.5.7.tar.bz2
$ ./configure --enable-debug
$ make
[...]
Making all in scm
make[1]: Entering directory `/home/jhpark/pro/uim/deb/uim-1.5.7/scm'
make  -C ../uim uim-module-manager && \
	LIBUIM_SYSTEM_SCM_FILES=/home/jhpark/pro/uim/deb/uim-1.5.7/sigscheme/lib LIBUIM_SCM_FILES=/home/jhpark/pro/uim/deb/uim-1.5.7/scm LIBUIM_PLUGIN_LIB_DIR=/home/jhpark/pro/uim/deb/uim-1.5.7/uim/.libs UIM_DISABLE_NOTIFY=1 ../uim/uim-module-manager \
	    --path ../scm --register "anthy"       "skk" "tcode" "trycode" "tutcode" "byeoru" "latin" "elatin"  "pyload" "hangul" "viqr" "ipa-x-sampa" "look" 
make[2]: Entering directory `/home/jhpark/pro/uim/deb/uim-1.5.7/uim'
make[2]: Leaving directory `/home/jhpark/pro/uim/deb/uim-1.5.7/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/bash: line 2: 17144 Aborted                 LIBUIM_SYSTEM_SCM_FILES=/home/jhpark/pro/uim/deb/uim-1.5.7/sigscheme/lib LIBUIM_SCM_FILES=/home/jhpark/pro/uim/deb/uim-1.5.7/scm LIBUIM_PLUGIN_LIB_DIR=/home/jhpark/pro/uim/deb/uim-1.5.7/uim/.libs UIM_DISABLE_NOTIFY=1 ../uim/uim-module-manager --path ../scm --register "anthy" "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/jhpark/pro/uim/deb/uim-1.5.7/scm'
make: *** [all-recursive] Error 1


Environment:


$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9)
Comment 1 Etsushi Kato 2010-03-08 21:13:07 UTC
(In reply to comment #0)
> Giving the --enable-debug option to configure causes an assertion failure in
> lt-uim-module-manager during compilation.  The workarounds in the report of
> #16477 do not work, i.e. assertion fails 
[...]
> 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.

Also confirmed with Mac OS X 10.6 (x86_64) and Fedora 12 (x86_64).

Although I don't know the GC code internal of sigscheme well, I don't think it requires to use SCM_UNTAG_PTR() in storage-gc.c:640, because it checks the alignment later in line 649.  So I suggest using ptr = (ScmCell *)SCM_DROP_TAG(obj) at the line.
Comment 2 Etsushi Kato 2010-03-09 20:23:08 UTC
Fixed in trunk (r6237) and sigscheme-0.8 (r6238).


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.