Erik created THRIFT-5664:
----------------------------

             Summary: fairly simple .thrift service call in rust , attempts to 
allocate too much memory and crashes
                 Key: THRIFT-5664
                 URL: https://issues.apache.org/jira/browse/THRIFT-5664
             Project: Thrift
          Issue Type: Bug
          Components: Rust - Compiler
    Affects Versions: 0.16.0
            Reporter: Erik


A fairly small simple .thrift file of mine... when used with RUST on the server 
side.. seems to crash spectacularly if called via Python client... 

thread - 
[https://users.rust-lang.org/t/first-rust-thrift-server-crashing-on-returning-i32/83271/2]

.thrift file

{code:java}
namespace java com.jrgemcp.twsapithrift
namespace cpp twsapithrift

exception IBSAPIException {
  1: i32 error_code,
  2: string message
}


service ibrokers {

    i32 ping() throws (1:IBSAPIException error),

    list<string> ib_status() throws (1:IBSAPIException error)
}
{code}

The Server Handler Call


{code:rust}
    fn handle_ping(&self) -> thrift::Result<i32> {
        let ping_val: thrift::Result<i32> = Ok(0);
        ping_val
    }
{code}


Error coming from Rust built server


{code:rust}
binding to 127.0.0.1:9090
memory allocation of 18446744071562133505 bytes failed
Aborted (core dumped)
{code}


Any ideas here?



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

Reply via email to