Open jabraham17 opened 7 months ago
Reopening this because, while we fixed the compile-time bug that was affecting this future, the original segfault at runtime still occurs.
I've managed to convert it into an "attempt to dereference nil" error with some slight massaging of the list code, but it still breaks in ways that it shouldn't. PR forthcoming.
I've opened https://github.com/chapel-lang/chapel/pull/24598 which refuturizes listInitEqualsArrayBug.chpl
.
Note that the following variant has been split off into a separate test since it always seems to work:
var a: list(?) = [[1,2,3],[4,5,6]];
writeln(a.type:string, " = ", a);
It is only this variant with a specified array type that seems to fail on COMM != none
:
var b: list([1..3] int) = [[1,2,3],[4,5,6]];
writeln(b.type:string, " = ", b);
Note that before I massaged the List
initializer code in #24598, this test failed with a segfault instead. The segfault is concerning to me, because I think the pattern I sidestepped (calling pushBack
directly on the x
loop index variable) should work out of the box.
At first glance, my guess is the failing example is breaking due to runtime types. I haven't debugged it further yet though.
The following code compiles, but crashes at runtime due to memory issues.
This seg faults at the initialization of
b
. Adjusting the domain of the contained array to be zero-based does not resolve the issue. The following code does work as expected.This correctly creates a list of arrays. I would expect both of these programs to have the same result and correctly initialize the list.
This issue is captured as a future test in
test/library/standard/List/initEquals/listInitEqualsArrayBug.chpl
chpl --version output
printchplenv output