[YANGTOOLS-528] StackOverflowError on direct or indirect recursive extension definition Created: 12/Oct/15  Updated: 10/Apr/22  Resolved: 19/Oct/16

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

Type: Bug
Reporter: Peter Kajsa 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: 4456

 Description   

Parsing of following yang model by statement parser causes StackOverflowError due to recursive extensions definition.

module foo {
namespace "foo";
prefix foo;
yang-version 1;

extension a

{ foo:b; }

extension b

{ foo:c; }

extension c

{ foo:a; }

extension r

{ foo:r; }

}



 Comments   
Comment by Peter Kajsa [ 13/Oct/15 ]

https://git.opendaylight.org/gerrit/#/c/28300/2

Comment by Robert Varga [ 17/Oct/16 ]

Reopening as the fix has been reverted in BUG-6757. Current implementation will throw an InferenceException when circular dependency is encountered.

This is unconfirmed until we can confirm that recursive extensions are in fact allowed on the netmod mailinglist.

Comment by Robert Varga [ 17/Oct/16 ]

Preliminary patch to resolve this in a hacky way, resulting in fully recursive definition: https://git.opendaylight.org/gerrit/47042

Comment by Robert Varga [ 18/Oct/16 ]

According to https://mailarchive.ietf.org/arch/msg/netmod/03sg0KRQrPZircLr_jtJZWxI_6k this usage is actually used by Tail-F models.

Comment by Robert Varga [ 18/Oct/16 ]

boron: https://git.opendaylight.org/gerrit/47084

Comment by Robert Varga [ 18/Oct/16 ]

Reopening for backport.

Comment by Robert Varga [ 18/Oct/16 ]

beryllium: https://git.opendaylight.org/gerrit/47092

Comment by A H [ 18/Oct/16 ]

A patch was submitted to fix this bug: https://git.opendaylight.org/gerrit/47092

To better assess the impact of this bug and fix, we identified the severity/testing/impact in the comment at this url: https://bugs.opendaylight.org/show_bug.cgi?id=6757#c8

Comment by A H [ 19/Oct/16 ]

Has this bug been verified as fixed in the latest Beryllium SR4 Build 20161019?

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