cast_slice::<u8, T> panics with TargetAlignmentGreaterAndInputNotAligned on KDB IPC payloads where a variable-length column leaves a numeric column at a misaligned wire offset. The sync decode path's alignment fallback used Bytes::copy_from_slice (Vec<u8> layout, align=1), which only happens to work because most allocators over-align byte blocks -- not guaranteed by Rust's allocator API. The async pipelined path went through read_bytes(len * size) directly, with no alignment branch at all, and panicked in arrow projection's as_*_slice on Windows release builds under AsyncPool.query. Both paths now back typed columns with Vec<T> (Layout::array::<T> guarantees align_of::<T>()), exposed as bytes::Bytes via a new AlignedTBuf<T> AsRef<[u8]> owner passed to Bytes::from_owner. Sync fallback uses the same wrapper. Pipelined typed reads route through a new read_typed_bytes::<T> helper that swaps in for every typed Primitive arm in decode_vector_async. Regression test in pipelined::tests constructs a table with an odd- length symbol column followed by Long, exercising the previously panicking path. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||