bugGNU roff - Bugs: bug #64892, [tbl] alloc-dealloc-mismatch with...

 
 

bug #64892: [tbl] alloc-dealloc-mismatch with "-fsanitize=address"

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Mon 13 Nov 2023 11:47:02 PM UTC
   
 
Category:  Preprocessor tbl Severity:  2 - Minor
Item Group:  Lint Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 18 Nov 2023 07:06:45 PM UTC, comment #2: 

  "strcpy.3" is the same as "strcpy(3)".

  If other man pages are used, that do not use "tbl",
a memory leak is reported.

Bjarni Ingi Gislason <bjarniig>
Sat 18 Nov 2023 06:31:14 AM UTC, comment #1: 

Please supply the strcpy.3 file you used to produce this output.

G. Branden Robinson <gbranden>
Group administrator
Mon 13 Nov 2023 11:47:02 PM UTC, original submission:  

Subject: tbl: alloc-dealloc-mismatch with "-fsanitize=address"

  The software was compiled with gcc ((Debian 13.2.0-5) 13.2.0) with
"-fsanitize=address" giving warnings, and when running "test-groff -t
-man -ww -z strcpy.3""


=================================================================
==91730==ERROR: AddressSanitizer: alloc-dealloc-mismatch (malloc vs operator delete []) on 0x604000000010
    #0 0x7f4c462d9c68 in operator delete[](void*) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:155
    #1 0x55e441522d45 in block_entry::~block_entry() (/home/bg/git/groff/build/tbl+0x23d45) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #2 0x55e441543742 in left_block_entry::~left_block_entry() (/home/bg/git/groff/build/tbl+0x44742) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #3 0x55e441526ca1 in table::~table() (/home/bg/git/groff/build/tbl+0x27ca1) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #4 0x55e44151e161 in process_table(table_input&) (/home/bg/git/groff/build/tbl+0x1f161) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #5 0x55e44151e970 in process_input_file(_IO_FILE*) (/home/bg/git/groff/build/tbl+0x1f970) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #6 0x55e44150f31d in main (/home/bg/git/groff/build/tbl+0x1031d) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #7 0x7f4c45c456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #8 0x7f4c45c45784 in __libc_start_main_impl ../csu/libc-start.c:360
    #9 0x55e44150fb60 in _start (/home/bg/git/groff/build/tbl+0x10b60) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)

0x604000000010 is located 0 bytes inside of 45-byte region [0x604000000010,0x60400000003d)
allocated by thread T0 here:
    #0 0x7f4c462d85bf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x55e44154cfa3 in string::extract() const (/home/bg/git/groff/build/tbl+0x4dfa3) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #2 0x55e441529ad1 in table::add_entry(int, int, string const&, entry_format const*, char const*, int) (/home/bg/git/groff/build/tbl+0x2aad1) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #3 0x55e44151ab34 in process_data(table_input&, format*, options*) (/home/bg/git/groff/build/tbl+0x1bb34) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #4 0x55e44151e141 in process_table(table_input&) (/home/bg/git/groff/build/tbl+0x1f141) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #5 0x55e44151e970 in process_input_file(_IO_FILE*) (/home/bg/git/groff/build/tbl+0x1f970) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #6 0x55e44150f31d in main (/home/bg/git/groff/build/tbl+0x1031d) (BuildId: 7ab334cfd6181c9ca70b997de2ca11b5dc765cd7)
    #7 0x7f4c45c456c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: alloc-dealloc-mismatch ../../../../src/libsanitizer/asan/asan_new_delete.cpp:155 in operator delete[](void*)
==91730==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==91730==ABORTING
troff: warning: expected numeric expression, got end of input
troff: error: automatically ending diversion '3table' on exit
troff: error: can't continue page ejection because vertical position traps disabled
troff: error: can't continue page ejection because vertical position traps disabled

[...]


Bjarni Ingi Gislason <bjarniig>

 

(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 (Posted a comment)
  • -email is unavailable- added by bjarniig (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-11-18 gbranden Severity3 - Normal 2 - Minor
        Item GroupWarning/Suspicious behaviour Lint
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code