Fixed invalid read in TestDarwin