mirror of https://github.com/llvm/torch-mlir
0b7c443256
Although `refCount` is initialized as `std::atomic<int> refCount{0};` in the definition of Tensor, our tail-allocating malloc would ignore it, resulting in bogus values that led to leaks. Caught with LeakSanitizer, but I added an assertion that the refcount is non-negative to begin with, which should catch this bug in the future fairly consistently (assuming the garbage refcount is negative half the time). |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
CompilerDataStructures.h | ||
CompilerRuntime.cpp | ||
Runtime.cpp | ||
unix_version.script |