Open adammoody opened 3 years ago
Thanks for catching this. It's definitely a bug, but not as bad as it may seem (and it only affects BBAPI). The two most common BBAPI cases will work fine and should not trigger the bug:
That said, I can see this being an issue if you do:
AXL_Add() + app crashes + app restarts + AXL_Resume() + AXL_Wait().
During AXL_Create, we are saving a pointer to a transfer definition in the kvtree, which is then saved to the state file.
https://github.com/ECP-VeloC/AXL/blob/a799cd9b7a406a80173ecb2bf3a32000f432f8ce/src/axl_async_bbapi.c#L276
On resume, this pointer is extracted here, which can lead to a crash on StartTransfer:
https://github.com/ECP-VeloC/AXL/blob/a799cd9b7a406a80173ecb2bf3a32000f432f8ce/src/axl_async_bbapi.c#L362
We need to check any/all pointers that are saved in the kvtree to make sure those values aren't referenced after a resume.