[INFO] fetching crate ort-candle 0.3.0+0.9.2... [INFO] testing ort-candle-0.3.0+0.9.2 against master#562dee4820c458d823175268e41601d4c060588a for pr-154210-2 [INFO] extracting crate ort-candle 0.3.0+0.9.2 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate ort-candle 0.3.0+0.9.2 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate ort-candle 0.3.0+0.9.2 [INFO] tweaked toml for crates.io crate ort-candle 0.3.0+0.9.2 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate ort-candle 0.3.0+0.9.2 on toolchain 562dee4820c458d823175268e41601d4c060588a [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate ort-candle 0.3.0+0.9.2 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded prost-build v0.14.3 [INFO] [stderr] Downloaded gemm-f32 v0.19.0 [INFO] [stderr] Downloaded gemm-c32 v0.19.0 [INFO] [stderr] Downloaded gemm-c64 v0.19.0 [INFO] [stderr] Downloaded gemm-f16 v0.19.0 [INFO] [stderr] Downloaded float8 v0.6.0 [INFO] [stderr] Downloaded gemm-common v0.19.0 [INFO] [stderr] Downloaded gemm v0.19.0 [INFO] [stderr] Downloaded pulp-wasm-simd-flag v0.1.0 [INFO] [stderr] Downloaded gemm-f64 v0.19.0 [INFO] [stderr] Downloaded candle-onnx v0.9.2 [INFO] [stderr] Downloaded safetensors v0.7.0 [INFO] [stderr] Downloaded candle-nn v0.9.2 [INFO] [stderr] Downloaded typed-path v0.12.2 [INFO] [stderr] Downloaded ort v2.0.0-rc.12 [INFO] [stderr] Downloaded candle-core v0.9.2 [INFO] [stderr] Downloaded pulp v0.22.2 [INFO] [stderr] Downloaded ndarray v0.17.1 [INFO] [stderr] Downloaded ort-sys v2.0.0-rc.12 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 1c89effe967b727ff97fd0daf4f1c706840284f4ce2197441c2189ba6a0fdbfa [INFO] running `Command { std: "docker" "start" "-a" "1c89effe967b727ff97fd0daf4f1c706840284f4ce2197441c2189ba6a0fdbfa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1c89effe967b727ff97fd0daf4f1c706840284f4ce2197441c2189ba6a0fdbfa", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1c89effe967b727ff97fd0daf4f1c706840284f4ce2197441c2189ba6a0fdbfa", kill_on_drop: false }` [INFO] [stdout] 1c89effe967b727ff97fd0daf4f1c706840284f4ce2197441c2189ba6a0fdbfa [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ce1fccc7059945631a5287f8b49bc05e8ec77307a207cfc00d95df0646d06d00 [INFO] running `Command { std: "docker" "start" "-a" "ce1fccc7059945631a5287f8b49bc05e8ec77307a207cfc00d95df0646d06d00", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling cfg-if v1.0.1 [INFO] [stderr] Compiling libc v0.2.174 [INFO] [stderr] Compiling libm v0.2.15 [INFO] [stderr] Compiling zerocopy v0.8.26 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling pulp v0.22.2 [INFO] [stderr] Compiling bitflags v2.9.1 [INFO] [stderr] Compiling rayon-core v1.12.1 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Compiling raw-cpuid v11.5.0 [INFO] [stderr] Compiling pulp-wasm-simd-flag v0.1.0 [INFO] [stderr] Compiling reborrow v0.5.5 [INFO] [stderr] Compiling anyhow v1.0.98 [INFO] [stderr] Compiling seq-macro v0.3.6 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling rayon v1.10.0 [INFO] [stderr] Compiling syn v2.0.104 [INFO] [stderr] Compiling rand_core v0.9.3 [INFO] [stderr] Compiling itertools v0.12.1 [INFO] [stderr] Compiling bytes v1.10.1 [INFO] [stderr] Compiling foldhash v0.1.5 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Compiling hashbrown v0.15.4 [INFO] [stderr] Compiling ppv-lite86 v0.2.21 [INFO] [stderr] Compiling rand_chacha v0.9.0 [INFO] [stderr] Compiling regex-syntax v0.8.5 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Compiling linux-raw-sys v0.9.4 [INFO] [stderr] Compiling memchr v2.7.5 [INFO] [stderr] Compiling rand v0.9.2 [INFO] [stderr] Compiling crc32fast v1.5.0 [INFO] [stderr] Compiling prettyplease v0.2.35 [INFO] [stderr] Compiling indexmap v2.9.0 [INFO] [stderr] Compiling stable_deref_trait v1.2.0 [INFO] [stderr] Compiling fastrand v2.3.0 [INFO] [stderr] Compiling rand_distr v0.5.1 [INFO] [stderr] Compiling fixedbitset v0.5.7 [INFO] [stderr] Compiling hashbrown v0.16.1 [INFO] [stderr] Compiling regex-automata v0.4.9 [INFO] [stderr] Compiling petgraph v0.8.3 [INFO] [stderr] Compiling typed-path v0.12.2 [INFO] [stderr] Compiling multimap v0.10.1 [INFO] [stderr] Compiling log v0.4.27 [INFO] [stderr] Compiling memmap2 v0.9.5 [INFO] [stderr] Compiling num_cpus v1.17.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling tempfile v3.20.0 [INFO] [stderr] Compiling zip v7.2.0 [INFO] [stderr] Compiling ort-sys v2.0.0-rc.12 [INFO] [stderr] Compiling regex v1.11.1 [INFO] [stderr] Compiling bytemuck_derive v1.9.3 [INFO] [stderr] Compiling prost-derive v0.14.3 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling zerofrom-derive v0.1.6 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling yoke-derive v0.8.1 [INFO] [stderr] Compiling thiserror v2.0.18 [INFO] [stderr] Compiling bytemuck v1.23.1 [INFO] [stderr] Compiling zerofrom v0.1.6 [INFO] [stderr] Compiling yoke v0.8.1 [INFO] [stderr] Compiling half v2.6.0 [INFO] [stderr] Compiling num-complex v0.4.6 [INFO] [stderr] Compiling dyn-stack v0.13.0 [INFO] [stderr] Compiling prost v0.14.3 [INFO] [stderr] Compiling float8 v0.6.0 [INFO] [stderr] Compiling prost-types v0.14.3 [INFO] [stderr] Compiling prost-build v0.14.3 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling candle-onnx v0.9.2 [INFO] [stderr] Compiling safetensors v0.7.0 [INFO] [stderr] Compiling gemm-common v0.19.0 [INFO] [stderr] Compiling gemm-f32 v0.19.0 [INFO] [stderr] Compiling gemm-f64 v0.19.0 [INFO] [stderr] Compiling gemm-c64 v0.19.0 [INFO] [stderr] Compiling gemm-c32 v0.19.0 [INFO] [stderr] Compiling gemm-f16 v0.19.0 [INFO] [stderr] Compiling gemm v0.19.0 [INFO] [stderr] Compiling candle-core v0.9.2 [INFO] [stderr] Compiling candle-nn v0.9.2 [INFO] [stderr] Compiling ort-candle v0.3.0+0.9.2 (/opt/rustwide/workdir) [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:20:2 [INFO] [stdout] | [INFO] [stdout] 20 | *out = Environment::new_sys(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:19:1 [INFO] [stdout] | [INFO] [stdout] 19 | unsafe extern "system" fn CreateEnv(_log_severity_level: OrtLoggingLevel, _logid: *const ::std::os::raw::c_char, out: *mut *mut OrtEnv) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:31:2 [INFO] [stdout] | [INFO] [stdout] 31 | *out = Environment::new_sys(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / unsafe extern "system" fn CreateEnvWithCustomLogger( [INFO] [stdout] 25 | | _logging_function: OrtLoggingFunction, [INFO] [stdout] 26 | | _logger_param: *mut ::std::os::raw::c_void, [INFO] [stdout] 27 | | _log_severity_level: OrtLoggingLevel, [INFO] [stdout] 28 | | _logid: *const ::std::os::raw::c_char, [INFO] [stdout] 29 | | out: *mut *mut OrtEnv [INFO] [stdout] 30 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | let len = (0..).take_while(|&i| *model_path.offset(i) != 0).count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | / unsafe extern "system" fn CreateSession( [INFO] [stdout] 44 | | _env: *const OrtEnv, [INFO] [stdout] 45 | | model_path: *const os_char, [INFO] [stdout] 46 | | options: *const OrtSessionOptions, [INFO] [stdout] 47 | | out: *mut *mut OrtSession [INFO] [stdout] 48 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::const_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:51:35 [INFO] [stdout] | [INFO] [stdout] 51 | let len = (0..).take_while(|&i| *model_path.offset(i) != 0).count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | let path = std::slice::from_raw_parts(model_path, len); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | / unsafe extern "system" fn CreateSession( [INFO] [stdout] 44 | | _env: *const OrtEnv, [INFO] [stdout] 45 | | model_path: *const os_char, [INFO] [stdout] 46 | | options: *const OrtSessionOptions, [INFO] [stdout] 47 | | out: *mut *mut OrtSession [INFO] [stdout] 48 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::OsString::from_encoded_bytes_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | let path = OsString::from_encoded_bytes_unchecked(path.iter().map(|c| *c as u8).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:68:4 [INFO] [stdout] | [INFO] [stdout] 68 | *out = (Box::leak(Box::new(session)) as *mut Session).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | let buf = std::slice::from_raw_parts(model_data.cast::(), model_data_length); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:75:1 [INFO] [stdout] | [INFO] [stdout] 75 | / unsafe extern "system" fn CreateSessionFromArray( [INFO] [stdout] 76 | | _env: *const OrtEnv, [INFO] [stdout] 77 | | model_data: *const ::std::os::raw::c_void, [INFO] [stdout] 78 | | model_data_length: usize, [INFO] [stdout] 79 | | options: *const OrtSessionOptions, [INFO] [stdout] 80 | | out: *mut *mut OrtSession [INFO] [stdout] 81 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | *out = (Box::leak(Box::new(session)) as *mut Session).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:107:40 [INFO] [stdout] | [INFO] [stdout] 107 | let inputs: HashMap = std::slice::from_raw_parts(input_names, input_len) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:95:1 [INFO] [stdout] | [INFO] [stdout] 95 | / unsafe extern "system" fn Run( [INFO] [stdout] 96 | | session: *mut OrtSession, [INFO] [stdout] 97 | | _run_options: *const OrtRunOptions, [INFO] [stdout] 98 | | input_names: *const *const ::std::os::raw::c_char, [INFO] [stdout] ... | [INFO] [stdout] 103 | | output_ptrs: *mut *mut OrtValue [INFO] [stdout] 104 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 109 | .zip(std::slice::from_raw_parts(inputs, input_len)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:119:36 [INFO] [stdout] | [INFO] [stdout] 119 | let output_names: Vec = std::slice::from_raw_parts(output_names, output_names_len) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts_mut` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:123:22 [INFO] [stdout] | [INFO] [stdout] 123 | let output_view = std::slice::from_raw_parts_mut(output_ptrs.cast::<*mut Tensor>(), output_names_len); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:142:2 [INFO] [stdout] | [INFO] [stdout] 142 | *options = (Box::leak(Box::new(SessionOptions)) as *mut SessionOptions).cast(); [INFO] [stdout] | ^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:141:1 [INFO] [stdout] | [INFO] [stdout] 141 | unsafe extern "system" fn CreateSessionOptions(options: *mut *mut OrtSessionOptions) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:148:2 [INFO] [stdout] | [INFO] [stdout] 148 | *out_options = (Box::leak(Box::new(options.clone())) as *mut SessionOptions).cast(); [INFO] [stdout] | ^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:146:1 [INFO] [stdout] | [INFO] [stdout] 146 | unsafe extern "system" fn CloneSessionOptions(in_options: *const OrtSessionOptions, out_options: *mut *mut OrtSessionOptions) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | *out = graph.input.len(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:152:1 [INFO] [stdout] | [INFO] [stdout] 152 | unsafe extern "system" fn SessionGetInputCount(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:167:4 [INFO] [stdout] | [INFO] [stdout] 167 | *out = graph.output.len(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:163:1 [INFO] [stdout] | [INFO] [stdout] 163 | unsafe extern "system" fn SessionGetOutputCount(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:175:2 [INFO] [stdout] | [INFO] [stdout] 175 | *out = 0; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:174:1 [INFO] [stdout] | [INFO] [stdout] 174 | unsafe extern "system" fn SessionGetOverridableInitializerCount(_session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:186:18 [INFO] [stdout] | [INFO] [stdout] 186 | let dtype = mem::transmute::(tensor_proto.elem_type); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | unsafe extern "system" fn SessionGetInputTypeInfo(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:205:6 [INFO] [stdout] | [INFO] [stdout] 205 | *type_info = TypeInfo::new_sys(dtype, shape_out); [INFO] [stdout] | ^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:222:18 [INFO] [stdout] | [INFO] [stdout] 222 | let dtype = mem::transmute::(tensor_proto.elem_type); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:215:1 [INFO] [stdout] | [INFO] [stdout] 215 | unsafe extern "system" fn SessionGetOutputTypeInfo(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:241:6 [INFO] [stdout] | [INFO] [stdout] 241 | *type_info = TypeInfo::new_sys(dtype, shape_out); [INFO] [stdout] | ^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:261:4 [INFO] [stdout] | [INFO] [stdout] 261 | *value = name.into_raw(); [INFO] [stdout] | ^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:251:1 [INFO] [stdout] | [INFO] [stdout] 251 | / unsafe extern "system" fn SessionGetInputName( [INFO] [stdout] 252 | | session: *const OrtSession, [INFO] [stdout] 253 | | index: usize, [INFO] [stdout] 254 | | _allocator: *mut OrtAllocator, [INFO] [stdout] 255 | | value: *mut *mut ::std::os::raw::c_char [INFO] [stdout] 256 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:278:4 [INFO] [stdout] | [INFO] [stdout] 278 | *value = name.into_raw(); [INFO] [stdout] | ^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:268:1 [INFO] [stdout] | [INFO] [stdout] 268 | / unsafe extern "system" fn SessionGetOutputName( [INFO] [stdout] 269 | | session: *const OrtSession, [INFO] [stdout] 270 | | index: usize, [INFO] [stdout] 271 | | _allocator: *mut OrtAllocator, [INFO] [stdout] 272 | | value: *mut *mut ::std::os::raw::c_char [INFO] [stdout] 273 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:305:4 [INFO] [stdout] | [INFO] [stdout] 305 | *out = (Box::leak(Box::new(tensor)) as *mut Tensor).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:285:1 [INFO] [stdout] | [INFO] [stdout] 285 | / unsafe extern "system" fn CreateTensorAsOrtValue( [INFO] [stdout] 286 | | allocator: *mut OrtAllocator, [INFO] [stdout] 287 | | shape: *const i64, [INFO] [stdout] 288 | | shape_len: usize, [INFO] [stdout] 289 | | type_: ONNXTensorElementDataType, [INFO] [stdout] 290 | | out: *mut *mut OrtValue [INFO] [stdout] 291 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:334:4 [INFO] [stdout] | [INFO] [stdout] 334 | *out = (Box::leak(Box::new(tensor)) as *mut Tensor).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:312:1 [INFO] [stdout] | [INFO] [stdout] 312 | / unsafe extern "system" fn CreateTensorWithDataAsOrtValue( [INFO] [stdout] 313 | | info: *const OrtMemoryInfo, [INFO] [stdout] 314 | | p_data: *mut ::std::os::raw::c_void, [INFO] [stdout] 315 | | p_data_len: usize, [INFO] [stdout] ... | [INFO] [stdout] 319 | | out: *mut *mut OrtValue [INFO] [stdout] 320 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:342:2 [INFO] [stdout] | [INFO] [stdout] 342 | *out = 1; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:341:1 [INFO] [stdout] | [INFO] [stdout] 341 | unsafe extern "system" fn IsTensor(_value: *const OrtValue, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:351:4 [INFO] [stdout] | [INFO] [stdout] 351 | *out = match storage { [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:346:1 [INFO] [stdout] | [INFO] [stdout] 346 | unsafe extern "system" fn GetTensorMutableData(value: *mut OrtValue, out: *mut *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:368:2 [INFO] [stdout] | [INFO] [stdout] 368 | *out = type_info.cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:367:1 [INFO] [stdout] | [INFO] [stdout] 367 | unsafe extern "system" fn CastTypeInfoToTensorInfo(type_info: *const OrtTypeInfo, out: *mut *const OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:373:2 [INFO] [stdout] | [INFO] [stdout] 373 | *out = ONNXType::ONNX_TYPE_TENSOR; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:372:1 [INFO] [stdout] | [INFO] [stdout] 372 | unsafe extern "system" fn GetOnnxTypeFromTypeInfo(_type_info: *const OrtTypeInfo, out: *mut ONNXType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:378:2 [INFO] [stdout] | [INFO] [stdout] 378 | *out = TypeInfo::new_sys(DType::F32, Vec::new()).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:377:1 [INFO] [stdout] | [INFO] [stdout] 377 | unsafe extern "system" fn CreateTensorTypeAndShapeInfo(out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:403:4 [INFO] [stdout] | [INFO] [stdout] 403 | *out = ty; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:399:1 [INFO] [stdout] | [INFO] [stdout] 399 | unsafe extern "system" fn GetTensorElementType(info: *const OrtTensorTypeAndShapeInfo, out: *mut ONNXTensorElementDataType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:412:2 [INFO] [stdout] | [INFO] [stdout] 412 | *out = info.shape.len(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:410:1 [INFO] [stdout] | [INFO] [stdout] 410 | unsafe extern "system" fn GetDimensionsCount(info: *const OrtTensorTypeAndShapeInfo, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:419:3 [INFO] [stdout] | [INFO] [stdout] 419 | *dim_values.add(i) = *dim as _; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:416:1 [INFO] [stdout] | [INFO] [stdout] 416 | unsafe extern "system" fn GetDimensions(info: *const OrtTensorTypeAndShapeInfo, dim_values: *mut i64, dim_values_length: usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:419:4 [INFO] [stdout] | [INFO] [stdout] 419 | *dim_values.add(i) = *dim as _; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:430:3 [INFO] [stdout] | [INFO] [stdout] 430 | *dim_params.add(i) = c"".as_ptr(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:424:1 [INFO] [stdout] | [INFO] [stdout] 424 | / unsafe extern "system" fn GetSymbolicDimensions( [INFO] [stdout] 425 | | _info: *const OrtTensorTypeAndShapeInfo, [INFO] [stdout] 426 | | dim_params: *mut *const ::std::os::raw::c_char, [INFO] [stdout] 427 | | dim_params_length: usize [INFO] [stdout] 428 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:430:4 [INFO] [stdout] | [INFO] [stdout] 430 | *dim_params.add(i) = c"".as_ptr(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:441:2 [INFO] [stdout] | [INFO] [stdout] 441 | *out = size; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:435:1 [INFO] [stdout] | [INFO] [stdout] 435 | unsafe extern "system" fn GetTensorShapeElementCount(info: *const OrtTensorTypeAndShapeInfo, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:447:2 [INFO] [stdout] | [INFO] [stdout] 447 | *out = TypeInfo::new_sys(tensor.dtype(), tensor.shape().dims().iter().map(|c| *c as i64).collect()).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:445:1 [INFO] [stdout] | [INFO] [stdout] 445 | unsafe extern "system" fn GetTensorTypeAndShape(value: *const OrtValue, out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:453:2 [INFO] [stdout] | [INFO] [stdout] 453 | *out = TypeInfo::new_sys(tensor.dtype(), tensor.shape().dims().iter().map(|c| *c as i64).collect()); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:451:1 [INFO] [stdout] | [INFO] [stdout] 451 | unsafe extern "system" fn GetTypeInfo(value: *const OrtValue, out: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:458:2 [INFO] [stdout] | [INFO] [stdout] 458 | *out = ONNXType::ONNX_TYPE_TENSOR; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:457:1 [INFO] [stdout] | [INFO] [stdout] 457 | unsafe extern "system" fn GetValueType(_value: *const OrtValue, out: *mut ONNXType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:492:2 [INFO] [stdout] | [INFO] [stdout] 492 | *out = if info1 == info2 { 0 } else { -1 }; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:489:1 [INFO] [stdout] | [INFO] [stdout] 489 | unsafe extern "system" fn CompareMemoryInfo(info1: *const OrtMemoryInfo, info2: *const OrtMemoryInfo, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:498:2 [INFO] [stdout] | [INFO] [stdout] 498 | *out = info.device_name_sys().as_ptr().cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:496:1 [INFO] [stdout] | [INFO] [stdout] 496 | unsafe extern "system" fn MemoryInfoGetName(ptr: *const OrtMemoryInfo, out: *mut *const ::std::os::raw::c_char) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:504:2 [INFO] [stdout] | [INFO] [stdout] 504 | *out = info.device_id() as _; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:502:1 [INFO] [stdout] | [INFO] [stdout] 502 | unsafe extern "system" fn MemoryInfoGetId(ptr: *const OrtMemoryInfo, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:510:2 [INFO] [stdout] | [INFO] [stdout] 510 | *out = info.memory_type() as _; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:508:1 [INFO] [stdout] | [INFO] [stdout] 508 | unsafe extern "system" fn MemoryInfoGetMemType(ptr: *const OrtMemoryInfo, out: *mut OrtMemType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:515:2 [INFO] [stdout] | [INFO] [stdout] 515 | *out = OrtAllocatorType::OrtDeviceAllocator; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:514:1 [INFO] [stdout] | [INFO] [stdout] 514 | unsafe extern "system" fn MemoryInfoGetType(_ptr: *const OrtMemoryInfo, out: *mut OrtAllocatorType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:520:2 [INFO] [stdout] | [INFO] [stdout] 520 | *out = unsafe { &*ort_allocator }.Alloc.unwrap()(ort_allocator, size); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:519:1 [INFO] [stdout] | [INFO] [stdout] 519 | unsafe extern "system" fn AllocatorAlloc(ort_allocator: *mut OrtAllocator, size: usize, out: *mut *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:520:9 [INFO] [stdout] | [INFO] [stdout] 520 | *out = unsafe { &*ort_allocator }.Alloc.unwrap()(ort_allocator, size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:528:2 [INFO] [stdout] | [INFO] [stdout] 528 | unsafe { &*ort_allocator }.Free.unwrap()(ort_allocator, p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:527:1 [INFO] [stdout] | [INFO] [stdout] 527 | unsafe extern "system" fn AllocatorFree(ort_allocator: *mut OrtAllocator, p: *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:533:2 [INFO] [stdout] | [INFO] [stdout] 533 | *out = unsafe { &*ort_allocator }.Info.unwrap()(ort_allocator); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:532:1 [INFO] [stdout] | [INFO] [stdout] 532 | unsafe extern "system" fn AllocatorGetInfo(ort_allocator: *const OrtAllocator, out: *mut *const OrtMemoryInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:533:9 [INFO] [stdout] | [INFO] [stdout] 533 | *out = unsafe { &*ort_allocator }.Info.unwrap()(ort_allocator); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:538:2 [INFO] [stdout] | [INFO] [stdout] 538 | *out = (&crate::memory::DEFAULT_CPU_ALLOCATOR as *const Allocator).cast_mut().cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:537:1 [INFO] [stdout] | [INFO] [stdout] 537 | unsafe extern "system" fn GetAllocatorWithDefaultOptions(out: *mut *mut OrtAllocator) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `Environment::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:543:7 [INFO] [stdout] | [INFO] [stdout] 543 | drop(Environment::consume_sys(input)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:542:1 [INFO] [stdout] | [INFO] [stdout] 542 | unsafe extern "system" fn ReleaseEnv(input: *mut OrtEnv) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `ort_sys::stub::Error::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:547:7 [INFO] [stdout] | [INFO] [stdout] 547 | drop(Error::consume_sys(input)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:546:1 [INFO] [stdout] | [INFO] [stdout] 546 | unsafe extern "system" fn ReleaseStatus(input: *mut OrtStatus) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `tensor::TypeInfo::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:563:7 [INFO] [stdout] | [INFO] [stdout] 563 | drop(TypeInfo::consume_sys(input)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:562:1 [INFO] [stdout] | [INFO] [stdout] 562 | unsafe extern "system" fn ReleaseTypeInfo(input: *mut OrtTypeInfo) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `tensor::TypeInfo::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:567:7 [INFO] [stdout] | [INFO] [stdout] 567 | drop(TypeInfo::consume_sys(input.cast())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:566:1 [INFO] [stdout] | [INFO] [stdout] 566 | unsafe extern "system" fn ReleaseTensorTypeAndShapeInfo(input: *mut OrtTensorTypeAndShapeInfo) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:571:7 [INFO] [stdout] | [INFO] [stdout] 571 | drop(Box::from_raw(input.cast::())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:570:1 [INFO] [stdout] | [INFO] [stdout] 570 | unsafe extern "system" fn ReleaseSessionOptions(input: *mut OrtSessionOptions) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:576:2 [INFO] [stdout] | [INFO] [stdout] 576 | *out = (Box::leak(Box::new(Allocator::new(mem_info))) as *mut Allocator).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:574:1 [INFO] [stdout] | [INFO] [stdout] 574 | unsafe extern "system" fn CreateAllocator(_session: *const OrtSession, mem_info: *const OrtMemoryInfo, out: *mut *mut OrtAllocator) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:581:7 [INFO] [stdout] | [INFO] [stdout] 581 | drop(Box::from_raw(input.cast::())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:580:1 [INFO] [stdout] | [INFO] [stdout] 580 | unsafe extern "system" fn ReleaseAllocator(input: *mut OrtAllocator) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:587:2 [INFO] [stdout] | [INFO] [stdout] 587 | *mem_info = (tensor.device() as *const Device).cast(); [INFO] [stdout] | ^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:584:1 [INFO] [stdout] | [INFO] [stdout] 584 | unsafe extern "system" fn GetTensorMemoryInfo(value: *const OrtValue, mem_info: *mut *const OrtMemoryInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:593:2 [INFO] [stdout] | [INFO] [stdout] 593 | *out = memory_info.device_type(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:591:1 [INFO] [stdout] | [INFO] [stdout] 591 | unsafe extern "system" fn MemoryInfoGetDeviceType(ptr: *const OrtMemoryInfo, out: *mut OrtMemoryInfoDeviceType) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CString::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> memory.rs:99:7 [INFO] [stdout] | [INFO] [stdout] 99 | drop(CString::from_raw(p.cast())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> memory.rs:98:1 [INFO] [stdout] | [INFO] [stdout] 98 | unsafe extern "system" fn sys_allocator_free(_this: *mut ort_sys::OrtAllocator, p: *mut ::std::os::raw::c_void) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> tensor.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | Box::from_raw(ptr.cast::()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> tensor.rs:13:2 [INFO] [stdout] | [INFO] [stdout] 13 | pub unsafe fn consume_sys(ptr: *mut ort_sys::OrtTypeInfo) -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> lib.rs:25:3 [INFO] [stdout] | [INFO] [stdout] 25 | Box::from_raw(ptr.cast::()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> lib.rs:24:2 [INFO] [stdout] | [INFO] [stdout] 24 | pub unsafe fn consume_sys(ptr: *mut ort_sys::OrtEnv) -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `cast_from_sys` is never used [INFO] [stdout] --> lib.rs:20:16 [INFO] [stdout] | [INFO] [stdout] 15 | impl Environment { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | pub unsafe fn cast_from_sys<'e>(ptr: *const ort_sys::OrtEnv) -> &'e Environment { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `device_name` is never used [INFO] [stdout] --> memory.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 11 | impl MemoryInfo { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn device_name(&self) -> &'static str { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 02s [INFO] running `Command { std: "docker" "inspect" "ce1fccc7059945631a5287f8b49bc05e8ec77307a207cfc00d95df0646d06d00", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ce1fccc7059945631a5287f8b49bc05e8ec77307a207cfc00d95df0646d06d00", kill_on_drop: false }` [INFO] [stdout] ce1fccc7059945631a5287f8b49bc05e8ec77307a207cfc00d95df0646d06d00 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0df117729be666eb7e1632f0233d0694f195d34dd99ee5c0bd06cadc06063515 [INFO] running `Command { std: "docker" "start" "-a" "0df117729be666eb7e1632f0233d0694f195d34dd99ee5c0bd06cadc06063515", kill_on_drop: false }` [INFO] [stderr] Compiling log v0.4.27 [INFO] [stderr] Compiling cc v1.2.27 [INFO] [stderr] Compiling typenum v1.18.0 [INFO] [stderr] Compiling bytes v1.10.1 [INFO] [stderr] Compiling zeroize v1.8.1 [INFO] [stderr] Compiling getrandom v0.2.16 [INFO] [stderr] Compiling httparse v1.10.1 [INFO] [stderr] Compiling ort-sys v2.0.0-rc.12 [INFO] [stderr] Compiling rustls v0.23.28 [INFO] [stderr] Compiling http v1.3.1 [INFO] [stderr] Compiling prost v0.14.3 [INFO] [stderr] Compiling rustls-pki-types v1.12.0 [INFO] [stderr] Compiling num-integer v0.1.46 [INFO] [stderr] Compiling webpki-roots v1.0.1 [INFO] [stderr] Compiling ndarray v0.17.1 [INFO] [stderr] Compiling prost-types v0.14.3 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling ureq-proto v0.5.3 [INFO] [stderr] Compiling crypto-common v0.1.6 [INFO] [stderr] Compiling block-buffer v0.10.4 [INFO] [stderr] Compiling ring v0.17.14 [INFO] [stderr] Compiling digest v0.10.7 [INFO] [stderr] Compiling sha2 v0.10.9 [INFO] [stderr] Compiling prost-build v0.14.3 [INFO] [stderr] Compiling candle-onnx v0.9.2 [INFO] [stderr] Compiling ort-candle v0.3.0+0.9.2 (/opt/rustwide/workdir) [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:20:2 [INFO] [stdout] | [INFO] [stdout] 20 | *out = Environment::new_sys(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:19:1 [INFO] [stdout] | [INFO] [stdout] 19 | unsafe extern "system" fn CreateEnv(_log_severity_level: OrtLoggingLevel, _logid: *const ::std::os::raw::c_char, out: *mut *mut OrtEnv) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:31:2 [INFO] [stdout] | [INFO] [stdout] 31 | *out = Environment::new_sys(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / unsafe extern "system" fn CreateEnvWithCustomLogger( [INFO] [stdout] 25 | | _logging_function: OrtLoggingFunction, [INFO] [stdout] 26 | | _logger_param: *mut ::std::os::raw::c_void, [INFO] [stdout] 27 | | _log_severity_level: OrtLoggingLevel, [INFO] [stdout] 28 | | _logid: *const ::std::os::raw::c_char, [INFO] [stdout] 29 | | out: *mut *mut OrtEnv [INFO] [stdout] 30 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | let len = (0..).take_while(|&i| *model_path.offset(i) != 0).count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | / unsafe extern "system" fn CreateSession( [INFO] [stdout] 44 | | _env: *const OrtEnv, [INFO] [stdout] 45 | | model_path: *const os_char, [INFO] [stdout] 46 | | options: *const OrtSessionOptions, [INFO] [stdout] 47 | | out: *mut *mut OrtSession [INFO] [stdout] 48 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::const_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:51:35 [INFO] [stdout] | [INFO] [stdout] 51 | let len = (0..).take_while(|&i| *model_path.offset(i) != 0).count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | let path = std::slice::from_raw_parts(model_path, len); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | / unsafe extern "system" fn CreateSession( [INFO] [stdout] 44 | | _env: *const OrtEnv, [INFO] [stdout] 45 | | model_path: *const os_char, [INFO] [stdout] 46 | | options: *const OrtSessionOptions, [INFO] [stdout] 47 | | out: *mut *mut OrtSession [INFO] [stdout] 48 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::OsString::from_encoded_bytes_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | let path = OsString::from_encoded_bytes_unchecked(path.iter().map(|c| *c as u8).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:68:4 [INFO] [stdout] | [INFO] [stdout] 68 | *out = (Box::leak(Box::new(session)) as *mut Session).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | let buf = std::slice::from_raw_parts(model_data.cast::(), model_data_length); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:75:1 [INFO] [stdout] | [INFO] [stdout] 75 | / unsafe extern "system" fn CreateSessionFromArray( [INFO] [stdout] 76 | | _env: *const OrtEnv, [INFO] [stdout] 77 | | model_data: *const ::std::os::raw::c_void, [INFO] [stdout] 78 | | model_data_length: usize, [INFO] [stdout] 79 | | options: *const OrtSessionOptions, [INFO] [stdout] 80 | | out: *mut *mut OrtSession [INFO] [stdout] 81 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | *out = (Box::leak(Box::new(session)) as *mut Session).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:107:40 [INFO] [stdout] | [INFO] [stdout] 107 | let inputs: HashMap = std::slice::from_raw_parts(input_names, input_len) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:95:1 [INFO] [stdout] | [INFO] [stdout] 95 | / unsafe extern "system" fn Run( [INFO] [stdout] 96 | | session: *mut OrtSession, [INFO] [stdout] 97 | | _run_options: *const OrtRunOptions, [INFO] [stdout] 98 | | input_names: *const *const ::std::os::raw::c_char, [INFO] [stdout] ... | [INFO] [stdout] 103 | | output_ptrs: *mut *mut OrtValue [INFO] [stdout] 104 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 109 | .zip(std::slice::from_raw_parts(inputs, input_len)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:119:36 [INFO] [stdout] | [INFO] [stdout] 119 | let output_names: Vec = std::slice::from_raw_parts(output_names, output_names_len) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts_mut` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:123:22 [INFO] [stdout] | [INFO] [stdout] 123 | let output_view = std::slice::from_raw_parts_mut(output_ptrs.cast::<*mut Tensor>(), output_names_len); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:142:2 [INFO] [stdout] | [INFO] [stdout] 142 | *options = (Box::leak(Box::new(SessionOptions)) as *mut SessionOptions).cast(); [INFO] [stdout] | ^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:141:1 [INFO] [stdout] | [INFO] [stdout] 141 | unsafe extern "system" fn CreateSessionOptions(options: *mut *mut OrtSessionOptions) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:148:2 [INFO] [stdout] | [INFO] [stdout] 148 | *out_options = (Box::leak(Box::new(options.clone())) as *mut SessionOptions).cast(); [INFO] [stdout] | ^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:146:1 [INFO] [stdout] | [INFO] [stdout] 146 | unsafe extern "system" fn CloneSessionOptions(in_options: *const OrtSessionOptions, out_options: *mut *mut OrtSessionOptions) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | *out = graph.input.len(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:152:1 [INFO] [stdout] | [INFO] [stdout] 152 | unsafe extern "system" fn SessionGetInputCount(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:167:4 [INFO] [stdout] | [INFO] [stdout] 167 | *out = graph.output.len(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:163:1 [INFO] [stdout] | [INFO] [stdout] 163 | unsafe extern "system" fn SessionGetOutputCount(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:175:2 [INFO] [stdout] | [INFO] [stdout] 175 | *out = 0; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:174:1 [INFO] [stdout] | [INFO] [stdout] 174 | unsafe extern "system" fn SessionGetOverridableInitializerCount(_session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:186:18 [INFO] [stdout] | [INFO] [stdout] 186 | let dtype = mem::transmute::(tensor_proto.elem_type); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | unsafe extern "system" fn SessionGetInputTypeInfo(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:205:6 [INFO] [stdout] | [INFO] [stdout] 205 | *type_info = TypeInfo::new_sys(dtype, shape_out); [INFO] [stdout] | ^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:222:18 [INFO] [stdout] | [INFO] [stdout] 222 | let dtype = mem::transmute::(tensor_proto.elem_type); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:215:1 [INFO] [stdout] | [INFO] [stdout] 215 | unsafe extern "system" fn SessionGetOutputTypeInfo(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:241:6 [INFO] [stdout] | [INFO] [stdout] 241 | *type_info = TypeInfo::new_sys(dtype, shape_out); [INFO] [stdout] | ^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:261:4 [INFO] [stdout] | [INFO] [stdout] 261 | *value = name.into_raw(); [INFO] [stdout] | ^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:251:1 [INFO] [stdout] | [INFO] [stdout] 251 | / unsafe extern "system" fn SessionGetInputName( [INFO] [stdout] 252 | | session: *const OrtSession, [INFO] [stdout] 253 | | index: usize, [INFO] [stdout] 254 | | _allocator: *mut OrtAllocator, [INFO] [stdout] 255 | | value: *mut *mut ::std::os::raw::c_char [INFO] [stdout] 256 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:278:4 [INFO] [stdout] | [INFO] [stdout] 278 | *value = name.into_raw(); [INFO] [stdout] | ^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:268:1 [INFO] [stdout] | [INFO] [stdout] 268 | / unsafe extern "system" fn SessionGetOutputName( [INFO] [stdout] 269 | | session: *const OrtSession, [INFO] [stdout] 270 | | index: usize, [INFO] [stdout] 271 | | _allocator: *mut OrtAllocator, [INFO] [stdout] 272 | | value: *mut *mut ::std::os::raw::c_char [INFO] [stdout] 273 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:305:4 [INFO] [stdout] | [INFO] [stdout] 305 | *out = (Box::leak(Box::new(tensor)) as *mut Tensor).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:285:1 [INFO] [stdout] | [INFO] [stdout] 285 | / unsafe extern "system" fn CreateTensorAsOrtValue( [INFO] [stdout] 286 | | allocator: *mut OrtAllocator, [INFO] [stdout] 287 | | shape: *const i64, [INFO] [stdout] 288 | | shape_len: usize, [INFO] [stdout] 289 | | type_: ONNXTensorElementDataType, [INFO] [stdout] 290 | | out: *mut *mut OrtValue [INFO] [stdout] 291 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:334:4 [INFO] [stdout] | [INFO] [stdout] 334 | *out = (Box::leak(Box::new(tensor)) as *mut Tensor).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:312:1 [INFO] [stdout] | [INFO] [stdout] 312 | / unsafe extern "system" fn CreateTensorWithDataAsOrtValue( [INFO] [stdout] 313 | | info: *const OrtMemoryInfo, [INFO] [stdout] 314 | | p_data: *mut ::std::os::raw::c_void, [INFO] [stdout] 315 | | p_data_len: usize, [INFO] [stdout] ... | [INFO] [stdout] 319 | | out: *mut *mut OrtValue [INFO] [stdout] 320 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:342:2 [INFO] [stdout] | [INFO] [stdout] 342 | *out = 1; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:341:1 [INFO] [stdout] | [INFO] [stdout] 341 | unsafe extern "system" fn IsTensor(_value: *const OrtValue, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:351:4 [INFO] [stdout] | [INFO] [stdout] 351 | *out = match storage { [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:346:1 [INFO] [stdout] | [INFO] [stdout] 346 | unsafe extern "system" fn GetTensorMutableData(value: *mut OrtValue, out: *mut *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:368:2 [INFO] [stdout] | [INFO] [stdout] 368 | *out = type_info.cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:367:1 [INFO] [stdout] | [INFO] [stdout] 367 | unsafe extern "system" fn CastTypeInfoToTensorInfo(type_info: *const OrtTypeInfo, out: *mut *const OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:373:2 [INFO] [stdout] | [INFO] [stdout] 373 | *out = ONNXType::ONNX_TYPE_TENSOR; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:372:1 [INFO] [stdout] | [INFO] [stdout] 372 | unsafe extern "system" fn GetOnnxTypeFromTypeInfo(_type_info: *const OrtTypeInfo, out: *mut ONNXType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:378:2 [INFO] [stdout] | [INFO] [stdout] 378 | *out = TypeInfo::new_sys(DType::F32, Vec::new()).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:377:1 [INFO] [stdout] | [INFO] [stdout] 377 | unsafe extern "system" fn CreateTensorTypeAndShapeInfo(out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:403:4 [INFO] [stdout] | [INFO] [stdout] 403 | *out = ty; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:399:1 [INFO] [stdout] | [INFO] [stdout] 399 | unsafe extern "system" fn GetTensorElementType(info: *const OrtTensorTypeAndShapeInfo, out: *mut ONNXTensorElementDataType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:412:2 [INFO] [stdout] | [INFO] [stdout] 412 | *out = info.shape.len(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:410:1 [INFO] [stdout] | [INFO] [stdout] 410 | unsafe extern "system" fn GetDimensionsCount(info: *const OrtTensorTypeAndShapeInfo, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:419:3 [INFO] [stdout] | [INFO] [stdout] 419 | *dim_values.add(i) = *dim as _; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:416:1 [INFO] [stdout] | [INFO] [stdout] 416 | unsafe extern "system" fn GetDimensions(info: *const OrtTensorTypeAndShapeInfo, dim_values: *mut i64, dim_values_length: usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:419:4 [INFO] [stdout] | [INFO] [stdout] 419 | *dim_values.add(i) = *dim as _; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:430:3 [INFO] [stdout] | [INFO] [stdout] 430 | *dim_params.add(i) = c"".as_ptr(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:424:1 [INFO] [stdout] | [INFO] [stdout] 424 | / unsafe extern "system" fn GetSymbolicDimensions( [INFO] [stdout] 425 | | _info: *const OrtTensorTypeAndShapeInfo, [INFO] [stdout] 426 | | dim_params: *mut *const ::std::os::raw::c_char, [INFO] [stdout] 427 | | dim_params_length: usize [INFO] [stdout] 428 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:430:4 [INFO] [stdout] | [INFO] [stdout] 430 | *dim_params.add(i) = c"".as_ptr(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:441:2 [INFO] [stdout] | [INFO] [stdout] 441 | *out = size; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:435:1 [INFO] [stdout] | [INFO] [stdout] 435 | unsafe extern "system" fn GetTensorShapeElementCount(info: *const OrtTensorTypeAndShapeInfo, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:447:2 [INFO] [stdout] | [INFO] [stdout] 447 | *out = TypeInfo::new_sys(tensor.dtype(), tensor.shape().dims().iter().map(|c| *c as i64).collect()).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:445:1 [INFO] [stdout] | [INFO] [stdout] 445 | unsafe extern "system" fn GetTensorTypeAndShape(value: *const OrtValue, out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:453:2 [INFO] [stdout] | [INFO] [stdout] 453 | *out = TypeInfo::new_sys(tensor.dtype(), tensor.shape().dims().iter().map(|c| *c as i64).collect()); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:451:1 [INFO] [stdout] | [INFO] [stdout] 451 | unsafe extern "system" fn GetTypeInfo(value: *const OrtValue, out: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:458:2 [INFO] [stdout] | [INFO] [stdout] 458 | *out = ONNXType::ONNX_TYPE_TENSOR; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:457:1 [INFO] [stdout] | [INFO] [stdout] 457 | unsafe extern "system" fn GetValueType(_value: *const OrtValue, out: *mut ONNXType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:492:2 [INFO] [stdout] | [INFO] [stdout] 492 | *out = if info1 == info2 { 0 } else { -1 }; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:489:1 [INFO] [stdout] | [INFO] [stdout] 489 | unsafe extern "system" fn CompareMemoryInfo(info1: *const OrtMemoryInfo, info2: *const OrtMemoryInfo, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:498:2 [INFO] [stdout] | [INFO] [stdout] 498 | *out = info.device_name_sys().as_ptr().cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:496:1 [INFO] [stdout] | [INFO] [stdout] 496 | unsafe extern "system" fn MemoryInfoGetName(ptr: *const OrtMemoryInfo, out: *mut *const ::std::os::raw::c_char) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:504:2 [INFO] [stdout] | [INFO] [stdout] 504 | *out = info.device_id() as _; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:502:1 [INFO] [stdout] | [INFO] [stdout] 502 | unsafe extern "system" fn MemoryInfoGetId(ptr: *const OrtMemoryInfo, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:510:2 [INFO] [stdout] | [INFO] [stdout] 510 | *out = info.memory_type() as _; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:508:1 [INFO] [stdout] | [INFO] [stdout] 508 | unsafe extern "system" fn MemoryInfoGetMemType(ptr: *const OrtMemoryInfo, out: *mut OrtMemType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:515:2 [INFO] [stdout] | [INFO] [stdout] 515 | *out = OrtAllocatorType::OrtDeviceAllocator; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:514:1 [INFO] [stdout] | [INFO] [stdout] 514 | unsafe extern "system" fn MemoryInfoGetType(_ptr: *const OrtMemoryInfo, out: *mut OrtAllocatorType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:520:2 [INFO] [stdout] | [INFO] [stdout] 520 | *out = unsafe { &*ort_allocator }.Alloc.unwrap()(ort_allocator, size); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:519:1 [INFO] [stdout] | [INFO] [stdout] 519 | unsafe extern "system" fn AllocatorAlloc(ort_allocator: *mut OrtAllocator, size: usize, out: *mut *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:520:9 [INFO] [stdout] | [INFO] [stdout] 520 | *out = unsafe { &*ort_allocator }.Alloc.unwrap()(ort_allocator, size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:528:2 [INFO] [stdout] | [INFO] [stdout] 528 | unsafe { &*ort_allocator }.Free.unwrap()(ort_allocator, p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:527:1 [INFO] [stdout] | [INFO] [stdout] 527 | unsafe extern "system" fn AllocatorFree(ort_allocator: *mut OrtAllocator, p: *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:533:2 [INFO] [stdout] | [INFO] [stdout] 533 | *out = unsafe { &*ort_allocator }.Info.unwrap()(ort_allocator); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:532:1 [INFO] [stdout] | [INFO] [stdout] 532 | unsafe extern "system" fn AllocatorGetInfo(ort_allocator: *const OrtAllocator, out: *mut *const OrtMemoryInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:533:9 [INFO] [stdout] | [INFO] [stdout] 533 | *out = unsafe { &*ort_allocator }.Info.unwrap()(ort_allocator); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:538:2 [INFO] [stdout] | [INFO] [stdout] 538 | *out = (&crate::memory::DEFAULT_CPU_ALLOCATOR as *const Allocator).cast_mut().cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:537:1 [INFO] [stdout] | [INFO] [stdout] 537 | unsafe extern "system" fn GetAllocatorWithDefaultOptions(out: *mut *mut OrtAllocator) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `Environment::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:543:7 [INFO] [stdout] | [INFO] [stdout] 543 | drop(Environment::consume_sys(input)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:542:1 [INFO] [stdout] | [INFO] [stdout] 542 | unsafe extern "system" fn ReleaseEnv(input: *mut OrtEnv) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `ort_sys::stub::Error::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:547:7 [INFO] [stdout] | [INFO] [stdout] 547 | drop(Error::consume_sys(input)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:546:1 [INFO] [stdout] | [INFO] [stdout] 546 | unsafe extern "system" fn ReleaseStatus(input: *mut OrtStatus) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `tensor::TypeInfo::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:563:7 [INFO] [stdout] | [INFO] [stdout] 563 | drop(TypeInfo::consume_sys(input)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:562:1 [INFO] [stdout] | [INFO] [stdout] 562 | unsafe extern "system" fn ReleaseTypeInfo(input: *mut OrtTypeInfo) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `tensor::TypeInfo::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:567:7 [INFO] [stdout] | [INFO] [stdout] 567 | drop(TypeInfo::consume_sys(input.cast())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:566:1 [INFO] [stdout] | [INFO] [stdout] 566 | unsafe extern "system" fn ReleaseTensorTypeAndShapeInfo(input: *mut OrtTensorTypeAndShapeInfo) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:571:7 [INFO] [stdout] | [INFO] [stdout] 571 | drop(Box::from_raw(input.cast::())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:570:1 [INFO] [stdout] | [INFO] [stdout] 570 | unsafe extern "system" fn ReleaseSessionOptions(input: *mut OrtSessionOptions) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:576:2 [INFO] [stdout] | [INFO] [stdout] 576 | *out = (Box::leak(Box::new(Allocator::new(mem_info))) as *mut Allocator).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:574:1 [INFO] [stdout] | [INFO] [stdout] 574 | unsafe extern "system" fn CreateAllocator(_session: *const OrtSession, mem_info: *const OrtMemoryInfo, out: *mut *mut OrtAllocator) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:581:7 [INFO] [stdout] | [INFO] [stdout] 581 | drop(Box::from_raw(input.cast::())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:580:1 [INFO] [stdout] | [INFO] [stdout] 580 | unsafe extern "system" fn ReleaseAllocator(input: *mut OrtAllocator) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:587:2 [INFO] [stdout] | [INFO] [stdout] 587 | *mem_info = (tensor.device() as *const Device).cast(); [INFO] [stdout] | ^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:584:1 [INFO] [stdout] | [INFO] [stdout] 584 | unsafe extern "system" fn GetTensorMemoryInfo(value: *const OrtValue, mem_info: *mut *const OrtMemoryInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:593:2 [INFO] [stdout] | [INFO] [stdout] 593 | *out = memory_info.device_type(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:591:1 [INFO] [stdout] | [INFO] [stdout] 591 | unsafe extern "system" fn MemoryInfoGetDeviceType(ptr: *const OrtMemoryInfo, out: *mut OrtMemoryInfoDeviceType) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CString::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> memory.rs:99:7 [INFO] [stdout] | [INFO] [stdout] 99 | drop(CString::from_raw(p.cast())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> memory.rs:98:1 [INFO] [stdout] | [INFO] [stdout] 98 | unsafe extern "system" fn sys_allocator_free(_this: *mut ort_sys::OrtAllocator, p: *mut ::std::os::raw::c_void) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> tensor.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | Box::from_raw(ptr.cast::()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> tensor.rs:13:2 [INFO] [stdout] | [INFO] [stdout] 13 | pub unsafe fn consume_sys(ptr: *mut ort_sys::OrtTypeInfo) -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> lib.rs:25:3 [INFO] [stdout] | [INFO] [stdout] 25 | Box::from_raw(ptr.cast::()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> lib.rs:24:2 [INFO] [stdout] | [INFO] [stdout] 24 | pub unsafe fn consume_sys(ptr: *mut ort_sys::OrtEnv) -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `cast_from_sys` is never used [INFO] [stdout] --> lib.rs:20:16 [INFO] [stdout] | [INFO] [stdout] 15 | impl Environment { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | pub unsafe fn cast_from_sys<'e>(ptr: *const ort_sys::OrtEnv) -> &'e Environment { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `device_name` is never used [INFO] [stdout] --> memory.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 11 | impl MemoryInfo { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn device_name(&self) -> &'static str { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling rustls-webpki v0.103.3 [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stderr] Compiling ureq v3.1.4 [INFO] [stderr] Compiling ort v2.0.0-rc.12 [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:20:2 [INFO] [stdout] | [INFO] [stdout] 20 | *out = Environment::new_sys(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:19:1 [INFO] [stdout] | [INFO] [stdout] 19 | unsafe extern "system" fn CreateEnv(_log_severity_level: OrtLoggingLevel, _logid: *const ::std::os::raw::c_char, out: *mut *mut OrtEnv) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:31:2 [INFO] [stdout] | [INFO] [stdout] 31 | *out = Environment::new_sys(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / unsafe extern "system" fn CreateEnvWithCustomLogger( [INFO] [stdout] 25 | | _logging_function: OrtLoggingFunction, [INFO] [stdout] 26 | | _logger_param: *mut ::std::os::raw::c_void, [INFO] [stdout] 27 | | _log_severity_level: OrtLoggingLevel, [INFO] [stdout] 28 | | _logid: *const ::std::os::raw::c_char, [INFO] [stdout] 29 | | out: *mut *mut OrtEnv [INFO] [stdout] 30 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:51:34 [INFO] [stdout] | [INFO] [stdout] 51 | let len = (0..).take_while(|&i| *model_path.offset(i) != 0).count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | / unsafe extern "system" fn CreateSession( [INFO] [stdout] 44 | | _env: *const OrtEnv, [INFO] [stdout] 45 | | model_path: *const os_char, [INFO] [stdout] 46 | | options: *const OrtSessionOptions, [INFO] [stdout] 47 | | out: *mut *mut OrtSession [INFO] [stdout] 48 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::const_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:51:35 [INFO] [stdout] | [INFO] [stdout] 51 | let len = (0..).take_while(|&i| *model_path.offset(i) != 0).count(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 52 | let path = std::slice::from_raw_parts(model_path, len); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | / unsafe extern "system" fn CreateSession( [INFO] [stdout] 44 | | _env: *const OrtEnv, [INFO] [stdout] 45 | | model_path: *const os_char, [INFO] [stdout] 46 | | options: *const OrtSessionOptions, [INFO] [stdout] 47 | | out: *mut *mut OrtSession [INFO] [stdout] 48 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::OsString::from_encoded_bytes_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | let path = OsString::from_encoded_bytes_unchecked(path.iter().map(|c| *c as u8).collect::>()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:68:4 [INFO] [stdout] | [INFO] [stdout] 68 | *out = (Box::leak(Box::new(session)) as *mut Session).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:84:12 [INFO] [stdout] | [INFO] [stdout] 84 | let buf = std::slice::from_raw_parts(model_data.cast::(), model_data_length); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:75:1 [INFO] [stdout] | [INFO] [stdout] 75 | / unsafe extern "system" fn CreateSessionFromArray( [INFO] [stdout] 76 | | _env: *const OrtEnv, [INFO] [stdout] 77 | | model_data: *const ::std::os::raw::c_void, [INFO] [stdout] 78 | | model_data_length: usize, [INFO] [stdout] 79 | | options: *const OrtSessionOptions, [INFO] [stdout] 80 | | out: *mut *mut OrtSession [INFO] [stdout] 81 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:88:4 [INFO] [stdout] | [INFO] [stdout] 88 | *out = (Box::leak(Box::new(session)) as *mut Session).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:107:40 [INFO] [stdout] | [INFO] [stdout] 107 | let inputs: HashMap = std::slice::from_raw_parts(input_names, input_len) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:95:1 [INFO] [stdout] | [INFO] [stdout] 95 | / unsafe extern "system" fn Run( [INFO] [stdout] 96 | | session: *mut OrtSession, [INFO] [stdout] 97 | | _run_options: *const OrtRunOptions, [INFO] [stdout] 98 | | input_names: *const *const ::std::os::raw::c_char, [INFO] [stdout] ... | [INFO] [stdout] 103 | | output_ptrs: *mut *mut OrtValue [INFO] [stdout] 104 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:109:8 [INFO] [stdout] | [INFO] [stdout] 109 | .zip(std::slice::from_raw_parts(inputs, input_len)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:119:36 [INFO] [stdout] | [INFO] [stdout] 119 | let output_names: Vec = std::slice::from_raw_parts(output_names, output_names_len) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts_mut` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:123:22 [INFO] [stdout] | [INFO] [stdout] 123 | let output_view = std::slice::from_raw_parts_mut(output_ptrs.cast::<*mut Tensor>(), output_names_len); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:142:2 [INFO] [stdout] | [INFO] [stdout] 142 | *options = (Box::leak(Box::new(SessionOptions)) as *mut SessionOptions).cast(); [INFO] [stdout] | ^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:141:1 [INFO] [stdout] | [INFO] [stdout] 141 | unsafe extern "system" fn CreateSessionOptions(options: *mut *mut OrtSessionOptions) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:148:2 [INFO] [stdout] | [INFO] [stdout] 148 | *out_options = (Box::leak(Box::new(options.clone())) as *mut SessionOptions).cast(); [INFO] [stdout] | ^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:146:1 [INFO] [stdout] | [INFO] [stdout] 146 | unsafe extern "system" fn CloneSessionOptions(in_options: *const OrtSessionOptions, out_options: *mut *mut OrtSessionOptions) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:156:4 [INFO] [stdout] | [INFO] [stdout] 156 | *out = graph.input.len(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:152:1 [INFO] [stdout] | [INFO] [stdout] 152 | unsafe extern "system" fn SessionGetInputCount(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:167:4 [INFO] [stdout] | [INFO] [stdout] 167 | *out = graph.output.len(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:163:1 [INFO] [stdout] | [INFO] [stdout] 163 | unsafe extern "system" fn SessionGetOutputCount(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:175:2 [INFO] [stdout] | [INFO] [stdout] 175 | *out = 0; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:174:1 [INFO] [stdout] | [INFO] [stdout] 174 | unsafe extern "system" fn SessionGetOverridableInitializerCount(_session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:186:18 [INFO] [stdout] | [INFO] [stdout] 186 | let dtype = mem::transmute::(tensor_proto.elem_type); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:179:1 [INFO] [stdout] | [INFO] [stdout] 179 | unsafe extern "system" fn SessionGetInputTypeInfo(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:205:6 [INFO] [stdout] | [INFO] [stdout] 205 | *type_info = TypeInfo::new_sys(dtype, shape_out); [INFO] [stdout] | ^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:222:18 [INFO] [stdout] | [INFO] [stdout] 222 | let dtype = mem::transmute::(tensor_proto.elem_type); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:215:1 [INFO] [stdout] | [INFO] [stdout] 215 | unsafe extern "system" fn SessionGetOutputTypeInfo(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:241:6 [INFO] [stdout] | [INFO] [stdout] 241 | *type_info = TypeInfo::new_sys(dtype, shape_out); [INFO] [stdout] | ^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:261:4 [INFO] [stdout] | [INFO] [stdout] 261 | *value = name.into_raw(); [INFO] [stdout] | ^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:251:1 [INFO] [stdout] | [INFO] [stdout] 251 | / unsafe extern "system" fn SessionGetInputName( [INFO] [stdout] 252 | | session: *const OrtSession, [INFO] [stdout] 253 | | index: usize, [INFO] [stdout] 254 | | _allocator: *mut OrtAllocator, [INFO] [stdout] 255 | | value: *mut *mut ::std::os::raw::c_char [INFO] [stdout] 256 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:278:4 [INFO] [stdout] | [INFO] [stdout] 278 | *value = name.into_raw(); [INFO] [stdout] | ^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:268:1 [INFO] [stdout] | [INFO] [stdout] 268 | / unsafe extern "system" fn SessionGetOutputName( [INFO] [stdout] 269 | | session: *const OrtSession, [INFO] [stdout] 270 | | index: usize, [INFO] [stdout] 271 | | _allocator: *mut OrtAllocator, [INFO] [stdout] 272 | | value: *mut *mut ::std::os::raw::c_char [INFO] [stdout] 273 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:305:4 [INFO] [stdout] | [INFO] [stdout] 305 | *out = (Box::leak(Box::new(tensor)) as *mut Tensor).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:285:1 [INFO] [stdout] | [INFO] [stdout] 285 | / unsafe extern "system" fn CreateTensorAsOrtValue( [INFO] [stdout] 286 | | allocator: *mut OrtAllocator, [INFO] [stdout] 287 | | shape: *const i64, [INFO] [stdout] 288 | | shape_len: usize, [INFO] [stdout] 289 | | type_: ONNXTensorElementDataType, [INFO] [stdout] 290 | | out: *mut *mut OrtValue [INFO] [stdout] 291 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:334:4 [INFO] [stdout] | [INFO] [stdout] 334 | *out = (Box::leak(Box::new(tensor)) as *mut Tensor).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:312:1 [INFO] [stdout] | [INFO] [stdout] 312 | / unsafe extern "system" fn CreateTensorWithDataAsOrtValue( [INFO] [stdout] 313 | | info: *const OrtMemoryInfo, [INFO] [stdout] 314 | | p_data: *mut ::std::os::raw::c_void, [INFO] [stdout] 315 | | p_data_len: usize, [INFO] [stdout] ... | [INFO] [stdout] 319 | | out: *mut *mut OrtValue [INFO] [stdout] 320 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:342:2 [INFO] [stdout] | [INFO] [stdout] 342 | *out = 1; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:341:1 [INFO] [stdout] | [INFO] [stdout] 341 | unsafe extern "system" fn IsTensor(_value: *const OrtValue, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:351:4 [INFO] [stdout] | [INFO] [stdout] 351 | *out = match storage { [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:346:1 [INFO] [stdout] | [INFO] [stdout] 346 | unsafe extern "system" fn GetTensorMutableData(value: *mut OrtValue, out: *mut *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:368:2 [INFO] [stdout] | [INFO] [stdout] 368 | *out = type_info.cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:367:1 [INFO] [stdout] | [INFO] [stdout] 367 | unsafe extern "system" fn CastTypeInfoToTensorInfo(type_info: *const OrtTypeInfo, out: *mut *const OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:373:2 [INFO] [stdout] | [INFO] [stdout] 373 | *out = ONNXType::ONNX_TYPE_TENSOR; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:372:1 [INFO] [stdout] | [INFO] [stdout] 372 | unsafe extern "system" fn GetOnnxTypeFromTypeInfo(_type_info: *const OrtTypeInfo, out: *mut ONNXType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:378:2 [INFO] [stdout] | [INFO] [stdout] 378 | *out = TypeInfo::new_sys(DType::F32, Vec::new()).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:377:1 [INFO] [stdout] | [INFO] [stdout] 377 | unsafe extern "system" fn CreateTensorTypeAndShapeInfo(out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:403:4 [INFO] [stdout] | [INFO] [stdout] 403 | *out = ty; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:399:1 [INFO] [stdout] | [INFO] [stdout] 399 | unsafe extern "system" fn GetTensorElementType(info: *const OrtTensorTypeAndShapeInfo, out: *mut ONNXTensorElementDataType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:412:2 [INFO] [stdout] | [INFO] [stdout] 412 | *out = info.shape.len(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:410:1 [INFO] [stdout] | [INFO] [stdout] 410 | unsafe extern "system" fn GetDimensionsCount(info: *const OrtTensorTypeAndShapeInfo, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:419:3 [INFO] [stdout] | [INFO] [stdout] 419 | *dim_values.add(i) = *dim as _; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:416:1 [INFO] [stdout] | [INFO] [stdout] 416 | unsafe extern "system" fn GetDimensions(info: *const OrtTensorTypeAndShapeInfo, dim_values: *mut i64, dim_values_length: usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:419:4 [INFO] [stdout] | [INFO] [stdout] 419 | *dim_values.add(i) = *dim as _; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:430:3 [INFO] [stdout] | [INFO] [stdout] 430 | *dim_params.add(i) = c"".as_ptr(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:424:1 [INFO] [stdout] | [INFO] [stdout] 424 | / unsafe extern "system" fn GetSymbolicDimensions( [INFO] [stdout] 425 | | _info: *const OrtTensorTypeAndShapeInfo, [INFO] [stdout] 426 | | dim_params: *mut *const ::std::os::raw::c_char, [INFO] [stdout] 427 | | dim_params_length: usize [INFO] [stdout] 428 | | ) -> OrtStatusPtr { [INFO] [stdout] | |_________________^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:430:4 [INFO] [stdout] | [INFO] [stdout] 430 | *dim_params.add(i) = c"".as_ptr(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:441:2 [INFO] [stdout] | [INFO] [stdout] 441 | *out = size; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:435:1 [INFO] [stdout] | [INFO] [stdout] 435 | unsafe extern "system" fn GetTensorShapeElementCount(info: *const OrtTensorTypeAndShapeInfo, out: *mut usize) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:447:2 [INFO] [stdout] | [INFO] [stdout] 447 | *out = TypeInfo::new_sys(tensor.dtype(), tensor.shape().dims().iter().map(|c| *c as i64).collect()).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:445:1 [INFO] [stdout] | [INFO] [stdout] 445 | unsafe extern "system" fn GetTensorTypeAndShape(value: *const OrtValue, out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:453:2 [INFO] [stdout] | [INFO] [stdout] 453 | *out = TypeInfo::new_sys(tensor.dtype(), tensor.shape().dims().iter().map(|c| *c as i64).collect()); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:451:1 [INFO] [stdout] | [INFO] [stdout] 451 | unsafe extern "system" fn GetTypeInfo(value: *const OrtValue, out: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:458:2 [INFO] [stdout] | [INFO] [stdout] 458 | *out = ONNXType::ONNX_TYPE_TENSOR; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:457:1 [INFO] [stdout] | [INFO] [stdout] 457 | unsafe extern "system" fn GetValueType(_value: *const OrtValue, out: *mut ONNXType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:492:2 [INFO] [stdout] | [INFO] [stdout] 492 | *out = if info1 == info2 { 0 } else { -1 }; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:489:1 [INFO] [stdout] | [INFO] [stdout] 489 | unsafe extern "system" fn CompareMemoryInfo(info1: *const OrtMemoryInfo, info2: *const OrtMemoryInfo, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:498:2 [INFO] [stdout] | [INFO] [stdout] 498 | *out = info.device_name_sys().as_ptr().cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:496:1 [INFO] [stdout] | [INFO] [stdout] 496 | unsafe extern "system" fn MemoryInfoGetName(ptr: *const OrtMemoryInfo, out: *mut *const ::std::os::raw::c_char) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:504:2 [INFO] [stdout] | [INFO] [stdout] 504 | *out = info.device_id() as _; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:502:1 [INFO] [stdout] | [INFO] [stdout] 502 | unsafe extern "system" fn MemoryInfoGetId(ptr: *const OrtMemoryInfo, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:510:2 [INFO] [stdout] | [INFO] [stdout] 510 | *out = info.memory_type() as _; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:508:1 [INFO] [stdout] | [INFO] [stdout] 508 | unsafe extern "system" fn MemoryInfoGetMemType(ptr: *const OrtMemoryInfo, out: *mut OrtMemType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:515:2 [INFO] [stdout] | [INFO] [stdout] 515 | *out = OrtAllocatorType::OrtDeviceAllocator; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:514:1 [INFO] [stdout] | [INFO] [stdout] 514 | unsafe extern "system" fn MemoryInfoGetType(_ptr: *const OrtMemoryInfo, out: *mut OrtAllocatorType) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:520:2 [INFO] [stdout] | [INFO] [stdout] 520 | *out = unsafe { &*ort_allocator }.Alloc.unwrap()(ort_allocator, size); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:519:1 [INFO] [stdout] | [INFO] [stdout] 519 | unsafe extern "system" fn AllocatorAlloc(ort_allocator: *mut OrtAllocator, size: usize, out: *mut *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:520:9 [INFO] [stdout] | [INFO] [stdout] 520 | *out = unsafe { &*ort_allocator }.Alloc.unwrap()(ort_allocator, size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:528:2 [INFO] [stdout] | [INFO] [stdout] 528 | unsafe { &*ort_allocator }.Free.unwrap()(ort_allocator, p); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:527:1 [INFO] [stdout] | [INFO] [stdout] 527 | unsafe extern "system" fn AllocatorFree(ort_allocator: *mut OrtAllocator, p: *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:533:2 [INFO] [stdout] | [INFO] [stdout] 533 | *out = unsafe { &*ort_allocator }.Info.unwrap()(ort_allocator); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:532:1 [INFO] [stdout] | [INFO] [stdout] 532 | unsafe extern "system" fn AllocatorGetInfo(ort_allocator: *const OrtAllocator, out: *mut *const OrtMemoryInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:533:9 [INFO] [stdout] | [INFO] [stdout] 533 | *out = unsafe { &*ort_allocator }.Info.unwrap()(ort_allocator); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:538:2 [INFO] [stdout] | [INFO] [stdout] 538 | *out = (&crate::memory::DEFAULT_CPU_ALLOCATOR as *const Allocator).cast_mut().cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:537:1 [INFO] [stdout] | [INFO] [stdout] 537 | unsafe extern "system" fn GetAllocatorWithDefaultOptions(out: *mut *mut OrtAllocator) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `Environment::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:543:7 [INFO] [stdout] | [INFO] [stdout] 543 | drop(Environment::consume_sys(input)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:542:1 [INFO] [stdout] | [INFO] [stdout] 542 | unsafe extern "system" fn ReleaseEnv(input: *mut OrtEnv) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `ort_sys::stub::Error::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:547:7 [INFO] [stdout] | [INFO] [stdout] 547 | drop(Error::consume_sys(input)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:546:1 [INFO] [stdout] | [INFO] [stdout] 546 | unsafe extern "system" fn ReleaseStatus(input: *mut OrtStatus) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `tensor::TypeInfo::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:563:7 [INFO] [stdout] | [INFO] [stdout] 563 | drop(TypeInfo::consume_sys(input)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:562:1 [INFO] [stdout] | [INFO] [stdout] 562 | unsafe extern "system" fn ReleaseTypeInfo(input: *mut OrtTypeInfo) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `tensor::TypeInfo::consume_sys` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:567:7 [INFO] [stdout] | [INFO] [stdout] 567 | drop(TypeInfo::consume_sys(input.cast())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:566:1 [INFO] [stdout] | [INFO] [stdout] 566 | unsafe extern "system" fn ReleaseTensorTypeAndShapeInfo(input: *mut OrtTensorTypeAndShapeInfo) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:571:7 [INFO] [stdout] | [INFO] [stdout] 571 | drop(Box::from_raw(input.cast::())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:570:1 [INFO] [stdout] | [INFO] [stdout] 570 | unsafe extern "system" fn ReleaseSessionOptions(input: *mut OrtSessionOptions) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:576:2 [INFO] [stdout] | [INFO] [stdout] 576 | *out = (Box::leak(Box::new(Allocator::new(mem_info))) as *mut Allocator).cast(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:574:1 [INFO] [stdout] | [INFO] [stdout] 574 | unsafe extern "system" fn CreateAllocator(_session: *const OrtSession, mem_info: *const OrtMemoryInfo, out: *mut *mut OrtAllocator) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:581:7 [INFO] [stdout] | [INFO] [stdout] 581 | drop(Box::from_raw(input.cast::())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:580:1 [INFO] [stdout] | [INFO] [stdout] 580 | unsafe extern "system" fn ReleaseAllocator(input: *mut OrtAllocator) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:587:2 [INFO] [stdout] | [INFO] [stdout] 587 | *mem_info = (tensor.device() as *const Device).cast(); [INFO] [stdout] | ^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:584:1 [INFO] [stdout] | [INFO] [stdout] 584 | unsafe extern "system" fn GetTensorMemoryInfo(value: *const OrtValue, mem_info: *mut *const OrtMemoryInfo) -> OrtStatusPtr { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> api.rs:593:2 [INFO] [stdout] | [INFO] [stdout] 593 | *out = memory_info.device_type(); [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> api.rs:591:1 [INFO] [stdout] | [INFO] [stdout] 591 | unsafe extern "system" fn MemoryInfoGetDeviceType(ptr: *const OrtMemoryInfo, out: *mut OrtMemoryInfoDeviceType) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CString::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> memory.rs:99:7 [INFO] [stdout] | [INFO] [stdout] 99 | drop(CString::from_raw(p.cast())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> memory.rs:98:1 [INFO] [stdout] | [INFO] [stdout] 98 | unsafe extern "system" fn sys_allocator_free(_this: *mut ort_sys::OrtAllocator, p: *mut ::std::os::raw::c_void) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> tensor.rs:14:3 [INFO] [stdout] | [INFO] [stdout] 14 | Box::from_raw(ptr.cast::()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> tensor.rs:13:2 [INFO] [stdout] | [INFO] [stdout] 13 | pub unsafe fn consume_sys(ptr: *mut ort_sys::OrtTypeInfo) -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> lib.rs:25:3 [INFO] [stdout] | [INFO] [stdout] 25 | Box::from_raw(ptr.cast::()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> lib.rs:24:2 [INFO] [stdout] | [INFO] [stdout] 24 | pub unsafe fn consume_sys(ptr: *mut ort_sys::OrtEnv) -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `cast_from_sys` is never used [INFO] [stdout] --> lib.rs:20:16 [INFO] [stdout] | [INFO] [stdout] 15 | impl Environment { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 20 | pub unsafe fn cast_from_sys<'e>(ptr: *const ort_sys::OrtEnv) -> &'e Environment { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `device_name` is never used [INFO] [stdout] --> memory.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 11 | impl MemoryInfo { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 39 | pub fn device_name(&self) -> &'static str { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 42.57s [INFO] running `Command { std: "docker" "inspect" "0df117729be666eb7e1632f0233d0694f195d34dd99ee5c0bd06cadc06063515", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0df117729be666eb7e1632f0233d0694f195d34dd99ee5c0bd06cadc06063515", kill_on_drop: false }` [INFO] [stdout] 0df117729be666eb7e1632f0233d0694f195d34dd99ee5c0bd06cadc06063515 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+562dee4820c458d823175268e41601d4c060588a" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] c51f91a2b3617a9844c94ab37710efad211988f66d2a0572d9e108984eafb11b [INFO] running `Command { std: "docker" "start" "-a" "c51f91a2b3617a9844c94ab37710efad211988f66d2a0572d9e108984eafb11b", kill_on_drop: false }` [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:20:2 [INFO] [stderr] | [INFO] [stderr] 20 | *out = Environment::new_sys(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:19:1 [INFO] [stderr] | [INFO] [stderr] 19 | unsafe extern "system" fn CreateEnv(_log_severity_level: OrtLoggingLevel, _logid: *const ::std::os::raw::c_char, out: *mut *mut OrtEnv) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] = note: `#[warn(unsafe_op_in_unsafe_fn)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:31:2 [INFO] [stderr] | [INFO] [stderr] 31 | *out = Environment::new_sys(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:24:1 [INFO] [stderr] | [INFO] [stderr] 24 | / unsafe extern "system" fn CreateEnvWithCustomLogger( [INFO] [stderr] 25 | | _logging_function: OrtLoggingFunction, [INFO] [stderr] 26 | | _logger_param: *mut ::std::os::raw::c_void, [INFO] [stderr] 27 | | _log_severity_level: OrtLoggingLevel, [INFO] [stderr] 28 | | _logid: *const ::std::os::raw::c_char, [INFO] [stderr] 29 | | out: *mut *mut OrtEnv [INFO] [stderr] 30 | | ) -> OrtStatusPtr { [INFO] [stderr] | |_________________^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:51:34 [INFO] [stderr] | [INFO] [stderr] 51 | let len = (0..).take_while(|&i| *model_path.offset(i) != 0).count(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:43:1 [INFO] [stderr] | [INFO] [stderr] 43 | / unsafe extern "system" fn CreateSession( [INFO] [stderr] 44 | | _env: *const OrtEnv, [INFO] [stderr] 45 | | model_path: *const os_char, [INFO] [stderr] 46 | | options: *const OrtSessionOptions, [INFO] [stderr] 47 | | out: *mut *mut OrtSession [INFO] [stderr] 48 | | ) -> OrtStatusPtr { [INFO] [stderr] | |_________________^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::ptr::const_ptr::::offset` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:51:35 [INFO] [stderr] | [INFO] [stderr] 51 | let len = (0..).take_while(|&i| *model_path.offset(i) != 0).count(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:52:13 [INFO] [stderr] | [INFO] [stderr] 52 | let path = std::slice::from_raw_parts(model_path, len); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:43:1 [INFO] [stderr] | [INFO] [stderr] 43 | / unsafe extern "system" fn CreateSession( [INFO] [stderr] 44 | | _env: *const OrtEnv, [INFO] [stderr] 45 | | model_path: *const os_char, [INFO] [stderr] 46 | | options: *const OrtSessionOptions, [INFO] [stderr] 47 | | out: *mut *mut OrtSession [INFO] [stderr] 48 | | ) -> OrtStatusPtr { [INFO] [stderr] | |_________________^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::ffi::OsString::from_encoded_bytes_unchecked` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:59:13 [INFO] [stderr] | [INFO] [stderr] 59 | let path = OsString::from_encoded_bytes_unchecked(path.iter().map(|c| *c as u8).collect::>()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:68:4 [INFO] [stderr] | [INFO] [stderr] 68 | *out = (Box::leak(Box::new(session)) as *mut Session).cast(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:84:12 [INFO] [stderr] | [INFO] [stderr] 84 | let buf = std::slice::from_raw_parts(model_data.cast::(), model_data_length); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:75:1 [INFO] [stderr] | [INFO] [stderr] 75 | / unsafe extern "system" fn CreateSessionFromArray( [INFO] [stderr] 76 | | _env: *const OrtEnv, [INFO] [stderr] 77 | | model_data: *const ::std::os::raw::c_void, [INFO] [stderr] 78 | | model_data_length: usize, [INFO] [stderr] 79 | | options: *const OrtSessionOptions, [INFO] [stderr] 80 | | out: *mut *mut OrtSession [INFO] [stderr] 81 | | ) -> OrtStatusPtr { [INFO] [stderr] | |_________________^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:88:4 [INFO] [stderr] | [INFO] [stderr] 88 | *out = (Box::leak(Box::new(session)) as *mut Session).cast(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:107:40 [INFO] [stderr] | [INFO] [stderr] 107 | let inputs: HashMap = std::slice::from_raw_parts(input_names, input_len) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:95:1 [INFO] [stderr] | [INFO] [stderr] 95 | / unsafe extern "system" fn Run( [INFO] [stderr] 96 | | session: *mut OrtSession, [INFO] [stderr] 97 | | _run_options: *const OrtRunOptions, [INFO] [stderr] 98 | | input_names: *const *const ::std::os::raw::c_char, [INFO] [stderr] ... | [INFO] [stderr] 103 | | output_ptrs: *mut *mut OrtValue [INFO] [stderr] 104 | | ) -> OrtStatusPtr { [INFO] [stderr] | |_________________^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:109:8 [INFO] [stderr] | [INFO] [stderr] 109 | .zip(std::slice::from_raw_parts(inputs, input_len)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:119:36 [INFO] [stderr] | [INFO] [stderr] 119 | let output_names: Vec = std::slice::from_raw_parts(output_names, output_names_len) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::slice::from_raw_parts_mut` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:123:22 [INFO] [stderr] | [INFO] [stderr] 123 | let output_view = std::slice::from_raw_parts_mut(output_ptrs.cast::<*mut Tensor>(), output_names_len); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:142:2 [INFO] [stderr] | [INFO] [stderr] 142 | *options = (Box::leak(Box::new(SessionOptions)) as *mut SessionOptions).cast(); [INFO] [stderr] | ^^^^^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:141:1 [INFO] [stderr] | [INFO] [stderr] 141 | unsafe extern "system" fn CreateSessionOptions(options: *mut *mut OrtSessionOptions) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:148:2 [INFO] [stderr] | [INFO] [stderr] 148 | *out_options = (Box::leak(Box::new(options.clone())) as *mut SessionOptions).cast(); [INFO] [stderr] | ^^^^^^^^^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:146:1 [INFO] [stderr] | [INFO] [stderr] 146 | unsafe extern "system" fn CloneSessionOptions(in_options: *const OrtSessionOptions, out_options: *mut *mut OrtSessionOptions) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:156:4 [INFO] [stderr] | [INFO] [stderr] 156 | *out = graph.input.len(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:152:1 [INFO] [stderr] | [INFO] [stderr] 152 | unsafe extern "system" fn SessionGetInputCount(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:167:4 [INFO] [stderr] | [INFO] [stderr] 167 | *out = graph.output.len(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:163:1 [INFO] [stderr] | [INFO] [stderr] 163 | unsafe extern "system" fn SessionGetOutputCount(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:175:2 [INFO] [stderr] | [INFO] [stderr] 175 | *out = 0; [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:174:1 [INFO] [stderr] | [INFO] [stderr] 174 | unsafe extern "system" fn SessionGetOverridableInitializerCount(_session: *const OrtSession, out: *mut usize) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:186:18 [INFO] [stderr] | [INFO] [stderr] 186 | let dtype = mem::transmute::(tensor_proto.elem_type); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:179:1 [INFO] [stderr] | [INFO] [stderr] 179 | unsafe extern "system" fn SessionGetInputTypeInfo(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:205:6 [INFO] [stderr] | [INFO] [stderr] 205 | *type_info = TypeInfo::new_sys(dtype, shape_out); [INFO] [stderr] | ^^^^^^^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:222:18 [INFO] [stderr] | [INFO] [stderr] 222 | let dtype = mem::transmute::(tensor_proto.elem_type); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:215:1 [INFO] [stderr] | [INFO] [stderr] 215 | unsafe extern "system" fn SessionGetOutputTypeInfo(session: *const OrtSession, index: usize, type_info: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:241:6 [INFO] [stderr] | [INFO] [stderr] 241 | *type_info = TypeInfo::new_sys(dtype, shape_out); [INFO] [stderr] | ^^^^^^^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:261:4 [INFO] [stderr] | [INFO] [stderr] 261 | *value = name.into_raw(); [INFO] [stderr] | ^^^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:251:1 [INFO] [stderr] | [INFO] [stderr] 251 | / unsafe extern "system" fn SessionGetInputName( [INFO] [stderr] 252 | | session: *const OrtSession, [INFO] [stderr] 253 | | index: usize, [INFO] [stderr] 254 | | _allocator: *mut OrtAllocator, [INFO] [stderr] 255 | | value: *mut *mut ::std::os::raw::c_char [INFO] [stderr] 256 | | ) -> OrtStatusPtr { [INFO] [stderr] | |_________________^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:278:4 [INFO] [stderr] | [INFO] [stderr] 278 | *value = name.into_raw(); [INFO] [stderr] | ^^^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:268:1 [INFO] [stderr] | [INFO] [stderr] 268 | / unsafe extern "system" fn SessionGetOutputName( [INFO] [stderr] 269 | | session: *const OrtSession, [INFO] [stderr] 270 | | index: usize, [INFO] [stderr] 271 | | _allocator: *mut OrtAllocator, [INFO] [stderr] 272 | | value: *mut *mut ::std::os::raw::c_char [INFO] [stderr] 273 | | ) -> OrtStatusPtr { [INFO] [stderr] | |_________________^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:305:4 [INFO] [stderr] | [INFO] [stderr] 305 | *out = (Box::leak(Box::new(tensor)) as *mut Tensor).cast(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:285:1 [INFO] [stderr] | [INFO] [stderr] 285 | / unsafe extern "system" fn CreateTensorAsOrtValue( [INFO] [stderr] 286 | | allocator: *mut OrtAllocator, [INFO] [stderr] 287 | | shape: *const i64, [INFO] [stderr] 288 | | shape_len: usize, [INFO] [stderr] 289 | | type_: ONNXTensorElementDataType, [INFO] [stderr] 290 | | out: *mut *mut OrtValue [INFO] [stderr] 291 | | ) -> OrtStatusPtr { [INFO] [stderr] | |_________________^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:334:4 [INFO] [stderr] | [INFO] [stderr] 334 | *out = (Box::leak(Box::new(tensor)) as *mut Tensor).cast(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:312:1 [INFO] [stderr] | [INFO] [stderr] 312 | / unsafe extern "system" fn CreateTensorWithDataAsOrtValue( [INFO] [stderr] 313 | | info: *const OrtMemoryInfo, [INFO] [stderr] 314 | | p_data: *mut ::std::os::raw::c_void, [INFO] [stderr] 315 | | p_data_len: usize, [INFO] [stderr] ... | [INFO] [stderr] 319 | | out: *mut *mut OrtValue [INFO] [stderr] 320 | | ) -> OrtStatusPtr { [INFO] [stderr] | |_________________^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:342:2 [INFO] [stderr] | [INFO] [stderr] 342 | *out = 1; [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:341:1 [INFO] [stderr] | [INFO] [stderr] 341 | unsafe extern "system" fn IsTensor(_value: *const OrtValue, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:351:4 [INFO] [stderr] | [INFO] [stderr] 351 | *out = match storage { [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:346:1 [INFO] [stderr] | [INFO] [stderr] 346 | unsafe extern "system" fn GetTensorMutableData(value: *mut OrtValue, out: *mut *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:368:2 [INFO] [stderr] | [INFO] [stderr] 368 | *out = type_info.cast(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:367:1 [INFO] [stderr] | [INFO] [stderr] 367 | unsafe extern "system" fn CastTypeInfoToTensorInfo(type_info: *const OrtTypeInfo, out: *mut *const OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:373:2 [INFO] [stderr] | [INFO] [stderr] 373 | *out = ONNXType::ONNX_TYPE_TENSOR; [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:372:1 [INFO] [stderr] | [INFO] [stderr] 372 | unsafe extern "system" fn GetOnnxTypeFromTypeInfo(_type_info: *const OrtTypeInfo, out: *mut ONNXType) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:378:2 [INFO] [stderr] | [INFO] [stderr] 378 | *out = TypeInfo::new_sys(DType::F32, Vec::new()).cast(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:377:1 [INFO] [stderr] | [INFO] [stderr] 377 | unsafe extern "system" fn CreateTensorTypeAndShapeInfo(out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:403:4 [INFO] [stderr] | [INFO] [stderr] 403 | *out = ty; [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:399:1 [INFO] [stderr] | [INFO] [stderr] 399 | unsafe extern "system" fn GetTensorElementType(info: *const OrtTensorTypeAndShapeInfo, out: *mut ONNXTensorElementDataType) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:412:2 [INFO] [stderr] | [INFO] [stderr] 412 | *out = info.shape.len(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:410:1 [INFO] [stderr] | [INFO] [stderr] 410 | unsafe extern "system" fn GetDimensionsCount(info: *const OrtTensorTypeAndShapeInfo, out: *mut usize) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:419:3 [INFO] [stderr] | [INFO] [stderr] 419 | *dim_values.add(i) = *dim as _; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:416:1 [INFO] [stderr] | [INFO] [stderr] 416 | unsafe extern "system" fn GetDimensions(info: *const OrtTensorTypeAndShapeInfo, dim_values: *mut i64, dim_values_length: usize) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:419:4 [INFO] [stderr] | [INFO] [stderr] 419 | *dim_values.add(i) = *dim as _; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:430:3 [INFO] [stderr] | [INFO] [stderr] 430 | *dim_params.add(i) = c"".as_ptr(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:424:1 [INFO] [stderr] | [INFO] [stderr] 424 | / unsafe extern "system" fn GetSymbolicDimensions( [INFO] [stderr] 425 | | _info: *const OrtTensorTypeAndShapeInfo, [INFO] [stderr] 426 | | dim_params: *mut *const ::std::os::raw::c_char, [INFO] [stderr] 427 | | dim_params_length: usize [INFO] [stderr] 428 | | ) -> OrtStatusPtr { [INFO] [stderr] | |_________________^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:430:4 [INFO] [stderr] | [INFO] [stderr] 430 | *dim_params.add(i) = c"".as_ptr(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:441:2 [INFO] [stderr] | [INFO] [stderr] 441 | *out = size; [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:435:1 [INFO] [stderr] | [INFO] [stderr] 435 | unsafe extern "system" fn GetTensorShapeElementCount(info: *const OrtTensorTypeAndShapeInfo, out: *mut usize) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:447:2 [INFO] [stderr] | [INFO] [stderr] 447 | *out = TypeInfo::new_sys(tensor.dtype(), tensor.shape().dims().iter().map(|c| *c as i64).collect()).cast(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:445:1 [INFO] [stderr] | [INFO] [stderr] 445 | unsafe extern "system" fn GetTensorTypeAndShape(value: *const OrtValue, out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:453:2 [INFO] [stderr] | [INFO] [stderr] 453 | *out = TypeInfo::new_sys(tensor.dtype(), tensor.shape().dims().iter().map(|c| *c as i64).collect()); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:451:1 [INFO] [stderr] | [INFO] [stderr] 451 | unsafe extern "system" fn GetTypeInfo(value: *const OrtValue, out: *mut *mut OrtTypeInfo) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:458:2 [INFO] [stderr] | [INFO] [stderr] 458 | *out = ONNXType::ONNX_TYPE_TENSOR; [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:457:1 [INFO] [stderr] | [INFO] [stderr] 457 | unsafe extern "system" fn GetValueType(_value: *const OrtValue, out: *mut ONNXType) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:492:2 [INFO] [stderr] | [INFO] [stderr] 492 | *out = if info1 == info2 { 0 } else { -1 }; [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:489:1 [INFO] [stderr] | [INFO] [stderr] 489 | unsafe extern "system" fn CompareMemoryInfo(info1: *const OrtMemoryInfo, info2: *const OrtMemoryInfo, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:498:2 [INFO] [stderr] | [INFO] [stderr] 498 | *out = info.device_name_sys().as_ptr().cast(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:496:1 [INFO] [stderr] | [INFO] [stderr] 496 | unsafe extern "system" fn MemoryInfoGetName(ptr: *const OrtMemoryInfo, out: *mut *const ::std::os::raw::c_char) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:504:2 [INFO] [stderr] | [INFO] [stderr] 504 | *out = info.device_id() as _; [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:502:1 [INFO] [stderr] | [INFO] [stderr] 502 | unsafe extern "system" fn MemoryInfoGetId(ptr: *const OrtMemoryInfo, out: *mut ::std::os::raw::c_int) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:510:2 [INFO] [stderr] | [INFO] [stderr] 510 | *out = info.memory_type() as _; [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:508:1 [INFO] [stderr] | [INFO] [stderr] 508 | unsafe extern "system" fn MemoryInfoGetMemType(ptr: *const OrtMemoryInfo, out: *mut OrtMemType) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:515:2 [INFO] [stderr] | [INFO] [stderr] 515 | *out = OrtAllocatorType::OrtDeviceAllocator; [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:514:1 [INFO] [stderr] | [INFO] [stderr] 514 | unsafe extern "system" fn MemoryInfoGetType(_ptr: *const OrtMemoryInfo, out: *mut OrtAllocatorType) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:520:2 [INFO] [stderr] | [INFO] [stderr] 520 | *out = unsafe { &*ort_allocator }.Alloc.unwrap()(ort_allocator, size); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:519:1 [INFO] [stderr] | [INFO] [stderr] 519 | unsafe extern "system" fn AllocatorAlloc(ort_allocator: *mut OrtAllocator, size: usize, out: *mut *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:520:9 [INFO] [stderr] | [INFO] [stderr] 520 | *out = unsafe { &*ort_allocator }.Alloc.unwrap()(ort_allocator, size); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:528:2 [INFO] [stderr] | [INFO] [stderr] 528 | unsafe { &*ort_allocator }.Free.unwrap()(ort_allocator, p); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:527:1 [INFO] [stderr] | [INFO] [stderr] 527 | unsafe extern "system" fn AllocatorFree(ort_allocator: *mut OrtAllocator, p: *mut ::std::os::raw::c_void) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:533:2 [INFO] [stderr] | [INFO] [stderr] 533 | *out = unsafe { &*ort_allocator }.Info.unwrap()(ort_allocator); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:532:1 [INFO] [stderr] | [INFO] [stderr] 532 | unsafe extern "system" fn AllocatorGetInfo(ort_allocator: *const OrtAllocator, out: *mut *const OrtMemoryInfo) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:533:9 [INFO] [stderr] | [INFO] [stderr] 533 | *out = unsafe { &*ort_allocator }.Info.unwrap()(ort_allocator); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:538:2 [INFO] [stderr] | [INFO] [stderr] 538 | *out = (&crate::memory::DEFAULT_CPU_ALLOCATOR as *const Allocator).cast_mut().cast(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:537:1 [INFO] [stderr] | [INFO] [stderr] 537 | unsafe extern "system" fn GetAllocatorWithDefaultOptions(out: *mut *mut OrtAllocator) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `Environment::consume_sys` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:543:7 [INFO] [stderr] | [INFO] [stderr] 543 | drop(Environment::consume_sys(input)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:542:1 [INFO] [stderr] | [INFO] [stderr] 542 | unsafe extern "system" fn ReleaseEnv(input: *mut OrtEnv) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `ort_sys::stub::Error::consume_sys` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:547:7 [INFO] [stderr] | [INFO] [stderr] 547 | drop(Error::consume_sys(input)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:546:1 [INFO] [stderr] | [INFO] [stderr] 546 | unsafe extern "system" fn ReleaseStatus(input: *mut OrtStatus) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `tensor::TypeInfo::consume_sys` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:563:7 [INFO] [stderr] | [INFO] [stderr] 563 | drop(TypeInfo::consume_sys(input)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:562:1 [INFO] [stderr] | [INFO] [stderr] 562 | unsafe extern "system" fn ReleaseTypeInfo(input: *mut OrtTypeInfo) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `tensor::TypeInfo::consume_sys` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:567:7 [INFO] [stderr] | [INFO] [stderr] 567 | drop(TypeInfo::consume_sys(input.cast())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:566:1 [INFO] [stderr] | [INFO] [stderr] 566 | unsafe extern "system" fn ReleaseTensorTypeAndShapeInfo(input: *mut OrtTensorTypeAndShapeInfo) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:571:7 [INFO] [stderr] | [INFO] [stderr] 571 | drop(Box::from_raw(input.cast::())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:570:1 [INFO] [stderr] | [INFO] [stderr] 570 | unsafe extern "system" fn ReleaseSessionOptions(input: *mut OrtSessionOptions) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:576:2 [INFO] [stderr] | [INFO] [stderr] 576 | *out = (Box::leak(Box::new(Allocator::new(mem_info))) as *mut Allocator).cast(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:574:1 [INFO] [stderr] | [INFO] [stderr] 574 | unsafe extern "system" fn CreateAllocator(_session: *const OrtSession, mem_info: *const OrtMemoryInfo, out: *mut *mut OrtAllocator) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:581:7 [INFO] [stderr] | [INFO] [stderr] 581 | drop(Box::from_raw(input.cast::())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:580:1 [INFO] [stderr] | [INFO] [stderr] 580 | unsafe extern "system" fn ReleaseAllocator(input: *mut OrtAllocator) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:587:2 [INFO] [stderr] | [INFO] [stderr] 587 | *mem_info = (tensor.device() as *const Device).cast(); [INFO] [stderr] | ^^^^^^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:584:1 [INFO] [stderr] | [INFO] [stderr] 584 | unsafe extern "system" fn GetTensorMemoryInfo(value: *const OrtValue, mem_info: *mut *const OrtMemoryInfo) -> OrtStatusPtr { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stderr] --> api.rs:593:2 [INFO] [stderr] | [INFO] [stderr] 593 | *out = memory_info.device_type(); [INFO] [stderr] | ^^^^ dereference of raw pointer [INFO] [stderr] | [INFO] [stderr] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> api.rs:591:1 [INFO] [stderr] | [INFO] [stderr] 591 | unsafe extern "system" fn MemoryInfoGetDeviceType(ptr: *const OrtMemoryInfo, out: *mut OrtMemoryInfoDeviceType) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::ffi::CString::from_raw` is unsafe and requires unsafe block [INFO] [stderr] --> memory.rs:99:7 [INFO] [stderr] | [INFO] [stderr] 99 | drop(CString::from_raw(p.cast())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> memory.rs:98:1 [INFO] [stderr] | [INFO] [stderr] 98 | unsafe extern "system" fn sys_allocator_free(_this: *mut ort_sys::OrtAllocator, p: *mut ::std::os::raw::c_void) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stderr] --> tensor.rs:14:3 [INFO] [stderr] | [INFO] [stderr] 14 | Box::from_raw(ptr.cast::()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> tensor.rs:13:2 [INFO] [stderr] | [INFO] [stderr] 13 | pub unsafe fn consume_sys(ptr: *mut ort_sys::OrtTypeInfo) -> Box { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stderr] --> lib.rs:25:3 [INFO] [stderr] | [INFO] [stderr] 25 | Box::from_raw(ptr.cast::()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stderr] | [INFO] [stderr] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stderr] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stderr] --> lib.rs:24:2 [INFO] [stderr] | [INFO] [stderr] 24 | pub unsafe fn consume_sys(ptr: *mut ort_sys::OrtEnv) -> Box { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = note: for more information, see [INFO] [stderr] [INFO] [stderr] warning: associated function `cast_from_sys` is never used [INFO] [stderr] --> lib.rs:20:16 [INFO] [stderr] | [INFO] [stderr] 15 | impl Environment { [INFO] [stderr] | ---------------- associated function in this implementation [INFO] [stderr] ... [INFO] [stderr] 20 | pub unsafe fn cast_from_sys<'e>(ptr: *const ort_sys::OrtEnv) -> &'e Environment { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: method `device_name` is never used [INFO] [stderr] --> memory.rs:39:9 [INFO] [stderr] | [INFO] [stderr] 11 | impl MemoryInfo { [INFO] [stderr] | --------------- method in this implementation [INFO] [stderr] ... [INFO] [stderr] 39 | pub fn device_name(&self) -> &'static str { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0133`. [INFO] [stderr] warning: `ort-candle` (lib) generated 66 warnings (run `cargo fix --lib -p ort-candle` to apply 51 suggestions) [INFO] [stderr] warning: `ort-candle` (lib test) generated 66 warnings (66 duplicates) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.22s [INFO] [stderr] Running unittests lib.rs (/opt/rustwide/target/debug/deps/ort_candle-4237b565e125c2b1) [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] Running tests/memory.rs (/opt/rustwide/target/debug/deps/memory-15ed8c29b6ee82aa) [INFO] [stdout] [INFO] [stdout] running 1 test [INFO] [stdout] test test_memory_info_apis ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s [INFO] [stdout] [INFO] [stderr] Running tests/tensor.rs (/opt/rustwide/target/debug/deps/tensor-8d80a441342c22f1) [INFO] [stdout] [INFO] [stdout] running 1 test [INFO] [stdout] test test_tensors ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s [INFO] [stdout] [INFO] [stderr] Doc-tests ort_candle [INFO] [stdout] [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "c51f91a2b3617a9844c94ab37710efad211988f66d2a0572d9e108984eafb11b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c51f91a2b3617a9844c94ab37710efad211988f66d2a0572d9e108984eafb11b", kill_on_drop: false }` [INFO] [stdout] c51f91a2b3617a9844c94ab37710efad211988f66d2a0572d9e108984eafb11b