This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] .bundle_align_mode
On Fri, Mar 09, 2012 at 10:31:02AM -0800, Roland McGrath wrote:
> On Thu, Mar 8, 2012 at 9:52 PM, Alan Modra <email@example.com> wrote:
> > set debug_memory = 1, makes chunk size smaller so more likely to hit
> > these bugs. Also try assembling with a listing turned on.
> Thanks for the tip. But in fact debug_memory=1 makes the bug disappear!
> Anyway, I already have a reliable reproducer, so that's not a problem.
> But I'm still at a loss as to why an extra frag makes the code go wrong,
> so I'd greatly appreciate any insight on how that might be happening.
It looks like finish_bundle expects to see an alignment frag, but that
won't always be the case. For instance in the following
+ bundle_lock_frchain = frchain_now;
+ bundle_lock_frag = frag_now;
+ bundle_lock_start_offset = pending_bundle_size (frag_now, 0);
+ frag_align_code (0, 0);
frag_align_code might need to generate a new frag, so bundle_lock_frag
gets finised off as rs_fill and your alignment frag is the next frag.
Australia Development Lab, IBM