- bitorder::read and bitorder::write may fail because of unaligned access #2734.

This commit is contained in:
Christoffer Lerno
2026-01-12 01:11:31 +01:00
parent 8fa59cbb43
commit e93f22fbda
3 changed files with 18 additions and 8 deletions

View File

@@ -1,5 +1,12 @@
module std::core::bitorder @test;
fn void test_unaligned()
{
usz file_size;
char[64] response;
bitorder::write(file_size, response[9..], ULongLE);
}
fn void test_read()
{
char[*] bytes = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };