Index operation on array causes segfault

64 views
Skip to first unread message

hamzeh alsalhi

unread,
Jul 11, 2014, 9:10:47 AM7/11/14
to haskel...@googlegroups.com
This post might be a duplicate of a post I made yesterday but I have not seen it go through so please excuse me if it is. I have a 2D array called img as part of a (fairly lengthy) Haskell program, when I do an indexing operation on it I get a runtime segfault. However I can call "extent" on it just fine and I get back that it has shape 20 by 20, any index within these bounds (0-19) on both axis causes a segfault. Other operations that cause cause a segault on img are "ComputeUnboxedS", "DeepSeqArray", "SumAllS", and "traverse". It is clear that it is these operations causing the segfault because when I remove them and run the program it runs continuously with no sign of segfault. Two things worth noting, 1) I have removed any behavior based on random number generation from the program yet it still segfaults at seemingly inconsistent points in the run, the segfault is not usually at the same point. 2) The array img is the result of slicing a 4D array with "All" on two dimensions and specfifc indecies on the other two dimensions, this gives me the 20 by 20 delayed array of unboxed doubles.

hamzeh alsalhi

unread,
Jul 12, 2014, 10:50:50 AM7/12/14
to haskel...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages