Closed
Description
Vec::as_ptr
returns a pointer to address 0x1
for empty vectors. As it seems, this is an internal implementation detail for RawVec
and allocation.
This behavior is unexpected and not documented. In certain scenarios it might cause a segmentation fault (e.g. due to failed checks for a null pointer when dealing with FFI).