Conversation

One interesting property of shell (bash, etc.) is that all heap objects are uniquely owned and never borrowed, so there's no GC necessary to achieve memory safety.
3
63
Replying to
Variable names are essentially addresses and namerefs are pretty much pointers: #!/bin/bash set -o nounset name=var declare -n p=$name declare -n q=$name p=1 echo $q p=2 echo $q unset p echo $q Attacker controlled nameref value can easily be an arbitrary (variable) read/write.
1
2