tp-nan opened a new issue, #322:
URL: https://github.com/apache/tvm-ffi/issues/322

   
   ```bash
   !!!!!!! Segfault encountered !!!!!!!
     File "./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c", line 
0, in 0x00007f434b2dd51f
   
   Segmentation fault (core dumped)
   ```
   
   Step to reproduce 
    ```python
   import tvm_ffi
   mod = tvm_ffi.cpp.load_inline(name='hello',
                             cpp_sources="""
   tvm::ffi::Any example_func() {
       // return 1;
       return tvm::ffi::Array<float>({1.0,2.0,3.0});
   }""",
                                 functions=['example_func'])
   result = mod.example_func()
   
   print(f'result={result} type={type(result)} mod = {mod}')
   # del result
   ```
   Uncommenting `return 1`; or  `del result` will avoid this issue. 
   
   Looking at the source code, Array is a subclass of ObjectRef. Is `del 
result` required by design?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to