Buffer stealing reinterpret/reshape

An array is effectively a

mutable struct jl_array{T,N}
data::Ptr{T}
...
end

That is, it is always held by reference to the jl_array struct. We can simply mutate the target, which is what happens when you resize! an array, and all references to the array will see the resize.

Of course there is a problem if someone is holding a view to the array and we null it. Access to the view will then cause a segfault close to null / nullpointer deref. This will be almost surely non-exploitable.

This is currently true as well, see https://github.com/JuliaLang/julia/issues/25743: When we hold a view and somebody resizes the underlying array, then access to the view gives us a nice read/write heap-overflow that is almost surely exploitable for code-execution. So this new feature would definitely not make the situation worse.

edit: Of course one could turn the issue into an oob-exception by re-introducing boundschecks for views, but that was rejected for performance reasons (and rightly so, I think).