Xilinx/mlir-aie

use after free in `AIEObjectFifoRegisterProcess`

makslevental opened this issue ยท 4 comments

core = &coreOp;
}
Region &r = core->getBody();

the above is a use after free that has gone undetected until now for whatever reason (undefined behavior?). Compiling against LLVM-17 caught it here (note that gcc does not care/complain). I'm going to fix this one but this pattern actually appears in many many places in the code base.

Thank you Maks. I apologize, I haven't maintained this code in quite a while and it's not used aside from these tests (I actually wanted to move it to the AIEX dialect but never got to it). Did you say you fixed it already? Otherwise, I can take a look at it tomorrow, let me know!

Did you say you fixed it already? Otherwise, I can take a look at it tomorrow, let me know!

It's fixed in #1206 (I believe ๐Ÿคž) but it would be good to do an audit and track down where else this kind of getOps type thing is done. Of course that's not like a command to you, but more of a mental note to myself to remember to do it.

But also if this is unused we should remove it - the best PR is one that deletes code ๐Ÿ˜„

Thank you Maks! I'll make the same kind of note to myself and pay attention if I catch it while working on the repo. I also agree with potentially deleting that code. I'll give it a harder think after the next few weeks and either delete it or move it to my fork.