[Bug gas/10850] New: .lflags wrong end of line detection

View: New views
4 Messages — Rating Filter:   Alert me  

[Bug gas/10850] New: .lflags wrong end of line detection

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Upon a .lflags in the .s file, the function listing_flags in gas/listing.c (http://sourceware.org/cgi-
bin/cvsweb.cgi/src/gas/listing.c?cvsroot=src) does not detect correctly the end of line:
void
listing_flags (int ignore ATTRIBUTE_UNUSED)
{
  while ((*input_line_pointer++) && (*input_line_pointer != '\n'))
    input_line_pointer++;

}

a correct version should be:
void
listing_flags (int ignore ATTRIBUTE_UNUSED)
{
  while ((*input_line_pointer) && (*input_line_pointer != '\n'))
    input_line_pointer++;
 input_line_pointer++;
}

The actual problem is that the input_line_pointer is increased twice, possibly missing the end of line
character. So the directive skipping (normal behavior for the .lflags) might alter other instructions as it
will have to "find" a '\n' somewhere else.

--
           Summary: .lflags wrong end of line detection
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gas
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: benjamin dot lesage at irisa dot fr
                CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10850

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gas/10850] .lflags wrong end of line detection

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-10-26 23:57 -------
Subject: Bug 10850

CVSROOT: /cvs/src
Module name: src
Changes by: amodra@... 2009-10-26 23:57:43

Modified files:
        gas            : ChangeLog listing.c listing.h read.c

Log message:
        PR gas/10850
        * listing.c (listing_flags): Delete.
        * listing.h: Likewise.
        * read.c (potable <lflags>): Call s_ignore.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=src&r1=1.3997&r2=1.3998
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/listing.c.diff?cvsroot=src&r1=1.43&r2=1.44
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/listing.h.diff?cvsroot=src&r1=1.8&r2=1.9
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/read.c.diff?cvsroot=src&r1=1.158&r2=1.159



--


http://sourceware.org/bugzilla/show_bug.cgi?id=10850

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gas/10850] .lflags wrong end of line detection

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From amodra at bigpond dot net dot au  2009-10-27 00:00 -------
Fixed.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=10850

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug gas/10850] .lflags wrong end of line detection

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From benjamin dot lesage at irisa dot fr  2009-10-27 07:52 -------
Thank you gentleman.

--


http://sourceware.org/bugzilla/show_bug.cgi?id=10850

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils