FuelLabs / fuel-vm

Fuel v2 interpreter in Rust
Other
358 stars 88 forks source link

Handle error in the cases with `MaybeUninit` #811

Closed xgreenx closed 2 months ago

xgreenx commented 2 months ago

During decoding arrays, we use MaybeUninit. If we get an error during this process, we will have a memory leak since MaybeUninit doesn't call drop on internal objects.

image
acerone85 commented 2 months ago

I can have a look at this one while I am blocked on other issues.

Is this the only function where we need to handle errors on partial initialization?