New Issue: Assigning default-initialized arrays of c_ptr causes segfault

20305, "benharsh", "Assigning default-initialized arrays of c_ptr causes segfault", "2022-07-26T18:33:50Z"

The following program segfaults when compiled with CHPL_COMM=none:


use CTypes;

proc main() {
  var A : [0..<10] c_ptr(uint(8));
  var B : [0..<10] c_ptr(uint(8));

  // This is fine:
  //for (a,b) in zip(A,B) {
  //  a = b;
  //}

  A = B;
}

Note that assignment between c_ptrs is mean to copy the pointer, not dereference anything.