Thread: Question on void pointers - C / C++ programming

  1. #1
    Registered User
    Join Date
    Dec 2015
    Posts
    2

    Question on void pointers - C / C++ programming

    Hi, All.
    I am posting this same thread in C sub-forum.
    I am working with a big app, which has been originally developed on C (but I suspect it has C++ modules also).
    I do not know which kind of tools the Development team is using to compile and debug the app. (The app is working in UNIX, Linux, Windows, z/OS and other platforms). I apologize in advance for not providing more details.
    The problems are:
    1) I am finding inconsistent data in some containers.
    2) I am finding also garbage data in some containers.
    Reviewing the code, I have found several (or many) void pointers typecasting, from complex data structures to other complex data structures.
    And I suspect here can be the possible the root cause of the mentioned issues.
    Of course, we all know the problems related with void pointers typecasting; and the difference of this problems both in C and C++ programming.
    But I feel I need to go deeper to give a strong backboard to my research to support it in front of my managers (I cannot just say: "Look, read this post"; or even: "Look, read the standard". I need some kind of previous investigation which someone might already have done).
    So:
    - Can anyone suggest me any document (book or authoritative documentation) where I can go deeply on void pointers typecasting issues?
    - Can anyone suggest me any document (book or authoritative documentation) where I can find testing and proved solutions for the mentioned issues?
    Any help would be much appreciate!
    Thanks a lot in advance!
    Pablo.

  2. #2
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Valgrind

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question on void pointers - C programming
    By pablocamacho in forum C Programming
    Replies: 1
    Last Post: 12-01-2015, 08:30 PM
  2. Void Pointers
    By capricorn in forum C Programming
    Replies: 3
    Last Post: 12-16-2010, 03:00 AM
  3. what are void pointers?
    By Masterx in forum C++ Programming
    Replies: 9
    Last Post: 11-07-2009, 11:05 AM
  4. void* pointers
    By Drogin in forum C Programming
    Replies: 6
    Last Post: 09-04-2009, 11:04 AM
  5. void pointers
    By jverkoey in forum C++ Programming
    Replies: 2
    Last Post: 08-13-2003, 06:19 PM

Tags for this Thread