Fix some sporadic segfaults that are triggered when SmallVector's heap
authorDan Gohman <gohman@apple.com>
Thu, 17 May 2007 18:29:01 +0000 (18:29 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 17 May 2007 18:29:01 +0000 (18:29 +0000)
commitdf799afbecee669fb8b86c9590ad2d32d9e3216f
treef41ed11b05c86abfbba53a4f2cb1a016678a0d84
parente1e9bc7e094b4abe61d4dc173bf7d11784521061
Fix some sporadic segfaults that are triggered when SmallVector's heap
storage lands near the end of the available address space. In the expression
Begin+N > Capacity, the Begin+N was overflowing. Fix this by replacing it
by with an expression that doesn't involve computation of an address
beyond the end of allocated memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37171 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/SmallVector.h