This is the mail archive of the
mailing list for the GCC project.
Re: [patch] tree-ssa-dom.c: Use VEC(vrp_element_p,heap) instead ofVARRAY.
- From: Jeffrey A Law <law at redhat dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, nathan at codesourcery dot com
- Date: Fri, 06 May 2005 10:47:34 -0600
- Subject: Re: [patch] tree-ssa-dom.c: Use VEC(vrp_element_p,heap) instead ofVARRAY.
- References: <email@example.com> <firstname.lastname@example.org> <email@example.com>
- Reply-to: law at redhat dot com
On Tue, 2005-05-03 at 16:31 -0400, Kazu Hirata wrote:
> Hi Jeff,
> > This doesn't look right to me. If you read the comments earlier in the
> > code it states that two tests must be performed. First you have to
> > verify the existance of the varray (or VEC) then you have to look at
> > the number of active entries.
> > Your change will cause a segfault in the first case as *vrp_records
> > would be dereferencing a null pointer.
> > So my question to you would be is there some reason why it's no longer
> > possible for vrp_records to be null?
> *vrp_records may be NULL, but VEC_length (vrp_element_p, NULL)
> evaluates to 0 because VEC_length is implemented as
You're misunderstanding me. I'm referring to vrp_records being null,
If vrp_records is null, then *vrp_records is going to segfault.