Archived

This forum has been archived. Please start a new discussion on GitHub.

Pointer problems

I'm currently investigating a memory problem in our application, and the boundschecker we use are reporting pointer artihmetic errors, and memory underruns when we use the IceUtils::Handle<>::dynamicCast operation. I was wondering if this is something you can provide any insigt into.

Specifically we have an inheritance diagram the looks like:

class SliceGeneratedClassX;

with a generic implementation

class SliceGeneratedClassXImpl:virtual public SliceGeneratedClassX;

and a further specific implementation

class SliceGeneratedClassXSpec:virtual public SliceGeneratedClassXImpl;

We then, from time to time want to cast a SliceGeneratedClassXPtr to a SliceGeneratedClassXSpecPtr, and this is where we get the memory underruns.

mvh

Nis

Comments

  • matthew
    matthew NL, Canada
    I'm currently investigating a memory problem in our application, and the boundschecker we use are reporting pointer artihmetic errors, and memory underruns when we use the IceUtils::Handle<>::dynamicCast operation. I was wondering if this is something you can provide any insigt into.

    Specifically we have an inheritance diagram the looks like:

    class SliceGeneratedClassX;

    with a generic implementation

    class SliceGeneratedClassXImpl:virtual public SliceGeneratedClassX;

    and a further specific implementation

    class SliceGeneratedClassXSpec:virtual public SliceGeneratedClassXImpl;

    We then, from time to time want to cast a SliceGeneratedClassXPtr to a SliceGeneratedClassXSpecPtr, and this is where we get the memory underruns.

    mvh

    Nis

    Sorry, its hard to tell what the issue is. We've never used BoundsChecker, but we have used Purify and it doesn't report any such problem.

    If you can provide a small self-contained example that demonstrates this problem we can look into it.

    Regards, Matthew
  • matthew wrote:
    Sorry, its hard to tell what the issue is. We've never used BoundsChecker, but we have used Purify and it doesn't report any such problem.

    If you can provide a small self-contained example that demonstrates this problem we can look into it.

    I'll see if I can create an example for you.

    Nis