You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f467a98
Browse filesBrowse the repository at this point in the historyBrowse files
Initialize empty std::string values with a null terminator (#478)
The `std::string` rules model strings as null-terminated vectors, but
default initialization produced an empty vector. Operations such as
`length()` then incorrectly assume a terminator exists.
- **Type rules:** Initialize default strings with `vec![0]` in both
unsafe and refcount models.
- **Regression coverage:** Add a default-constructed string case that
checks `length()`.
```cpp
std::string empty;
assert(empty.length() == 0);
```
<!-- START COPILOT CODING AGENT SUFFIX -->
- Fixes#455
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt>
0 commit comments