Test case to illustate/reproduce bug.
Copy only up to `min(new_size, old_size)` when doing reallocate.

Fix #16687
auto merge of #16706 : pnkfelix/rust/fsk-fix-nojem-realloc, r=thestinger

Copy only up to `min(new_size, old_size)` when doing reallocate.

This was a bug when running with jemalloc disabled.

Fix #16687