ad cp crashes in 3.1.8:
./bin/ad/ad cp /Volumes/normal/foo /Volumes/normal/bar
Segmentation fault
This is a regression introduced by 3b7100c43dd34985d3b03f048341d3d48fbf5840 which changed getvolbypath() to use realpath() on src and dst instead of a custom function.
Unfortunately realpath() returns ENOENT if there's no object at the path which breaks loading the volume handle. As a result the dest volume handle is NULL and when it's later dereferenced via dvol->member we core.
Simple fix is to revert the commit that introduced the regression.
Fixed in 3.1.9