Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196230 - app-text/opensp-1.5.2 segfault in OpenSP::ParsedSystemId::unparse
Summary: app-text/opensp-1.5.2 segfault in OpenSP::ParsedSystemId::unparse
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High critical with 1 vote (vote)
Assignee: Gentoo SGML project
URL:
Whiteboard:
Keywords:
Depends on: 410273
Blocks:
  Show dependency tree
 
Reported: 2007-10-17 22:58 UTC by Alexander Prinsier
Modified: 2012-07-23 00:53 UTC (History)
2 users (show)

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 Alexander Prinsier 2007-10-17 22:58:50 UTC
$ openjade -t html a
Segmentation fault

(a is just some bogus parameter. Putting anything instead of a just makes it segfault)

Reproducible: Always

Steps to Reproduce:
Just run the command.

Actual Results:  
Segfault

Expected Results:  
At least don't segfault, or print an error message, or in case of valid arguments, do the job :)
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-10-17 23:02:57 UTC
We really cannot guess, sorry. Reopen with a backtrace attached and emerge --info output.

http://www.gentoo.org/proj/en/qa/backtraces.xml
http://www.gentoo.org/doc/en/bugzilla-howto.xml
Comment 2 Alexander Prinsier 2007-10-17 23:22:41 UTC
Of course, my fault. Below is the backtrace and emerge --info. I would have compiled with -ggdb -O0, but I think the ebuild stripts those out, so I had to do with -O2 -g.

Backtrace:

(gdb) set args -t html qsdf
(gdb) run
Starting program: /usr/bin/openjade -t html qsdf

Program received signal SIGSEGV, Segmentation fault.
0x410d269e in OpenSP::ParsedSystemId::unparse () from /usr/lib/libosp.so.5
(gdb) bt full
#0  0x410d269e in OpenSP::ParsedSystemId::unparse () from /usr/lib/libosp.so.5
No symbol table info available.
#1  0xb7e87997 in OpenJade_DSSSL::DssslApp::processSysid (this=0xbf9195b4, sysid=@0xbf919530) at DssslApp.cxx:87
        j = <value optimized out>
        i = <value optimized out>
        v = <incomplete type>
        ext = {46, 100, 115, 108}
#2  0x410c5a86 in OpenSP::EntityApp::processArguments () from /usr/lib/libosp.so.5
No symbol table info available.
#3  0x410b263c in OpenSP::CmdLineApp::run () from /usr/lib/libosp.so.5
No symbol table info available.
#4  0x08057a02 in main (argc=135184000, argv=0x1) at jade.cxx:192
        app = {<OpenJade_DSSSL::DssslApp> = {<OpenSP::GroveApp> = {<> = {<No data fields>}, rootNode_ = {
        node_ = 0x0}}, <OpenJade_DSSSL::GroveManager> = {_vptr.GroveManager = 0x80beb20}, unitsPerInch_ = 72000, 
    defaultOutputBasename_ = {ptr_ = 0x80eba48, length_ = 4, alloc_ = 4}, dssslSpecOption_ = false, dssslSpecSysid_ = {
      ptr_ = 0x80ebe80, length_ = 1, alloc_ = 17}, dssslSpecId_ = {ptr_ = 0x0, length_ = 0, alloc_ = 0}, defineVars_ = {
      _vptr.Vector = 0x80beb68, size_ = 0, ptr_ = 0x0, alloc_ = 0}, specParser_ = <incomplete type>, groveTable_ = {
      table_ = {<OpenSP::OwnerTable<OpenSP::HashTableItemBase<OpenSP::String<unsigned int> >,OpenSP::String<unsigned int>,OpenSP::Hash,OpenSP::HashTableKeyFunction<OpenSP::String<unsigned int> > >> = {<OpenSP::PointerTable<OpenSP::HashTableItemBase<OpenSP::String<unsigned int> >*,OpenSP::String<unsigned int>,OpenSP::Hash,OpenSP::HashTableKeyFunction<OpenSP::String<unsigned int> > >> = {used_ = 0, usedLimit_ = 0, vec_ = {_vptr.Vector = 0x80bebb0, size_ = 0, ptr_ = 0x0, alloc_ = 0}, 
            null_ = 0x0}, <No data fields>}, <No data fields>}}, rootSystemId_ = {ptr_ = 0x80ebf50, length_ = 12, 
      alloc_ = 12}, debugMode_ = false, dsssl2_ = false, strictMode_ = false}, static outputTypeNames = {0x80be96e "fot", 
    0x80be972 "rtf", 0x80be976 "html", 0x80be97b "tex", 0x80be97f "mif", 0x80be983 "sgml", 0x80be988 "xml"}, 
  outputType_ = OpenJade_DSSSL::JadeApp::htmlType, outputFilename_ = {ptr_ = 0x0, length_ = 0, alloc_ = 0}, 
  outputOptions_ = {_vptr.Vector = 0x80beb68, size_ = 0, ptr_ = 0x0, alloc_ = 0}, outputFile_ = <incomplete type>}
