Skip to main content.
home | support | download

Back to List Archive

Re: [SWISH-E:147] swish-e 1.1: coredump while indexing a html-file

From: WWW server manager <webadm(at)>
Date: Fri Feb 20 1998 - 23:21:08 GMT
Kaj Hejer wrote:
> Hi!
> When I try to index the document on
> with swich-e 1.1
> I get a core dump.
> I use Linux 2.0.28 and gcc 2.7.2.
> The command I use is:
> $ swish-e -f index.swish -i fly/utstillingene/nordre/bell.html
> Checking file "fly/utstillingene/nordre/bell.html"...
> Segmentation fault (core dumped)

I tried saving your document and using the same command on a Sun system 
running Solaris 2.4 (swish compiled with Sun's C compiler). It dumped core
as well, so it's not system-specific.

The traceback from my dump (after I recompiled swish with the "strip" 
command in the makefile commented out :-) was

_etext(0xfffc468c,0x3b978,0x0,0x7efefeff,0x81010100,0xff0000) + 100c0
getMeta(0xefffc4bc,0x4f520,0x1,0x5,0x7,0x62c25) + 88
countwords(0x62598,0x62b50,0x0,0xefffcd00,0x2f,0xb) + 7b0
printfiles(0x62580,0x56c24,0xefffcd90,0x69730000,0x6973,0x3c) + e8
indexafile(0x62550,0x62550,0x4,0xefffd1c8,0x2,0x1e) + 460
main(0x5,0xeffff9ec,0xeffffa04,0x4d000,0x0,0x0) + 1674

getMeta() takes only one argument, the others in the traceback are not real 
arguments; the argument was the string "!-- metainfo start --".

The swish-e manual mentions <!--META START...> and <!--META END..>, but does
not explain how they are used. Does anyone know how "meta start"/"meta end"
comments are meant to be used?

It looks as if maybe the intended usage is

<!--meta start name="WHATEVER" -->
Part of the document text - all the words will be treated as values of 
the WHATEVER meta tag.
<!--meta stop -->

Your HTML document contains "<!-- metainfo start -->" rather than 
"<!--meta start ...", but it looks as if swish-e is very careless in its 
input-parsing - it just checks that "META" and "START" (case-insensitive) 
occur anywhere in the line (and in any order!!) and assumes it is a META
START tag, then expects to find NAME="thetagname" (with or without "s, with
or without spaces around the "=") somewhere (anywhere!) in the line. It 
looks like 

<!--starting a name = "somethingverysilly" is very metallic -->

would be interpreted as equivalent to 

<!--meta start name="somethingverysilly" -->

[Whenever I have to dig around in swish[-e], I'm amazed it works at all 
since it seems to be full of very sloppy coding like this - but when it 
works, it's good!]

I am not sure quite what it is doing to cause the core dump, but it looks as 
if you do not need META START/META END (and the core dump does not happen if 
those lines are deleted). You have "real" <META> tags, so you do not need
the special comments, which appear to tell swish-e that the part of the 
document between those comments comprises words to be treated as values of 
the meta name specified on the START line.

Note that you need a configuration file definition "metanames desription 
keywords" or else swish-e will either give an error when it sees the <meta> 
tags or treat their content as normal words, depending on whether you have 
OKNOMETA set true or false in config.h.

                                John Line
University of Cambridge WWW manager account (usually John Line)
Send general WWW-related enquiries to
Received on Fri Feb 20 15:29:41 1998