[all-commits] [llvm/llvm-project] 0940be: [mlir][bufferization] Never pass ownership to func...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Mon Feb 5 03:12:01 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0940be158104e055ab255ccb5c1af9c7ccc7358f
https://github.com/llvm/llvm-project/commit/0940be158104e055ab255ccb5c1af9c7ccc7358f
Author: Matthias Springer <me at m-sp.org>
Date: 2024-02-05 (Mon, 05 Feb 2024)
Changed paths:
M mlir/docs/Bufferization.md
M mlir/include/mlir/Dialect/Bufferization/Pipelines/Passes.h
M mlir/lib/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation.cpp
M mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-callop-interface.mlir
M mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-function-boundaries.mlir
Log Message:
-----------
[mlir][bufferization] Never pass ownership to functions (#80655)
Even when `private-function-dynamic-ownership` is set, ownership should
never be passed to the callee. This can lead to double deallocs (#77096)
or use-after-free in the caller because ownership is currently passed
regardless of whether there are any further uses of the buffer in the
caller or not.
Note: This is consistent with the fact that ownership is never passed to
nested regions.
This commit fixes #77096.
More information about the All-commits
mailing list