Re: Why does this not fail?
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Wed, 23 Aug 2006 19:39:21 GMT
sgadag@xxxxxxxxx writes:
Even if "a" is NULL in the assignment below, this assignment does not
cause any AV:
SOME_PTR * someVar = (SOME_PTR *) a->b;
What does "AV" mean? I'm guessing it means something like "access
violation", but don't assume that we know that.
It's difficult to tell without seeing the actual code. If you had
posted a complete self-contained program that exhibits the problem, we
might have a chance of helping, but we have no way of knowing what
SOME_PTR, a, and b are.
Most likely you're doing something that invokes undefined behavior,
which can do anything, including quietly giving you some
reasonable-looking result.
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.
- References:
- Why does this not fail?
- From: sgadag
- Why does this not fail?
- Prev by Date: Re: Floating point load-store behaviour.
- Next by Date: Re: A newbie's code
- Previous by thread: Re: Why does this not fail?
- Next by thread: use of control87 and floating point underflow
- Index(es):
Relevant Pages
|