After a lot of debugging I discovered it was a stack/heap collision, but wasn't reported as one. I've seen those before, so I don't know why it didn't. Digging further, it seems OP_PUSH isn't checked for collision, only OP_STACK, OP_CALL and a few select others are. So I think I was blowing the stack (in fact, I don't think there was any heap data at all, so I've a feeling I was going entirely outside of dynamic memory). This was the code (using YSI 5.x):
I got this error:
After a lot of debugging I discovered it was a stack/heap collision, but wasn't reported as one. I've seen those before, so I don't know why it didn't. Digging further, it seems
OP_PUSH
isn't checked for collision, onlyOP_STACK
,OP_CALL
and a few select others are. So I think I was blowing the stack (in fact, I don't think there was any heap data at all, so I've a feeling I was going entirely outside of dynamic memory). This was the code (using YSI 5.x):It was actually @IllidanS4 that noticed a problem, which I failed to track down with crashdetect. The exact crash is on this call:
https://github.com/pawn-lang/YSI-Includes/blob/6d5a39cf6aa0a77644e170ee53722867658e1401/YSI_Coding/y_functional/y_functional_rewrite.inc#L205-L211
The code immediately before is run, but the function is never entered.