bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: benjamin dot lesage at irisa dot fr
Subject: [Bug gas/10850] New: .lflags wrong end of line detection
Date: 26 Oct 2009 17:22:07 -0000

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]