public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alex Coplan <Alex.Coplan@arm.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Alan Modra <amodra@gmail.com>,
	"binutils@sourceware.org" <binutils@sourceware.org>
Subject: RE: [PATCH] gas: Fix internal error on long local labels
Date: Tue, 1 Sep 2020 10:43:33 +0000	[thread overview]
Message-ID: <VI1PR08MB4029D040029C061D574A1529EA2E0@VI1PR08MB4029.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <CAMe9rOr-z+QONeQXjQm6uN6w9By76ZOMJm4v57TMn0DoXe=K3w@mail.gmail.com>

> -----Original Message-----
> From: H.J. Lu <hjl.tools@gmail.com>
> Sent: 17 August 2020 18:35
> To: Alex Coplan <Alex.Coplan@arm.com>
> Cc: Alan Modra <amodra@gmail.com>; binutils@sourceware.org
> Subject: Re: [PATCH] gas: Fix internal error on long local labels
> 
> On Mon, Aug 17, 2020 at 10:22 AM Alex Coplan <Alex.Coplan@arm.com> wrote:
> >
> > Thanks for the fix, H.J.
> >
> > This has now been on master for 10 days. I've tested the original
> patch,
> > together with this fix, on the 2.35 branch and it looks good.
> >
> > OK to backport to 2.35 branch?

Ping?

> >
> > If so, should the backport squash these two commits together or
> > cherry-pick them separately?
> 
> When you do backport, you should backport 2 commits together with
> a single commit.

Thanks for clarifying.

> 
> > Cheers,
> > Alex
> >
> > > -----Original Message-----
> > > From: H.J. Lu <hjl.tools@gmail.com>
> > > Sent: 07 August 2020 14:44
> > > To: Alex Coplan <Alex.Coplan@arm.com>
> > > Cc: Alan Modra <amodra@gmail.com>; binutils@sourceware.org
> > > Subject: Re: [PATCH] gas: Fix internal error on long local labels
> > >
> > > On Thu, Aug 6, 2020 at 9:49 AM Alex Coplan <Alex.Coplan@arm.com>
> wrote:
> > > >
> > > > > -----Original Message-----
> > > > > From: Alan Modra <amodra@gmail.com>
> > > > > Sent: 06 August 2020 14:56
> > > > > To: Alex Coplan <Alex.Coplan@arm.com>
> > > > > Cc: binutils@sourceware.org
> > > > > Subject: Re: [PATCH] gas: Fix internal error on long local labels
> > > > >
> > > > > On Wed, Aug 05, 2020 at 02:51:05PM +0100, Alex Coplan wrote:
> > > > > >     * read.c (read_a_source_file): Use long for local labels,
> > > detect
> > > > > >     overflow and raise an error for overly-long labels.
> > > > > >     * testsuite/gas/all/gas.exp: Add local-label-overflow test.
> > > > > >     * testsuite/gas/all/local-label-overflow.d: New test.
> > > > > >     * testsuite/gas/all/local-label-overflow.l: Error output.
> > > > > >     * testsuite/gas/all/local-label-overflow.s: Input.
> > > > >
> > > > > OK, but fix the following nits please.
> > > >
> > > > Thanks. Pushed to master with nits fixed as
> > > > d27aad4ec307d91a6b9056127c6c248044391d7f.
> > >
> > > The test failed on 32-bit hosts:
> > >
> > > ./as-new -o x.o
> > > /export/gnu/import/git/sources/binutils-
> gdb/gas/testsuite/gas/all/local-
> > > label-overflow.s
> > > /export/gnu/import/git/sources/binutils-
> gdb/gas/testsuite/gas/all/local-
> > > label-overflow.s:
> > > Assembler messages:
> > > /export/gnu/import/git/sources/binutils-
> gdb/gas/testsuite/gas/all/local-
> > > label-overflow.s:1:
> > > Error: local label too large near 888888888888888888888888888:
> > >
> > > /export/gnu/import/git/sources/binutils-
> gdb/gas/testsuite/gas/all/local-
> > > label-overflow.s:1:
> > > Error: local label too large near 888888888888888888:
> > >
> > > /export/gnu/import/git/sources/binutils-
> gdb/gas/testsuite/gas/all/local-
> > > label-overflow.s:1:
> > > Error: local label too large near 888888888:
> > >
> > > I am checking in this to fix it:
> > >
> > > diff --git a/gas/read.c b/gas/read.c
> > > index bd896580e5..cb41cc0685 100644
> > > --- a/gas/read.c
> > > +++ b/gas/read.c
> > > @@ -1227,7 +1227,10 @@ read_a_source_file (const char *name)
> > >
> > >          /* Overflow: stop processing the label.  */
> > >          if (temp == -1)
> > > -     continue;
> > > +     {
> > > +       ignore_rest_of_line ();
> > > +       continue;
> > > +     }
> > >
> > >          if (LOCAL_LABELS_DOLLAR
> > >         && *input_line_pointer == '$'
> > >
> > > > Is it worth backporting?
> > > >
> > > > Alex
> > >
> > >
> > >
> > > --
> > > H.J.
> 
> 
> 
> --
> H.J.

      reply	other threads:[~2020-09-01 10:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05 13:51 Alex Coplan
2020-08-06 13:56 ` Alan Modra
2020-08-06 16:48   ` Alex Coplan
2020-08-07 13:44     ` H.J. Lu
2020-08-17 17:22       ` Alex Coplan
2020-08-17 17:34         ` H.J. Lu
2020-09-01 10:43           ` Alex Coplan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR08MB4029D040029C061D574A1529EA2E0@VI1PR08MB4029.eurprd08.prod.outlook.com \
    --to=alex.coplan@arm.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).