bug-groff
[Top][All Lists]
Advanced

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

[bug #55331] src/utils/hpftodit/hpftodit.cpp:577:Wmismatched-new-delete


From: Bertrand Garrigues
Subject: [bug #55331] src/utils/hpftodit/hpftodit.cpp:577:Wmismatched-new-delete
Date: Sat, 17 Oct 2020 19:55:41 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:80.0) Gecko/20100101 Firefox/80.0

Update of bug #55331 (project groff):

                  Status:               Confirmed => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #2:

I've never used 'hpftodit' either; I managed to test as follows:
'font/devlj4/generate/Makefile' instructs to do:

  cd font/devlj4/
  make -f generate/Makefile

to re-generate the fonts.  This is broken has it expects tfm files to be
installed in /usr/local/lib/groff-lj4.  So I've downloaded
'ftp://ftp.hp.com/pub/faxes/software/tfmlj4p.exe' mentioned in the same
Makefile, extracted the tfmlj4p.exe with unzip, copied a tfm file
(9NB00086.TFM) in font/devlj4 and then done this:

   hpftodit 9NB00086.TFM generate/text.map TR

If I launch this command with valgrind, the following error is detected:

==12026== Mismatched free() / delete / delete []
==12026==    at 0x483C08B: operator delete(void*, unsigned long)
(vg_replace_malloc.c:593)
==12026==    by 0x12AF35: output_font_name (hpftodit.cpp:577)
==12026==    by 0x12AF35: main (hpftodit.cpp:362)
==12026==  Address 0x4ea6d10 is 0 bytes inside a block of size 17 alloc'd
==12026==    at 0x483B50F: operator new[](unsigned long)
(vg_replace_malloc.c:431)
==12026==    by 0x12AE60: output_font_name (hpftodit.cpp:558)
==12026==    by 0x12AE60: main (hpftodit.cpp:362)
==12026== 

After I've applied the fix, this error no longer appears. The generated file
is also indentical.  This is sufficient, I think, push the commit (commited on
0d4df60290dc22e3975c803833219cd853b0827e).




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55331>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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