bugGNU roff - Bugs: bug #61173, [libgroff] off by one error in...

 
 

bug #61173: [libgroff] off by one error in line numbers reported by device/font file diagnostics

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Thu 16 Sep 2021 10:52:00 PM UTC
   
 
Category:  Core Severity:  3 - Normal
Item Group:  Warning/Suspicious behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 23 Sep 2021 12:14:22 PM UTC, comment #3: 

Re-fixed.


commit b973ff2ca8c9227c234069e6a304f628cf1a163c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Sep 23 11:50:11 2021 +1000

    [libgroff]: Revisit fix for Savannah #61173.

    * src/libs/libgroff/font.cpp (text_file::text_file): Restore setting of
      `lineno` member variable to `0` in constructor initializer list,
      but...

      (text_file::next_line): ...unconditionally increment it every time
      through this member function's outer loop.


G. Branden Robinson <gbranden>
Group administrator
Thu 23 Sep 2021 01:39:00 AM UTC, comment #2: 

Reopening.  I moved the lump in the carpet.

The diagnostics for invalid characters were corrected by my change of 17 September, but it threw off the reported line number diagnostics for every other kind of complaint.

I have a further fix in preparation.

G. Branden Robinson <gbranden>
Group administrator
Fri 17 Sep 2021 09:36:04 AM UTC, comment #1: 


commit 767f63edd6fb8946f3519744d9389bf3c0957396
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Sep 17 08:56:17 2021 +1000

    [libgroff]: Fix off-by-one error in diagnostics.

    [libgroff]: Fix off-by-one error in font and device description file
    reader diagnostics.

    * src/libs/libgroff/font.cpp (text_file::text_file): All text files
      begin with line 1, not line 0.

    Fixes <https://savannah.gnu.org/bugs/?61173>.


G. Branden Robinson <gbranden>
Group administrator
Thu 16 Sep 2021 10:52:00 PM UTC, original submission:  

I took the devut8 DESC and R files and damaged them by inserting some characters with the eighth bit set.


$ groff -T utf8 -F ./build/font
groff:./build/font/devutf8/DESC:6: invalid input character code '129'
./build/font/devutf8/DESC:6: error: invalid input character code '129'
./build/font/devutf8/R:0: error: invalid input character code '130'
$ sed -n '6,7p' ./build/font/devutf8/DESC | xxd
00000000: 666f 6e74 7320 3420 5220 4920 4220 4249  fonts 4 R I B BI
00000010: 0ac2 8174 636f 6d6d 616e 640a            ...tcommand.
$ sed -n '1p' ./build/font/devutf8/R | xxd
00000000: c282 6e61 6d65 2052 0a                   ..name R.


G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-09-23 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2021-09-23 gbranden StatusFixed In Progress
        Open/ClosedClosed Open
    2021-09-17 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code