Re: RFA: Fix potential NULL pointer dereference

2011-11-03 Thread Jakub Jelinek
On Thu, Nov 03, 2011 at 10:21:54AM -0600, Jeff Law wrote: > Well, if we're going to go that direction, I'd just say define > VEC_BASE to (&(P)->base) for non-checking rather than mess with the > NONNULL variant. Is there some reason why we don't do that? Because the VEC_BASE macro is also used fo

Re: RFA: Fix potential NULL pointer dereference

2011-11-03 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/03/11 01:51, Jakub Jelinek wrote: > Hi! > > On Wed, Nov 02, 2011 at 09:28:52PM -0600, Jeff Law wrote: >> This was caught by some prototype code to warn for potential >> NULL pointer dereferences. > > Clearly we have a set of vec.h operations th

Re: RFA: Fix potential NULL pointer dereference

2011-11-03 Thread Jakub Jelinek
Hi! On Wed, Nov 02, 2011 at 09:28:52PM -0600, Jeff Law wrote: > This was caught by some prototype code to warn for potential NULL > pointer dereferences. Clearly we have a set of vec.h operations that require the vector to be non-NULL. Seems it is last, index (which already have such check in the

RFA: Fix potential NULL pointer dereference

2011-11-02 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This was caught by some prototype code to warn for potential NULL pointer dereferences. Let's look at vt_equate_reg_base_value from alias.c: void vt_equate_reg_base_value (const_rtx reg1, const_rtx reg2) { VEC_replace (rtx, reg_base_value, REGNO