The exception recovery mechanism for the uninitialized_* algorithms did not work for iterators into discontiguous memory.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@147343 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/algorithm b/include/algorithm
index 4679845..f9c6843 100644
--- a/include/algorithm
+++ b/include/algorithm
@@ -4751,6 +4751,8 @@
     while (true)
     {
     __restart:
+        if (__nth == __last)
+            return;
         difference_type __len = __last - __first;
         switch (__len)
         {