profiling: guard against setlimit overflow