Results 1 to 3 of 3

Thread: Pointer problems

  1. #1
    Nis Baggesen is offline Registered User
    Join Date
    Aug 2004
    Location
    Aarhus, Denmark
    Posts
    112

    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

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Quote Originally Posted by Nis Baggesen
    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

  3. #3
    Nis Baggesen is offline Registered User
    Join Date
    Aug 2004
    Location
    Aarhus, Denmark
    Posts
    112
    Quote Originally Posted by matthew
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. smart pointer down cast
    By peterlspot in forum Help Center
    Replies: 3
    Last Post: 05-24-2008, 09:37 AM
  2. Smart Pointer for Sequences
    By kalaxy in forum Help Center
    Replies: 3
    Last Post: 02-14-2008, 07:42 PM
  3. Replies: 1
    Last Post: 06-14-2005, 12:44 PM
  4. About the smart pointer.
    By level in forum Help Center
    Replies: 11
    Last Post: 08-04-2004, 08:16 PM
  5. Puzzle on smart pointer
    By soloman817 in forum Help Center
    Replies: 1
    Last Post: 07-13-2004, 05:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •