Setting Terminal tab names in OS X and using vim
Well, I've solved my own problem. I fail programming 101.

By defining vim as a function and then calling vim, I set up an infinite recursive loop. No wonder my terminal crashed. I need to call the "real" vim, the actual executable. This did the trick:

function vim
{
    printf "\e]1;"`basename "$1"`"\a"
    /usr/bin/vim "$1"
}