[Xapian-discuss] Re: queryparser dies badly on double search words.

R. Mattes rm at mh-freiburg.de
Mon Aug 22 17:18:53 BST 2005


On Mon, 22 Aug 2005 13:24:45 +0200, R. Mattes wrote:

> On Mon, 22 Aug 2005 20:32:52 +0200, Marcus Ramberg wrote:
> 
>> hey.
>> I'm using the Search::Xapian interface version 0.9.2 (and xapian-core  
>> 0.9.2), and feeding the queryparser such things as  "one AND NOT two"  
>> or "test NOT NOT really" makes it go "Aborted"... I've tried adding  
>> the exception handling from the other stubs to QueryParser.xs as  
>> well, but I still can't catch this error from perl. Does this mean  
>> it's not an exception being thrown?
>> 
>> Hope someone has an idea.
> 
> Not an idea so far but i can repoduce the segfaults with my apache
> module, so it's likely to be a problem with the query parser.

Well, i did some more testing and it seems that these malformed query
strings trigger an exception that can only be cought by
 catch (...) { 
Hmm, looking at the sources in xapian-core/queryparser it _seems_ like
the parser would only throw an exception of type (char *) but a handler
like: catch(char *mesg) doesn't catch that exception (our test program
receives signal 6 (= SIGABRT). Since queryparser.cc just throws 
internal->errmsg (which is supposed to be of type(char *)) and since
this slot (err, member) is only set when the parse_query function is
left via 'goto done/return' i wonder whether qeryparser throws
internal->errmsg while it's still at it's initial value of NULL ...

still
>  Cheers Ralf Mattes


>> With regards
>> Marcus Ramberg





More information about the Xapian-discuss mailing list