CProxySection_ArrayBase: Fix bug caused by inconsistent new/deletes
authorRamprasad Venkataraman <ramv@illinois.edu>
Thu, 26 Aug 2010 22:40:11 +0000 (17:40 -0500)
committerRamprasad Venkataraman <ramv@illinois.edu>
Tue, 31 Aug 2010 19:30:36 +0000 (14:30 -0500)
commit1db08ead8ab41b31dd3113ba71327d34ef074ba6
tree02247d0d26d7b6a3edfc57c9a62f790710e3dcee
parentc34cdcde455c93847724c344ffeb739a3a5a51d2
CProxySection_ArrayBase: Fix bug caused by inconsistent new/deletes

Implementing cross-array-sections required new constructors for creating multi-array
sections. These constructors always used new[] even if the section spanned just one
chare array. The destructor on the other hand uses delete / delete[] depending on the
number of arrays in the section. Using these constructors to create a single-array
section causes segfaults in the destructor.

Quick fix so that new[] is used only if _nsid > 1 irrespective of which constructor
is invoked.
src/ck-core/ckarray.h