facebookresearch / gtn

Automatic differentiation with weighted finite-state transducers.
MIT License
453 stars 40 forks source link

Fix UB with buffer overwrite in shortest #30

Closed jacobkahn closed 3 years ago

jacobkahn commented 3 years ago

degrees[n] is used without a resize; only with a reserve -- worked with implementations that soft-resized or expanded after a reserve.

Could be a source of UB in previous experiments, but impossible to know.