More robust specs, not relying on undefined behavior