0

I've got an access violation in my program. I know Windows decodes some states in the address of a pointer (e.g. 0xcccccccc or 0xcdcdcdcd for uninitialized or freed memory, iirc). I couldn't find any docs covering those decodings, a link to them would be much appreciated.

For now I'm specifically looking for the meaning (if any) behind 0x000000000000007F (64bit process).

Timo
  • 9,269
  • 2
  • 28
  • 58
  • 3
    Regarding the first paragraph of your post, [see here](https://stackoverflow.com/questions/127386/in-visual-studio-c-what-are-the-memory-allocation-representations) – Cory Kramer Mar 23 '20 at 11:47
  • 7
    `0x000000000000007F` looks like you tried to read something from a `nullptr`. – Lukas-T Mar 23 '20 at 11:48
  • 2
    actually I doubt that `0x000000000000007F` is a placeholder. Usually bit patterns are chosen that are easy to spot and that are unlikely to appear otherwise, eg `0xDEADBEEF` or the like – 463035818_is_not_an_ai Mar 23 '20 at 11:49
  • @churill oof that would be bad, there is some dynamic marshalling involved on the error side -.- – Timo Mar 23 '20 at 11:51
  • 2
    `0x000000000000007F` does not have any special meaning. Most likely it's a dereferencement of a structure member such as `Foo->bar = 42`, where `Foo` is NULL. But without seeing any code it's hard to tell. – Jabberwocky Mar 23 '20 at 11:58

1 Answers1

1

0x000000000000007F is not any debug bit pattern to my knowledge. I can think of a few likely meanings for the value:

  • It happens to be the largest value representable by signed 8 bit number.
  • It happens to consist of a sequence of zeroes, then a sequence of 1. This is quite typical with bitmasks.
  • In ASCII it is the "Delete" character.
  • It is fairly small number, and therefore quite likely to have meaning for the numerical value.
eerorika
  • 232,697
  • 12
  • 197
  • 326
  • Interesting. I've fixed the code causing that error by now, but now it appears on a different location :/. It's related to managed unmanaged marshalling but I haven't figured it out yet. – Timo Mar 23 '20 at 12:06