Closed Itay2805 closed 1 year ago
ok the issue was with my generation, I had a label I jump to but I don't actually place it in the function, this could have been avoided with a better check at link time that every jump has a destination inside the same function but its not a bug so I am closing this issue
I have a very weird crash inside of
_MIR_duplicate_func_insns
, when I callMIR_gen
on a function, that is caused from a label operand having a NULL value. after a bit of debugging I see that inredirect_duplicated_labels
, when it is called fromprocess_inlines
, the label is being set to null by the following code (akainsn->ops[n].u.label->data
is NULL):this is the state of the IR just before the following instruction is processed (done by using
MIR_output_func
at the end of the previous iteration) (this is the instruction infunc_insn
):This part is formed from the following inlines, you can see that RunWorker has inside of it the following code:
is indeed inlined into
Callback
, and the problem is that specifically after processing that inlined call instruction thejmp L25
is turned into ajmp NULL
.I am still trying to debug the issue and figure what it is and if there is an easy way to reproduce it, but figured I would at least post what I have so far, will update if I find anything from more debugging