This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Loop question


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]