You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These functions match the c2rust transpiled malloc, calloc, realloc, reallocarray on 64-bit systems, but c2rust transpile hardcodes size_t as libc::c_ulong, which (usually, not on Windows) is u64, rather than using the platform-independent libc::size_t/usize. This is something we'd like to fix in c2rust transpile (#259, #305), but at least for that you could re-transpile on different platforms. We can't do that for c2rust_analysis_rt, though, so we should match the platform-independent way libc translates these functions, using libc::size_t.
The text was updated successfully, but these errors were encountered:
The handler functions in
analysis/runtime/src/handlers.rs
for the hooked allocator functions are currently hardcoded for 64-bit systems, namelymalloc
:c2rust/analysis/runtime/src/handlers.rs
Line 5 in 88accbd
calloc
:c2rust/analysis/runtime/src/handlers.rs
Line 22 in 88accbd
realloc
:c2rust/analysis/runtime/src/handlers.rs
Line 32 in 88accbd
reallocarray
:c2rust/analysis/runtime/src/handlers.rs
Line 46 in 88accbd
These functions match the
c2rust transpile
dmalloc
,calloc
,realloc
,reallocarray
on 64-bit systems, butc2rust transpile
hardcodessize_t
aslibc::c_ulong
, which (usually, not on Windows) isu64
, rather than using the platform-independentlibc::size_t
/usize
. This is something we'd like to fix inc2rust transpile
(#259, #305), but at least for that you could re-transpile on different platforms. We can't do that forc2rust_analysis_rt
, though, so we should match the platform-independent waylibc
translates these functions, usinglibc::size_t
.The text was updated successfully, but these errors were encountered: