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
String.trim_in_place wasn't written to work correctly if you were
to trim the string down to nothing and then append a size less than the
"alloc" value that is left. This combination could result in incorrect
handling for strings that end up with a size of 0.
This is because, a new pointer was created, but we retained incorrect
alloc info. This wouldn't cause an error so long as when you used the
string for something like an append, reserve allocated new memory.
However, if the appended value was less than the perceived alloc size,
no additional memory would be added and kaboom.
Closes#1996
String.trim_in_place wasn't written to work correctly if you were
to trim the string down to nothing and then append a size less than the
"alloc" value that is left. This combination could result in incorrect
handling for strings that end up with a size of 0.
This is because, a new pointer was created, but we retained incorrect
alloc info. This wouldn't cause an error so long as when you used the
string for something like an append, reserve allocated new memory.
However, if the appended value was less than the perceived alloc size,
no additional memory would be added and kaboom.
Closes#1996
See:
https://pony.groups.io/g/user/topic/segv_by_string_trim_in_place/5435457?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,5435457
The text was updated successfully, but these errors were encountered: