You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/08/04 13:09:45 UTC
[GitHub] [incubator-tvm] 12101111 commented on issue #6205: [Rust] unsafe transmute cause runtime error
12101111 commented on issue #6205:
URL: https://github.com/apache/incubator-tvm/issues/6205#issuecomment-668586211
There is another error:
In `ArgValue` 's `to_tvm_value()` ( inside `TVMPODValue!` macro).
```rust
match &self {
Bytes(val) => {
(TVMValue { v_handle: val as *const _ as *mut c_void }, TVMArgTypeCode_kTVMBytes)
}
Str(val) => { (TVMValue { v_handle: val.as_ptr() as *mut c_void }, TVMArgTypeCode_kTVMStr) }
}
```
The type of `val` is `&&ffi::TVMByteArray`, so the pointer return is a invalid dangling pointer.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org