Why does this not fail?
- From: sgadag@xxxxxxxxx
- Date: 23 Aug 2006 11:02:16 -0700
Even if "a" is NULL in the assignment below, this assignment does not
cause any AV:
SOME_PTR * someVar = (SOME_PTR *) a->b;
But something like this will cause an AV because "someVar" is NULL:
if (someVar->someType == 1)
{
}
Why does the first assignment not cause any access violation?
.
- Follow-Ups:
- Re: Why does this not fail?
- From: Keith Thompson
- Re: Why does this not fail?
- From: Ancient_Hacker
- Re: Why does this not fail?
- From: Ben Pfaff
- Re: Why does this not fail?
- From: Walter Roberson
- Re: Why does this not fail?
- Prev by Date: Floating point load-store behaviour.
- Next by Date: Re: weird code.
- Previous by thread: Floating point load-store behaviour.
- Next by thread: Re: Why does this not fail?
- Index(es):
Relevant Pages
|