Segmentation fault?

This is a discussion on Segmentation fault? within the C++ Programming forums, part of the General Programming Boards category; Hi everyone, During debugging, I find that the address of a raw pointer changes although I don't (re-)allocate anything. Is ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    1

    Segmentation fault?

    Hi everyone,

    During debugging, I find that the address of a raw pointer changes although I don't (re-)allocate anything. Is this typically due to a segmentation error or could this be something else ?

    Thanks !

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    It won't be a segmentation fault. It's probably caused by a buffer overflow, which also often causes segmentation fault. That is, you probably write more data to a buffer than the buffer has space for.

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    2,040
    Well yes. Either you are changing the pointers even though you don't see where, or something else in your program is accessing memory in an undefined and dangerous way.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why am I getting segmentation fault on this?
    By arya6000 in forum C++ Programming
    Replies: 6
    Last Post: 10-12-2008, 06:32 AM
  2. Segmentation fault
    By bennyandthejets in forum C++ Programming
    Replies: 7
    Last Post: 09-07-2005, 05:04 PM
  3. Segmentation fault
    By NoUse in forum C Programming
    Replies: 4
    Last Post: 03-26-2005, 02:29 PM
  4. Locating A Segmentation Fault
    By Stack Overflow in forum C Programming
    Replies: 12
    Last Post: 12-14-2004, 12:33 PM
  5. Segmentation fault...
    By alvifarooq in forum C++ Programming
    Replies: 14
    Last Post: 09-26-2004, 12:53 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21