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 Je...@i-o.com on 2000/09/26 18:42:23 UTC
Problem using Purify
Hi,
I've just run into a problem the first time I've used purify with Xerces.
Xerces: version 1.2.
Platform: Sun Sparc Ultra-5 w/ Solaris 7
Compiler: GNU g++ 2.95.2
Purify: verson 5.1
Problem: loose pointer during purify session ending in a core
I'm linking Xerces as a sharable library (out-of-the-box).
NOTE: panic reported in PlatformUtils.cpp:176 -- seems that the class
TransService was never
instanced and initialized. A pointer to a public XMLString of a class that
was never instanced
seems to be causing the problem.
Do you agree?
The execute session complains thusly:
=================================
IPR: Invalid pointer read
------------------------------
__8ENameMapPCw [TransENameMap.hpp:104]
//
-----------------------------------------------------------------------
// Hidden constructors
//
-----------------------------------------------------------------------
=> ENameMap(const XMLCh* const encodingName) :
fEncodingName(XMLString::replicate(encodingName))
{
------------------------------
__t11ENameMapFor1Z15XMLChTranscoderPCw [TransENameMap.c:71]
// ENameMapFor: Constructors and Destructor
//
---------------------------------------------------------------------------
template <class TType>
=> ENameMapFor<TType>::ENameMapFor(const XMLCh* const encodingName) :
ENameMap(encodingName)
{
------------------------------
XMLTransService::initTransService() [TransService.cpp:279]
// Add in the magical mapping for the native XMLCh transcoder. This
// is used for internal entities.
//
=> gMappings->put(new
ENameMapFor<XMLChTranscoder>(XMLUni::fgXMLChEncodingString));
//
// Add in our mappings for ASCII.
------------------------------
XMLPlatformUtils::Initialize() [PlatformUtils.cpp:176]
panic(Panic_NoTransService);
// Initialize the transcoder service
=> fgTransService->initTransService();
//
// Try to create a default local code page transcoder. This is the one
------------------------------
main [XMLdbTest.cpp:121]
// Initialize the XML4C2 system
try
{
=> XMLPlatformUtils::Initialize ();
}
catch (const XMLException& toCatch)
{
Re: Problem using Purify
Posted by Dean Roddey <dr...@charmedquark.com>.
I would assume you either never called PlatformUtils::Initialize(), or you
did but the platform driver code for your platform is not correctly setting
it up.
--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com
"It takes two buttocks to make friction"
- African Proverb
----- Original Message -----
From: <Je...@i-o.com>
To: <xe...@xml.apache.org>
Sent: Tuesday, September 26, 2000 9:42 AM
Subject: Problem using Purify
>
>
> Hi,
>
> I've just run into a problem the first time I've used purify with Xerces.
> Xerces: version 1.2.
> Platform: Sun Sparc Ultra-5 w/ Solaris 7
> Compiler: GNU g++ 2.95.2
> Purify: verson 5.1
> Problem: loose pointer during purify session ending in a core
>
> I'm linking Xerces as a sharable library (out-of-the-box).
>
> NOTE: panic reported in PlatformUtils.cpp:176 -- seems that the class
> TransService was never
> instanced and initialized. A pointer to a public XMLString of a class
that
> was never instanced
> seems to be causing the problem.
>
> Do you agree?
>
> The execute session complains thusly:
> =================================
> IPR: Invalid pointer read
> ------------------------------
> __8ENameMapPCw [TransENameMap.hpp:104]
> //
> -----------------------------------------------------------------------
> // Hidden constructors
> //
> -----------------------------------------------------------------------
> => ENameMap(const XMLCh* const encodingName) :
>
> fEncodingName(XMLString::replicate(encodingName))
> {
> ------------------------------
> __t11ENameMapFor1Z15XMLChTranscoderPCw [TransENameMap.c:71]
> // ENameMapFor: Constructors and Destructor
> //
> --------------------------------------------------------------------------
-
> template <class TType>
> => ENameMapFor<TType>::ENameMapFor(const XMLCh* const encodingName) :
>
> ENameMap(encodingName)
> {
> ------------------------------
> XMLTransService::initTransService() [TransService.cpp:279]
> // Add in the magical mapping for the native XMLCh transcoder.
This
> // is used for internal entities.
> //
> => gMappings->put(new
> ENameMapFor<XMLChTranscoder>(XMLUni::fgXMLChEncodingString));
>
> //
> // Add in our mappings for ASCII.
> ------------------------------
> XMLPlatformUtils::Initialize() [PlatformUtils.cpp:176]
> panic(Panic_NoTransService);
>
> // Initialize the transcoder service
> => fgTransService->initTransService();
>
> //
> // Try to create a default local code page transcoder. This is the
one
> ------------------------------
> main [XMLdbTest.cpp:121]
> // Initialize the XML4C2 system
> try
> {
> => XMLPlatformUtils::Initialize ();
> }
> catch (const XMLException& toCatch)
> {
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>