You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Martin Waller <ma...@seagatesoftware.com> on 2001/02/14 15:30:10 UTC
SEGV - Solaris 5.8 Xerces 1_4_0 SAXParser
Hello,
I'm trying a very simple test program:
#include <stdlib.h>
#include <iostream.h>
#include "util/XMLUniDefs.hpp"
#include "sax/AttributeList.hpp"
#include "util/PlatformUtils.hpp"
#include "util/TransService.hpp"
#include "parsers/SAXParser.hpp"
extern "C"
{
void * xml_f_create_parse(void)
{
SAXParser *parser;
parser = new SAXParser();
return ((void *) parser);
}
}
and when I link it agains a small C driver program that simply calls
xml_f_create_parse. When I run it I get the following stack dump:
current thread: t@1
[1] pthread_mutex_lock(0x0, 0x658, 0xff2e39a0, 0xff3e260c, 0x20e40,
0xff291538), at 0xfef9b6c0
[2] XMLPlatformUtils::compareAndSwap(0xff2fbe00, 0x2bed8, 0x2bed8, 0x0,
0xff30da84, 0xff3a036c), at 0xff291538
[3] gScannerMutex(0x2bed8, 0x2bed8, 0xff30da84, 0x0, 0x0, 0x0), at
0xff29db90
[4] XMLScanner::commonInit(0x2d398, 0xff35a054, 0xff2e39a0, 0x2d398, 0x0,
0x0), at 0xff29f198
[5] XMLScanner::XMLScanner(0x3ff, 0x2d3a0, 0x2d3b0, 0x2d404, 0x2d43c,
0x2d44c), at 0xff29de1c
[6] SAXParser::SAXParser(0x2b500, 0x2d398, 0x2d398, 0x2b514, 0x21a40,
0xff346644), at 0xff28df58
=>[7] xml_f_create_parse(), line 16 in "test.cpp"
[8] main(0x1, 0xffbef3f4, 0xffbef3fc, 0x24400, 0x0, 0x0), at 0x135ec
I am using the CC (C++) compiler to do the final link and the link is
totally clean.
Any clues ?
Martin
Re: SEGV - Solaris 5.8 Xerces 1_4_0 SAXParser
Posted by Khaled Noaman <kn...@ca.ibm.com>.
Did you call XMLPlatformUtils::Initialize() before creating the parser? If not
then you should call it before initializing the parser.
Regards,
Khaled Noaman
XML Parsers - IBM Toronto Lab
knoaman@ca.ibm.com
Martin Waller wrote:
> Hello,
>
> I'm trying a very simple test program:
>
> #include <stdlib.h>
> #include <iostream.h>
> #include "util/XMLUniDefs.hpp"
> #include "sax/AttributeList.hpp"
> #include "util/PlatformUtils.hpp"
> #include "util/TransService.hpp"
> #include "parsers/SAXParser.hpp"
>
> extern "C"
> {
>
> void * xml_f_create_parse(void)
> {
> SAXParser *parser;
>
> parser = new SAXParser();
> return ((void *) parser);
> }
>
> }
>
> and when I link it agains a small C driver program that simply calls
> xml_f_create_parse. When I run it I get the following stack dump:
>
> current thread: t@1
> [1] pthread_mutex_lock(0x0, 0x658, 0xff2e39a0, 0xff3e260c, 0x20e40,
> 0xff291538), at 0xfef9b6c0
> [2] XMLPlatformUtils::compareAndSwap(0xff2fbe00, 0x2bed8, 0x2bed8, 0x0,
> 0xff30da84, 0xff3a036c), at 0xff291538
> [3] gScannerMutex(0x2bed8, 0x2bed8, 0xff30da84, 0x0, 0x0, 0x0), at
> 0xff29db90
> [4] XMLScanner::commonInit(0x2d398, 0xff35a054, 0xff2e39a0, 0x2d398, 0x0,
> 0x0), at 0xff29f198
> [5] XMLScanner::XMLScanner(0x3ff, 0x2d3a0, 0x2d3b0, 0x2d404, 0x2d43c,
> 0x2d44c), at 0xff29de1c
> [6] SAXParser::SAXParser(0x2b500, 0x2d398, 0x2d398, 0x2b514, 0x21a40,
> 0xff346644), at 0xff28df58
> =>[7] xml_f_create_parse(), line 16 in "test.cpp"
> [8] main(0x1, 0xffbef3f4, 0xffbef3fc, 0x24400, 0x0, 0x0), at 0x135ec
>
> I am using the CC (C++) compiler to do the final link and the link is
> totally clean.
>
> Any clues ?
>
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: SEGV - Solaris 5.8 Xerces 1_4_0 SAXParser
Posted by Marco Seiriö <ma...@crepido.com>.
Make sure to use -mt
/Marco
Martin Waller wrote:
> Hello,
>
> I'm trying a very simple test program:
>
> #include <stdlib.h>
> #include <iostream.h>
> #include "util/XMLUniDefs.hpp"
> #include "sax/AttributeList.hpp"
> #include "util/PlatformUtils.hpp"
> #include "util/TransService.hpp"
> #include "parsers/SAXParser.hpp"
>
> extern "C"
> {
>
> void * xml_f_create_parse(void)
> {
> SAXParser *parser;
>
> parser = new SAXParser();
> return ((void *) parser);
> }
>
> }
>
> and when I link it agains a small C driver program that simply calls
> xml_f_create_parse. When I run it I get the following stack dump:
>
> current thread: t@1
> [1] pthread_mutex_lock(0x0, 0x658, 0xff2e39a0, 0xff3e260c, 0x20e40,
> 0xff291538), at 0xfef9b6c0
> [2] XMLPlatformUtils::compareAndSwap(0xff2fbe00, 0x2bed8, 0x2bed8, 0x0,
> 0xff30da84, 0xff3a036c), at 0xff291538
> [3] gScannerMutex(0x2bed8, 0x2bed8, 0xff30da84, 0x0, 0x0, 0x0), at
> 0xff29db90
> [4] XMLScanner::commonInit(0x2d398, 0xff35a054, 0xff2e39a0, 0x2d398, 0x0,
> 0x0), at 0xff29f198
> [5] XMLScanner::XMLScanner(0x3ff, 0x2d3a0, 0x2d3b0, 0x2d404, 0x2d43c,
> 0x2d44c), at 0xff29de1c
> [6] SAXParser::SAXParser(0x2b500, 0x2d398, 0x2d398, 0x2b514, 0x21a40,
> 0xff346644), at 0xff28df58
> =>[7] xml_f_create_parse(), line 16 in "test.cpp"
> [8] main(0x1, 0xffbef3f4, 0xffbef3fc, 0x24400, 0x0, 0x0), at 0x135ec
>
> I am using the CC (C++) compiler to do the final link and the link is
> totally clean.
>
> Any clues ?
>
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
--
Marco Seiriö - Tel: 0708-88 04 64 - marco@crepido.com
Crepido Systems AB - www.crepido.com - Tel: 031-86 87 71
Box 6131, 400 60 Göteborg. Besök: Åvägen 6, Gårda