[YANGTOOLS-536] Omitting the ending '}' in a type statement causes a StackOverflowError Created: 27/Oct/15  Updated: 10/Apr/22  Resolved: 02/Nov/15

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Tom Pantelis Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4538

 Description   

To reproduce: in the mdsal project, go to mdsal/model/ietf/ietf-restconf and do mvn clean. Open src/main/yang/ietf-restconf@2013-10-19.yang. On line 114, remove the ending '}:

typedef revision-identifier {
type string {
pattern '\d

{4}

-\d

{2}-\d{2}

';
} <--- line 114

description ...
}

In your terminal window, set the scrollback size to like 5000 (1000 lines wasn't enough for me). Run mvn. If your window has enough scrollback you should see the StackOverflowError.



 Comments   
Comment by Tom Pantelis [ 28/Oct/15 ]

With the old yang parser you get:

[ERROR] Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:0.7.2-SNAPSHOT:generate-sources (default) on project ietf-restconf: yang-to-sources: Unable to parse yang files from /home/mininet/ODL/lithium/yangtools/model/ietf/ietf-restconf/src/main/yang: Failed to parse yang data: extraneous input 'description' expecting

{'}

', 'pattern', 'length', IDENTIFIER}

Comment by Filip Gregor [ 02/Nov/15 ]

Hi Tom,
We tried in various ways to replicate this bug but we were unable to get StackOverflowError error. Could you please provide us with your error log and/or version information about yang and mdsal.

Comment by Tom Pantelis [ 02/Nov/15 ]

It's not happening now - looks like fixed by https://git.opendaylight.org/gerrit/#/c/29025/. I'll close it.

Generated at Wed Feb 07 20:53:32 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.