ladybird/Kernel/Heap
Daniel Bertalan b9f30c6f2a Everywhere: Fix some alignment issues
When creating uninitialized storage for variables, we need to make sure
that the alignment is correct. Fixes a KUBSAN failure when running
kernels compiled with Clang.

In `Syscalls/socket.cpp`, we can simply use local variables, as
`sockaddr_un` is a POD type.

Along with moving the `alignas` specifier to the correct member,
`AK::Optional`'s internal buffer has been made non-zeroed by default.
GCC emitted bogus uninitialized memory access warnings, so we now use
`__builtin_launder` to tell the compiler that we know what we are doing.
This might disable some optimizations, but judging by how GCC failed to
notice that the memory's initialization is dependent on `m_has_value`,
I'm not sure that's a bad thing.
2021-07-03 01:56:31 +04:30
..
Heap.h Kernel: Only deallocate memory when alloc succeeds 2021-07-01 17:32:34 +02:00
kmalloc.cpp Everywhere: Fix some alignment issues 2021-07-03 01:56:31 +04:30
kmalloc.h AK+Kernel: Make fallible allocations compiler-agnostic 2021-06-24 17:35:49 +04:30
SlabAllocator.cpp Kernel: Add slab allocator for 256 bytes 2021-06-26 11:08:52 +02:00
SlabAllocator.h AK+Kernel: Make fallible allocations compiler-agnostic 2021-06-24 17:35:49 +04:30