Closed FractalFir closed 9 months ago
The code handling places currently incorrectly assumes only slices and string slices are unsized.
There are other types which are unsized(e.g. Path).
This is the cause of a miscompilation preventing the .NET build of std from opening files.
This MIR statement:
_7 = &(((*_1).0: ffi::os_str::OsStr).0: sys::unix::os_str::Slice)
attempts to convert a path to the underlying slice. Due to this bug, the codegen emits code which sets the proper slice address, but not size. This causes std to attempt to allocate an incorrectly sized buffer(~17TB), which fails.
The code handling places currently incorrectly assumes only slices and string slices are unsized.
There are other types which are unsized(e.g. Path).
This is the cause of a miscompilation preventing the .NET build of std from opening files.
This MIR statement:
attempts to convert a path to the underlying slice. Due to this bug, the codegen emits code which sets the proper slice address, but not size. This causes std to attempt to allocate an incorrectly sized buffer(~17TB), which fails.