This is consistent with LLVM and Clang. The lit shell isn't a complete
bash implementation, but its behavior is more easily reproducible. This
fixes some ubsan test failures.
One test requires a shell currently, so I added "REQUIRES: shell", and the other doesn't work on Windows because it prints a stack trace and uses a linker that doesn't support DWARF. We can fix it eventually through other means.