Re: Why does this not fail?



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.
.



Relevant Pages

  • RE: Updateing data when closing forms
    ... I'm guessing your close button uses DoCmd>close. ... forces Access to attempt to save the record, and if a violation has occurred, ... will throw up a warning message allowing correction to be made before closing ...
    (microsoft.public.access.forms)
  • Re: i need ebook
    ... Keith Thompson wrote: ... violation of their copyright. ... Chuck F (cbfalconer at maineline dot net) ...
    (comp.lang.c)
  • Re: logcheck regexp for spamassassin
    ... > violation", but I'm guessing it's the latter, and the reason is that ... > create a file in violations.ignore.d containing an appropriate regexp, ...
    (Debian-User)