#5  0xb7bd39bc in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
#6  0x08056e91 in _start ()
No symbol table info available.
(gdb) bt
#0  0x410d269e in OpenSP::ParsedSystemId::unparse () from /usr/lib/libosp.so.5
#1  0xb7e87997 in OpenJade_DSSSL::DssslApp::processSysid (this=0xbf9195b4, sysid=@0xbf919530) at DssslApp.cxx:87
#2  0x410c5a86 in OpenSP::EntityApp::processArguments () from /usr/lib/libosp.so.5
#3  0x410b263c in OpenSP::CmdLineApp::run () from /usr/lib/libosp.so.5
#4  0x08057a02 in main (argc=135184000, argv=0x1) at jade.cxx:192
#5  0xb7bd39bc in __libc_start_main () from /lib/libc.so.6
#6  0x08056e91 in _start ()


$ emerge --info
Portage 2.1.3.9 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-ck1-ap i686)
=================================================================
System uname: 2.6.22-ck1-ap i686 Genuine Intel(R) CPU T2050 @ 1.60GHz
Timestamp of tree: Wed, 17 Oct 2007 12:50:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61-r1
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.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O0 -g"
CHOST="i686-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/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O0 -g"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parellel-fetch sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="en_US.UTF8"
LC_ALL="en_US.UTF8"
LINGUAS="en nl fr de"
MAKEOPTS="-j4"
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"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise"
SYNC="rsync://ftp.belnet.be/gentoo-portage"
USE="X a52 aac accessibility acpi alsa apache2 bash-completion berkdb bitmap-fonts bzip2 cairo cdr cjk cli cracklib crypt cups dbus dga dri dts dv dvd dvdr dvdread encode exif fbcon ffmpeg firefox flac fortran ftp gd gdbm gnome gphoto2 gpm graphviz gstreamer gtk gtk2 hal hardened iconv imlib innodb ipod ipv6 isdnlog jabber java joystick jpeg junit kde ldap lua mad maildir mhash midi mime mmap mmx mng mp3 mpeg mplayer msn mudflap mysql mysqli nas ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcmcia pcre pdf perl php png posix postgres ppds pppd python qt3support qt4 quicktime rdesktop readline real reflection sasl sdl session sharedext simplexml skey sndfile snmp soap sockets speex spell spl sqlite3 sse sse2 ssl svg svga tcpd test tetex threads tidy tiff truetype truetype-fonts type1 type1-fonts unicode usb v4l vcd vhosts vim-syntax vorbis wifi win32codecs wma wmf wxwindows x86 xcomposite xine xinerama xml xorg xosd xpm xprint xsl xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en nl fr de" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Raphael Das Gupta 2008-07-06 15:10:47 UTC
I have openjade segfault, too. Interestingly, the commands of app-text/docbook-sgml-utils-0.6.14 (jw, docbook2pdf etc.) seem to work, even though they are just wrappers for jade / openjade. (And I have only openjade installed, not jade)
Comment 4 Louis Frayser 2008-08-28 08:04:27 UTC
(In reply to comment #3)
> I have openjade segfault, too. Interestingly, the commands of
> app-text/docbook-sgml-utils-0.6.14 (jw, docbook2pdf etc.) seem to work, even
> though they are just wrappers for jade / openjade. (And I have only openjade
> installed, not jade)
> 

OpenJade segfaults for me too using the test case "jade -t html a"; and in my normal usage(in a old script that stopped working when I swithed to Gentoo): "jade -t xml jade -t xml pins.xml"; however, when I specify the dsl file:
(jade -t xml -d pins.dsl pins.xml), there is no segfault.

So the wrappers (jw, docbook2pdf, etc.) you mentioned are probably specifying the DSSSL file.  That was a good clue. This bug isn't as bad as it looks. 
Comment 5 Mike Gilbert gentoo-dev 2012-03-30 22:04:06 UTC
Fixed in opensp-1.5.2-r3.
Comment 6 Louis Frayser 2012-07-23 00:53:55 UTC
I'm just verifying that it is fixed in opensp-1.5.2-r3

$ jade -v -t html a
jade:I: "openjade" version "1.3.2"
jade:I: "OpenSP" version "1.5.2"
jade:E: cannot find "a"; tried "a", "/usr/share/sgml/a"
jade:E: cannot find "a.dsl"; tried "a.dsl", "/usr/share/sgml/a.dsl"
jade:E: specification document does not have the DSSSL architecture as a base architecture

$ jade -t xml -V%search-string%="rebate" pins.xml 
Provider: www.rebatesHq.com
COMMENT: Staples
Login:  xxmexxxx
Passwd: xxxxxxxx
--------------------

NOTE: The program now finds the default DSSSL file instead of seg-faulting.

$ eix -ec openjade
[I] app-text/openjade (1.3.2-r3{tbz2}@07/06/11): Jade is an implementation of DSSSL - an ISO standard for formatting SGML and XML documents

$ eix -c -e opensp
[I] app-text/opensp (1.5.2-r3{tbz2}@06/18/12): A free, object-oriented toolkit for SGML parsing and entity management