[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Konqueror problem -- this one is worse :-(
From: Kuba Ober <kuba () mareimbrium ! org>
Date: 2002-11-19 13:25:24
[Download RAW message or body]
On sobota 16 listopad 2002 01:30 pm, Harri Porten wrote:
> On Sat, 16 Nov 2002, CP Hennessy wrote:
> > > #9 0x445cd291 in KJS::AssignNode::value(KJS::ExecState*) const (
> > > this=0x8309e58, exec=0xbfffe170) at nodes.cpp:1535
> >
> > Actually here the code looks like:
> > v = expr->value(exec);
> > but is it possible for "expr" to be a NULL pointer?
>
> No. The parser shouldn't allow this.
Maybe the parser returns a NULL expr (does it make any sense? probably no) or
it just has a bug.
In any event, I presume adding a few assert()s here and there may help
eradicate lingering bugs there.
I know that a few times even things like this:
void foo(type & bar) {
assert(&bar != 0);
}
could trigger (they did in my sloppy code), so it's not a bad idea to exclude
possibility of a null address whenever it won't be safely handled. With my
luck (lack thereof at times), I always put asserts whenever the code wouldn't
be able to handle certain error condition, or whenever something wouldn't
make sense that way. It usually helps a lot.
Cheers, Kuba Ober
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic