Opened 5 years ago

Last modified 5 years ago

#5949 closed defect

SimpleModelicaParser does stack overflow on huge arrays — at Initial Version

Reported by: Adrian Pop Owned by: Martin Sjölund
Priority: high Milestone: 1.16.0
Component: Parser Version:
Keywords: Cc:

Description

Basically it does diffModelicaFileListings on a file with a *HUGE* diagram annotation.

This consumes stack until the end bracket, it should not if possible:

  elseif id==TokenId.LBRACK then
    (tokens, tree) := consume(tokens, tree);
    (tokens, tree) := expression_list(tokens, tree);
    while true loop
      (tokens, tree, b) := scanOpt(tokens, tree, TokenId.SEMICOLON);
      if not b then
        break;
      end if;
      (tokens, tree) := expression_list(tokens, tree);
    end while;
    (tokens, tree) := scan(tokens, tree, TokenId.RBRACK);

Change History (1)

by Adrian Pop, 5 years ago

Attachment: BadClassDiagram.mo added
Note: See TracTickets for help on using tickets.