Cherry pick commits from release/2.3 + remove test from SoftPtr suite
New commits.
Also forgot to cherry-pick some old commits.
Remove test from SoftPtr suite that is dangerous if the project isn't built with Address Sanitizer.
Edited by Félix Olart