Loop question

Dale Johannesen dalej@apple.com
Thu Jan 3 17:29:00 GMT 2002


I have the following situation (from one of the Specmarks, unfortunately):
scan_loop is called on an inner loop.  It finds some loads to pull outside
the loop, and puts them within the outer loop.  New uids are created for
these.  But uid_luid is not realloc'd or updated, so when scan_loop is
called on the outer loop, there are out-of-bounds array references.  In
the case in question one of these causes a fault.

And the fix would be to realloc and recompute uid_luid after each call to
scan_loop that is not for an outermost loop.  This is not speedy, but we
can't have it crashing.  Am I on the right track?



More information about the Gcc mailing list