[ 
https://issues.apache.org/jira/browse/THRIFT-2462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer closed THRIFT-2462.
------------------------------
    Fix Version/s: 0.23.0
         Assignee: Jens Geyer
       Resolution: Cannot Reproduce

The issue has been solved on the meantime by other fixes. New delphi test added 
to validate, netstd follows, but since no problems are expected there either, 
I'll close this for now.

> prevent possible stack overflow due to recursive syntax support
> ---------------------------------------------------------------
>
>                 Key: THRIFT-2462
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2462
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C# - Compiler, Delphi - Compiler
>    Affects Versions: 0.9.2
>            Reporter: Jens Geyer
>            Assignee: Jens Geyer
>            Priority: Major
>              Labels: graph
>             Fix For: 0.23.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {code:title=Test.Thrift}
> namespace * Thrift.Test
> struct Foo {
>   1: Bar bar
> }
> struct Bar {
>   1: Foo foo 
> }
> service ThriftTest
> {
>   i32 testRecursive(1: Foo foo);
> }
> {code}
> {code:title=TestClient.cs}
> var first = new Foo()
> {
>       Bar = new Bar()
>       {
>               Foo = new Foo()
>               {
>                       Bar = new Bar()
>                       {
>                               Foo = null
>                       }
>               }
>       }
> };
> Console.Write("testRecursive(tree)");
> Console.WriteLine(" = {0}", client.testRecursive(first));
> Console.Write("testRecursive(ring)");
> first.Bar.Foo.Bar.Foo = first;  // now let the innermost leaf backpoint to 
> the root node
> Console.WriteLine(" = {0}", client.testRecursive(first));
> {code}
> {code:title=output}
> testRecursive(tree) = 4
> testRecursive(ring)
> Process is terminated due to StackOverflowException.
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to