pytorch
3baa363f - [Functorch] Make minpybind less likely to crash (#84788)

Commit
2 years ago
[Functorch] Make minpybind less likely to crash (#84788) Error handling in `vector_args::parse` is fundamentally broken, as it calls to [`_PyArg_ParseStackAndKeywords`](https://github.com/python/cpython/blob/000593c0f97ac9b75b56064a957b84a3aaa60674/Include/modsupport.h#L106) variadic function, which are akin to `sscanf` without any arguments, which results, in case of partial parse in a random segfault/stack corruption. Remedy it by passing a few references to dummy pyobject Pull Request resolved: https://github.com/pytorch/pytorch/pull/84788 Approved by: https://github.com/zou3519
Author
Committer
Parents
Loading