-
Couldn't load subscription status.
- Fork 105
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe what you are looking for
We should explore recent memory safety extensions and their applications to StringZilla interfaces and string classes. Namely, consider __ARM_FEATURE_MEMORY_TAGGING, AddressSanitizer & MemorySanitizer poisoning, and C++26 contracts. At this point we only do this:
/**
* @brief For higher safety, we annotate the lifetime bound of the returned string slices.
* https://clang.llvm.org/docs/AttributeReference.html#id11
* https://lemire.me/blog/2024/07/26/safer-code-in-c-with-lifetime-bounds/
*/
#if !defined(__has_cpp_attribute)
#define sz_lifetime_bound
#elif __has_cpp_attribute(msvc::lifetimebound)
#define sz_lifetime_bound [[msvc::lifetimebound]]
#elif __has_cpp_attribute(clang::lifetimebound)
#define sz_lifetime_bound [[clang::lifetimebound]]
#elif __has_cpp_attribute(lifetimebound)
#define sz_lifetime_bound [[lifetimebound]]
#else
#define sz_lifetime_bound
#endifCan you contribute to the implementation?
- I can contribute
Is your feature request specific to a certain interface?
C++ bindings
Contact Details
No response
Is there an existing issue for this?
- I have searched the existing issues
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request