Monday, October 25, 2021 at 16:05:00 UTC
Yay, I finally got my stack trace.
Line 157 is the one with the cursor. The if (j >= array_size) break; is supposed to prevent the invalid access, but it should be i in that statement, not j .
This is way better than my previous method of finding segfaults, which was prefixing every line with a macro that prints out the file and line number so that I could see what the last line executed was.
I suspect this may not be the same bug though, because it's a read access and so it wouldn't have corrupted the stack, making the other stack trace fail.