Boost logo

Boost Users :

From: Stephen Jackson (stephen.jackson_at_[hidden])
Date: 2002-12-03 17:29:49


eydelber wrote:
>
> Code is here:
>
> http://www.myplaceonline.com/code/code.htm
>
> Just compile everything together and run ./try.cgi, and from there
> enter an sql string similar to (you'll also have to create a table
> first like this: "create table test (one int)"):
>
> insert into test (lkfsdjlkafdjklfsdajflkjfdklsjfsdlkjsfldkjfskldaj)
> values (1);
>

With some difficulty, I have reproduced your problem with GCC 3.2 on Red
Hat 8.0.

The difficulties were mainly non-conforming code:
        1. Get James Clark's expat parser.
        2. Include <iostream> where necessary.
        3. Add further using directives where necessary.
        4. Remove the non-conforming duplication of default parameter values in
the headers and the implementation files.
        5. There are further warnings which matter but are irrelevant to this
exercise.

In the general case, if a C++ program compiled with GCC prints "Aborted"
and exits, this is caused by an unhandled exception.

In this case, you promise that textdb::TextDB::execute will only throw
TextDBException. However, RegEx::Match is thowing a different exception.
You are not handling this exception in textdb::TextDB::execute, and you
have promised not to leak it; the result is that GCC causes your program
to abort.

By removing the throw specification from your function and adding extra
catches in main(), I can tell you that RegEx::Match is throwing an
exception whose what() reports "Max regex search depth exceeded."

I hope this helps.

Regards,

Stephen Jackson

-- 
stephen.jackson_at_[hidden]       http://www.scribitur.com/spj/

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net