Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 182885 - dev-scheme/bigloo-2.9a sqlite C back-end segmentation fault
Summary: dev-scheme/bigloo-2.9a sqlite C back-end segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Scheme Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-22 12:18 UTC by Tiago Cunha (RETIRED)
Modified: 2007-11-29 16:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago Cunha (RETIRED) gentoo-dev 2007-06-22 12:18:06 UTC
dev-scheme/bigloo-2.9a  USE="emacs"

$ bigloo -s -eval '(module example1 (library sqlite))'
Segmentation fault

(with FEATURES="nostrip" CFLAGS="-O1 -pipe -g -ggdb")
$ gdb --args bigloo -s -eval '(module example1 (library sqlite))'
GNU gdb 6.6
[...]
(gdb) run
Starting program: /usr/bin/bigloo -s -eval \(module\ example1\ \(library\ sqlite\)\)
[...]
[Thread debugging using libthread_db enabled]
[New Thread 47981439503888 (LWP 2491)]
Error while reading shared library symbols:
Cannot find new threads: generic error

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47981439503888 (LWP 2491)]
0x00002ba38c4e666d in __longjmp () from /lib64/ld-linux-x86-64.so.2
(gdb) bt
#0  0x00002ba38c4e666d in __longjmp () from /lib64/ld-linux-x86-64.so.2
#1  0x0000000000000000 in ?? ()

I'll try to do a gdb single-step later.

Portage 2.1.2.7 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.5-r0, 2.6.20-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.20-gentoo-r8 x86_64 Intel(R) Pentium(R) D CPU 3.00GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 21 Jun 2007 20:20:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=nocona -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/init.d /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=nocona -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-akv"
FEATURES="buildpkg ccache collision-protect distlocks fixpackages metadata-transfer multilib-strict parallel-fetch sandbox sfperms strict test userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://mirrors1.netvisao.pt/gentoo http://darkstar.ist.utl.pt/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 apache2 arts bash-completion bitmap-fonts cairo cdr cli cracklib crypt dbus dri dts dvd dvdr dvdread eds emboss encode evo fam firefox flac fortran gif gpm hal iconv ipv6 isdnlog jpeg kde kdeenablefinal kdehiddenvisibility libg++ mad midi mikmod mmx mp3 mpeg mudflap musepack musicbrainz mysql ncurses nptl nptlonly offensive ogg opengl openmp pam pcre pdf perl png postgres pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl svg tcpd test tiff truetype truetype-fonts type1-fonts unicode vorbis xcomposite xml xorg xscreensaver xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Marijn Schouten (RETIRED) gentoo-dev 2007-06-22 13:02:30 UTC
<quote Manuel Serrano>
The following invocation

  bigloo -s -eval '(module example1 (library sqlite))'

is bound to fail because, by default, Bigloo is linked against static
libraries. So the dynamic loading of the library sqlite fails because
the loader reports about unbound global variables. The segmentation fault
currently appears in the error recovery! This is what I will try to improve.

Since this fix will not improve your situation, here is a suggestion
for a possible workaround. In order to be able to load your dynamic
libraries within an interpreter you have to build your own READ-EVAL-PRINT
that you will link against the dynamic version of the Bigloo library. This
is quite simple, just proceed as follows:

$ cat > foo.scm <<EOF
(module foo)
(repl)
EOF
$ bigloo foo.scm -o my-repl
$ ./my-repl <<EOF 
(module foo (library sqlite))
(print "I'm done")
EOF
</quote>
Comment 2 Marijn Schouten (RETIRED) gentoo-dev 2007-06-22 15:37:55 UTC
<quote Manuel Serrano>
Contrary to what I have stated in my previous mail, I have found a workaround
that makes builting a custom REPL useless (I have discovered the gcc
-rdynamic option  :-) . I have just uploaded a new 3.0b alpha that contains
this fix.
</quote>
Comment 3 Marijn Schouten (RETIRED) gentoo-dev 2007-10-09 13:11:07 UTC
still segfaults on 3.0b_p2 with

bigloo -s -eval '(module example1 (library sqlite))'
Comment 4 Marijn Schouten (RETIRED) gentoo-dev 2007-11-29 16:09:30 UTC
Actually it doesn't segfault anymore. What it does do is give an ERROR as you can see in the following interaction:

$ bigloo
------------------------------------------------------------------------------
Bigloo (3.0c)                                                            ,--^,
`a practical Scheme compiler'                                      _ ___/ /|/
Thu Nov 29 07:40:31 CET 2007                                   ,;'( )__, ) '
Inria -- Sophia Antipolis                                     ;;  //   L__.
email: bigloo@sophia.inria.fr                                 '   \    /  '
url: http://www.inria.fr/mimosa/fp/Bigloo                          ^   ^
------------------------------------------------------------------------------


1:=> (module example1 (library sqlite))
*** ERROR:bigloo:
`segmentation violation' exception -- raised
    0.... library-translation-table-add!, sqlite.init:char 1002
1:=>