You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Simon Laws <si...@googlemail.com> on 2007/01/25 18:28:27 UTC

[C++] SDO Memory management

Hi

I note that there are serveral cases in SDO (as used during the model
loading stage of the SCA CPPCalculator samples) where valgrind reports
memory being deleted more that once. I have the example here and in my case
the problem is in
 ~SAX2Parser
 ~DataObjectImpl
 ~SDORuntimeException
 Logger::LogArgs1()
 Logger::LogArgs2()

I really thought these were are the root of my PHP extension problems but
alas no. As I'm knee deep in trying to sort this at the moment so I'm not
going to chase these any further at the moment but thought it best to warn
people. I'll raise a suitable JIRA with just this info. If anyone wants to
have a go pick an application that uses SDO and run it under valgrind. I
should point out that, for me, Purify didn't report these errors on windows.
I wouldn't read too much into that as I have so many other problems at the
moment it's not clear actually what is going on.

Regards

Simon

Re: [C++] SDO Memory management

Posted by Simon Laws <si...@googlemail.com>.
On 1/26/07, Geoffrey Winn <ge...@googlemail.com> wrote:
>
> I'm interested in that. I'm re-writing most of DataObjectImpl currently,
> including the destructor so I may fix that one by accident. I've never
> encountered valgrind before so if you can help me get started with it I'll
> try to use it with SDO more regularly.
>
> Geoff.
>
> On 25/01/07, Simon Laws <si...@googlemail.com> wrote:
> >
> > Hi
> >
> > I note that there are serveral cases in SDO (as used during the model
> > loading stage of the SCA CPPCalculator samples) where valgrind reports
> > memory being deleted more that once. I have the example here and in my
> > case
> > the problem is in
> > ~SAX2Parser
> > ~DataObjectImpl
> > ~SDORuntimeException
> > Logger::LogArgs1()
> > Logger::LogArgs2()
> >
> > I really thought these were are the root of my PHP extension problems
> but
> > alas no. As I'm knee deep in trying to sort this at the moment so I'm
> not
> > going to chase these any further at the moment but thought it best to
> warn
> > people. I'll raise a suitable JIRA with just this info. If anyone wants
> to
> > have a go pick an application that uses SDO and run it under valgrind. I
> > should point out that, for me, Purify didn't report these errors on
> > windows.
> > I wouldn't read too much into that as I have so many other problems at
> the
> > moment it's not clear actually what is going on.
> >
> > Regards
> >
> > Simon
> >
> >

 Geoff

Using valgrind in its default configuration is easy assuming you have a
distro where it is already installed (it is on my Fedora core 5 box) you
just use

valgrind myexe

And that's it. It will run 'myexe' with a range of memory checking in force
and write info to stdout. I'm sure there are many ways you can configure it
for more complex operation but I haven't got into that yet.

If you don't have it you will have to find the rpm etc.

Regards

Simon

Re: [C++] SDO Memory management

Posted by Geoffrey Winn <ge...@googlemail.com>.
I'm interested in that. I'm re-writing most of DataObjectImpl currently,
including the destructor so I may fix that one by accident. I've never
encountered valgrind before so if you can help me get started with it I'll
try to use it with SDO more regularly.

Geoff.

On 25/01/07, Simon Laws <si...@googlemail.com> wrote:
>
> Hi
>
> I note that there are serveral cases in SDO (as used during the model
> loading stage of the SCA CPPCalculator samples) where valgrind reports
> memory being deleted more that once. I have the example here and in my
> case
> the problem is in
> ~SAX2Parser
> ~DataObjectImpl
> ~SDORuntimeException
> Logger::LogArgs1()
> Logger::LogArgs2()
>
> I really thought these were are the root of my PHP extension problems but
> alas no. As I'm knee deep in trying to sort this at the moment so I'm not
> going to chase these any further at the moment but thought it best to warn
> people. I'll raise a suitable JIRA with just this info. If anyone wants to
> have a go pick an application that uses SDO and run it under valgrind. I
> should point out that, for me, Purify didn't report these errors on
> windows.
> I wouldn't read too much into that as I have so many other problems at the
> moment it's not clear actually what is going on.
>
> Regards
>
> Simon
>
>