This script invariably causes a SEGV