-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsP-mediumMedium priorityMedium priority
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).
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsP-mediumMedium priorityMedium priority