Summary: | starting qemacs leads to a segmentation fault | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Martin <monsorno> |
Component: | New packages | Assignee: | Emacs project <emacs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cbm, fauli |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 141567 | ||
Attachments: | strace output for qe call |
Description
Martin
2005-05-09 08:07:10 UTC
can you please provide a gdb backtrace? it works fine for me. simply set FEATURES="nostrip" , edit your make.conf and set CFLAGS="-O0 -ggdb" and emerge qemacs again. so start it, run 'gdb qemacs' and then type run, when the program segfaults type 'bt full' , that generates the backtrace. quite interesting, with -O0 it works. segfaults also for me with -O2. now where i can reproduce i can generate the backtrace on my own, so nevermind ;) is this still an issue with never versions of gcc and qemacs? (In reply to comment #3) > is this still an issue with never versions of gcc and qemacs? with current cvs (as of Aug 5 18:55:01 CEST 2005) it starts up allright and seems to work allright, although i haven't tested it very thoroughly. this was tested with sys-devel/gcc-3.4.3-r1 I'd like to reopen this. On my x86 boxes it still segfaults. I'm using gcc-3.4 with CFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer" I can attach a backtrace like in comment #1 later. Emerge info: Portage 2.0.53_rc7 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r3, 2.6.14.2 i686) ================================================================= System uname: 2.6.14.2 i686 Intel(R) Celeron(TM) CPU 1066MHz Gentoo Base System version 1.12.0_pre11 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] dev-lang/python: 2.3.5, 2.4.2 sys-apps/sandbox: 1.2.13 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20-r1 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protection distcc distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://distro.ibiblio.org/pub/linux/distributions/gentoo/ " MAKEOPTS="-j8" PKGDIR="/mnt/aconite-gentoo-packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/ag-portage" SYNC="rsync://aconite/gentoo-portage" USE="x86 X Xaw3d a52 aac aalib acpi alsa apm arts audiofile avi berkdb bitmap-fonts bzip2 cairo cdr cjk crypt cups curl dbus dga dts dv dvb dvd dvdr eds emacs emboss encode esd ethereal exif expat f77 faad fam fbcon ffmpeg fftw flac fortran gcj gd gdbm gif gimpprint ginac glut gmp gnome gnustep gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal idn imagemagick imlib jack java jpeg lcms ldap leim libcaca libg++ libwww lirc live lua mad matroska mikmod mmx mng mono motif mozilla mp3 mpeg mysql nas ncurses nls nptl objc offensive ogg oggvorbis openal opengl oss pam pcmcia pcre pdflib perl plotutils png ppds python qhull qt quicktime radeon readline recode rtc samba scanner sdk sdl slang speex spell sqlite sse ssl svg tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vcd vorbis wmf wxwindows xine xinerama xml xml2 xmms xosd xprint xv xvid zlib video_cards_mach64 video_cards_i810 video_cards_i830 video_cards_i915 video_cards_radeon userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS reopening per user request Created attachment 75097 [details]
strace output for qe call
I have this same segfault on my X86 machine,
with gcc-3.4.4 and CFLAGS="-O3 -march=pentium3m -fomit-frame-pointer".
as the strace output is missing so far, i attached mine.
if anything else should be needed just complain --
i don't want to overflow this thread with another
emerge info.
mkennedy@localhost:/tmp/qemacs-0.3.1$ gdb qe GNU gdb 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) r Starting program: /tmp/qemacs-0.3.1/qe Program received signal SIGSEGV, Segmentation fault. 0xb7ea7463 in _IO_2_1_stderr_ () from /lib/libc.so.6 (gdb) where #0 0xb7ea7463 in _IO_2_1_stderr_ () from /lib/libc.so.6 #1 0x080597a2 in qe_init (opaque=0x0) at qe.c:6194 #2 0x0805effa in url_main_loop (init=0x80593c0 <qe_init>, opaque=0x0) at unix.c:291 #3 0x08059abb in main (argc=0, argv=0x0) at qe.c:6432 (gdb) I think this is a CFLAGS problem. I can build a functioning qemacs if I unset CFLAGS. my CFLAGS are "-march=athlon-xp -O2 -fomit-frame-pointer -pipe", The only variable seems to be the optimization level. With -O0, -O1 it doesnt segfault, with -Os, -O2 and -O3 it segfaults. The code seems to be sane enough anyway. Portage 2.1_pre10-r5 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.4-r2, 2.6.15-gentoo-r8 i686) ================================================================= System uname: 2.6.15-gentoo-r8 i686 AMD Athlon(tm) XP 3200+ Gentoo Base System version 1.12.0_pre19 dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig cvs distlocks metadata-transfer notitles sandbox sfperms sign strict userpriv usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" 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'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/home/mkennedy/overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X a52 aac acl alsa apache2 apm avi berkdb bitmap-fonts cli crypt dts dv dvd dvdr eds emacs emboss encode ffmpeg flac foomaticdb fortran gdbm gif gstreamer gtk2 hal ieee1394 isdnlog jikes jpeg libg++ libwww mad mikmod mmx mozilla mp3 mpeg ncurses nls nptl nptlonly nsplugin ogg opengl pam pcre pdflib png pppd quicktime reflection sdl session source speex spell spl sse ssl tcpd theora threads tiff truetype truetype-fonts type1-fonts udev unicode vcd vorbis x264 xml xorg xprint xv xvid yv12 zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nv video_cards_nvidia" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS mkennedy@localhost:/tmp/qemacs-0.3.1$ Maybe filter CFLAGS? Even after applying patches for the new libpng and for GCC 4.1 it segfaults here (for patches see dependencies of bug #141567). Traceback: Program received signal SIGSEGV, Segmentation fault. 0x46757462 in _IO_2_1_stderr_ () from /lib/libc.so.6 (gdb) bt #0 0x46757462 in _IO_2_1_stderr_ () from /lib/libc.so.6 #1 0x08056f70 in qe_init () #2 0x0805e5f4 in url_main_loop () #3 0x0805000f in main () This has been fixed in -r3, please close. Thanks. It misses inherit flag-o-matic so it does not replace any flag. It should also remove the default O2 CFLAGS in configure Thanks (In reply to comment #16) > It misses inherit flag-o-matic so it does not replace any flag. Fixed. Thanks for pointing out > It should also remove the default O2 CFLAGS in configure CFLAGS is only set to -O2 when CFLAGS is empty. Another setting is for BeOS only. |