bugTiny C Compiler - Bugs: bug #61373, tcc hangs on static assert with...

 
 

bug #61373: tcc hangs on static assert with empty string

Submitter:  Gabriel Ravier <gabrielravier>
Submitted:  Sun 24 Oct 2021 01:20:58 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 29 Nov 2022 07:01:36 PM UTC, comment #1: 

Just fixed on:
git clone git://repo.or.cz/tinycc.git

Herman ten Brugge <hermantb>
Sun 24 Oct 2021 01:20:58 PM UTC, original submission:  

_Static_assert(0, "");

On current trunk this code makes tcc hang forever.

This seems to be caused by the fact that `cstr_realloc` deals badly with a very high `new_size` (getting stuck in an infinite loop), along with the fact that `cstr_vprintf` seems to deal with the case where the appended formatted string is of size 0 badly (also seemingly getting stuck in its own infinite loop).

Gabriel Ravier <gabrielravier>

 

(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 hermantb (Posted a comment)
  • -email is unavailable- added by gabrielravier (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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-081f.
    Corresponding source code