Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch.Tensor.rot90: Heap-buffer-overflow #116250

Open
yonghyeon1064 opened this issue Dec 21, 2023 · 0 comments
Open

torch.Tensor.rot90: Heap-buffer-overflow #116250

yonghyeon1064 opened this issue Dec 21, 2023 · 0 comments
Labels
oncall: quantization Quantization support in PyTorch

Comments

@yonghyeon1064
Copy link

yonghyeon1064 commented Dec 21, 2023

🐛 Describe the bug

torch.Tensor.rot90 causes heap buffer overflow with specific input.

Test code:

import torch

t_base = torch.randn(2,2)
t = torch.quantize_per_tensor(t_base, 0.1, 10, torch.quint4x2)
t.rot90(-3,(1,0))

Error log:

=================================================================
==848202==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x609000000142 at pc 0x7f48004c218a bp 0x7ffc029b4a50 sp 0x7ffc029b4218
WRITE of size 1 at 0x609000000142 thread T0
    #0 0x7f48004c2189 in __asan_memcpy /tmp/llvm/utils/release/final/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3
    #1 0x7f47dc73fb2e in void at::native::AVX2::execute_op<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2), (void*)0>(char* restrict*, long const*, long, long, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/Loops.h:91:14
    #2 0x7f47dc73f85b in void at::native::AVX2::basic_loop<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(char* restrict*, long const*, long, long, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/Loops.h:126:3
    #3 0x7f47dc73f465 in void at::native::AVX2::cpu_kernel<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&, long)::'lambda'(char**, long const*, long)::operator()(char**, long const*, long) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/Loops.h:315:7
    #4 0x7f47dc73f266 in auto at::TensorIteratorBase::loop_2d_from_1d<void at::native::AVX2::cpu_kernel<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&, long)::'lambda'(char**, long const*, long)>(at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2) const&)::'lambda'(char**, long const*, long, long)::operator()(char**, long const*, long, long) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/TensorIterator.h:407:13
    #5 0x7f47dc73e9ca in void c10::function_ref<void (char**, long const*, long, long)>::callback_fn<auto at::TensorIteratorBase::loop_2d_from_1d<void at::native::AVX2::cpu_kernel<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&, long)::'lambda'(char**, long const*, long)>(at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2) const&)::'lambda'(char**, long const*, long, long)>(long, char**, long const*, long, long) /home/yonghyeon/pytorch/pytorch-asan/c10/util/FunctionRef.h:43:12
    #6 0x7f47c448c68b in c10::function_ref<void (char**, long const*, long, long)>::operator()(char**, long const*, long, long) const /home/yonghyeon/pytorch/pytorch-asan/c10/util/FunctionRef.h:64:12
    #7 0x7f47c44843e4 in at::internal::serial_for_each(c10::ArrayRef<long>, c10::ArrayRef<long>, char**, unsigned long, c10::function_ref<void (char**, long const*, long, long)>, at::Range) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/TensorIteratorInternal.h:65:7
    #8 0x7f47c4468d84 in at::TensorIteratorBase::serial_for_each(c10::function_ref<void (char**, long const*, long, long)>, at::Range) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/TensorIterator.cpp:778:3
    #9 0x7f47c4479113 in at::TensorIteratorBase::for_each(c10::function_ref<void (char**, long const*, long, long)>, long) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/TensorIterator.cpp:750:12
    #10 0x7f47dc73e3ab in void at::TensorIteratorBase::for_each<void at::native::AVX2::cpu_kernel<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&, long)::'lambda'(char**, long const*, long), 0>(at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2), long) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/TensorIterator.h:422:5
    #11 0x7f47dc73e07c in void at::native::AVX2::cpu_kernel<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&, long) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/Loops.h:312:8
    #12 0x7f47dc735748 in at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/IndexKernel.cpp:699:5
    #13 0x7f47dc732b2e in at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/IndexKernel.cpp:699:5
    #14 0x7f47dc7319dd in at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/IndexKernel.cpp:699:5
    #15 0x7f47c64d44c3 in void at::native::DispatchStub<void (*)(at::TensorIterator&, bool), at::native::flip_stub>::operator()<at::TensorIterator&, bool>(c10::DeviceType, at::TensorIterator&, bool&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/DispatchStub.h:158:12
    #16 0x7f47c64ce2c1 in at::native::flip(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/TensorTransformations.cpp:97:3
    #17 0x7f47ce1680f7 in at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterQuantizedCPU.cpp:451:10
    #18 0x7f47ce168c0a in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, c10::ArrayRef<long> > >::operator()(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #19 0x7f47ce168c0a in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, c10::ArrayRef<long> > >, at::Tensor (at::Tensor const&, c10::ArrayRef<long>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #20 0x7f47c79e3240 in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #21 0x7f47c98f6a15 in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:102:16
    #22 0x7f47c98f6a15 in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, c10::ArrayRef<long>)> const&, at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:694:28
    #23 0x7f47c98f6a15 in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, c10::ArrayRef<long>)>::call(at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:527:41
    #24 0x7f47c98f6a15 in at::_ops::flip::call(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_3.cpp:5692:15
    #25 0x7f47c5e80ac7 in at::Tensor::flip(c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/core/TensorBody.h:3751:12
    #26 0x7f47c64d1cd6 in at::native::rot90(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/TensorTransformations.cpp:148:19
    #27 0x7f47cb9082d3 in at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterCompositeExplicitAutograd.cpp:3981:10
    #28 0x7f47cb908eba in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, long, c10::ArrayRef<long> > >::operator()(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #29 0x7f47cb908eba in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, long, c10::ArrayRef<long> > >, at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #30 0x7f47c7a60b4e in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long&&, c10::ArrayRef<long>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #31 0x7f47c9313830 in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:102:16
    #32 0x7f47c9313830 in at::Tensor c10::Dispatcher::redispatch<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)> const&, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:712:26
    #33 0x7f47c90e70c3 in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)>::redispatch(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:532:41
    #34 0x7f47c90e70c3 in at::_ops::rot90::redispatch(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_2.cpp:6441:15
    #35 0x7f47d38bc873 in at::redispatch::rot90(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RedispatchFunctions.h:7622:16
    #36 0x7f47d36a1e7e in torch::autograd::VariableType::(anonymous namespace)::rot90(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>)::$_146::operator()() const /home/yonghyeon/pytorch/pytorch-asan/torch/csrc/autograd/generated/VariableType_2.cpp:15069:12
    #37 0x7f47d36a0a64 in torch::autograd::VariableType::(anonymous namespace)::rot90(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/torch/csrc/autograd/generated/VariableType_2.cpp:15067:15
    #38 0x7f47d36a298a in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>), &(torch::autograd::VariableType::(anonymous namespace)::rot90(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long> > >::operator()(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #39 0x7f47d36a298a in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>), &(torch::autograd::VariableType::(anonymous namespace)::rot90(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long> > >, at::Tensor (c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:485:14
    #40 0x7f47c7a60b4e in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long&&, c10::ArrayRef<long>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #41 0x7f47c8d743ff in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:102:16
    #42 0x7f47c8d743ff in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)> const&, at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:694:28
    #43 0x7f47c8d743ff in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)>::call(at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:527:41
    #44 0x7f47c8d743ff in at::_ops::rot90::call(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_2.cpp:6434:15
    #45 0x7f47ef8f6ee3 in at::Tensor::rot90(long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/core/TensorBody.h:3776:12
    #46 0x7f47ef85d504 in torch::autograd::THPVariable_rot90(_object*, _object*, _object*)::$_588::operator()(at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/torch/csrc/autograd/generated/python_variable_methods.cpp:13748:17
    #47 0x7f47ef7a1edc in torch::autograd::THPVariable_rot90(_object*, _object*, _object*) /home/yonghyeon/pytorch/pytorch-asan/torch/csrc/autograd/generated/python_variable_methods.cpp:13750:15
    #48 0x552a79 in method_vectorcall_VARARGS_KEYWORDS /usr/local/src/conda/python-3.12.0/Objects/descrobject.c:365:14
    #49 0x543140 in _PyObject_VectorcallTstate /usr/local/src/conda/python-3.12.0/Include/internal/pycore_call.h:92:11
    #50 0x543140 in PyObject_Vectorcall /usr/local/src/conda/python-3.12.0/Objects/call.c:325:12
    #51 0x5295b9 in _PyEval_EvalFrameDefault /croot/python-split_1696267002197/work/build-static/Python/bytecodes.c:2711:19
    #52 0x5f450d in PyEval_EvalCode /usr/local/src/conda/python-3.12.0/Python/ceval.c:570:21
    #53 0x6198b6 in run_eval_code_obj /usr/local/src/conda/python-3.12.0/Python/pythonrun.c:1693
    #54 0x614d36 in run_mod /usr/local/src/conda/python-3.12.0/Python/pythonrun.c:1714
    #55 0x62a931 in pyrun_file /usr/local/src/conda/python-3.12.0/Python/pythonrun.c:1614
    #56 0x62a28f in _PyRun_SimpleFileObject.localalias /usr/local/src/conda/python-3.12.0/Python/pythonrun.c:433
    #57 0x62a082 in _PyRun_AnyFileObject.localalias /usr/local/src/conda/python-3.12.0/Python/pythonrun.c:78
    #58 0x624273 in pymain_run_file_obj /usr/local/src/conda/python-3.12.0/Modules/main.c:360
    #59 0x624273 in pymain_run_file /usr/local/src/conda/python-3.12.0/Modules/main.c:379
    #60 0x624273 in pymain_run_python /usr/local/src/conda/python-3.12.0/Modules/main.c:610
    #61 0x624273 in Py_RunMain.localalias /usr/local/src/conda/python-3.12.0/Modules/main.c:689
    #62 0x5dfbb8 in Py_BytesMain /usr/local/src/conda/python-3.12.0/Modules/main.c:743:12
error: failed to decompress '.debug_aranges', zlib is not available
error: failed to decompress '.debug_info', zlib is not available
error: failed to decompress '.debug_abbrev', zlib is not available
error: failed to decompress '.debug_line', zlib is not available
error: failed to decompress '.debug_str', zlib is not available
error: failed to decompress '.debug_line_str', zlib is not available
error: failed to decompress '.debug_loclists', zlib is not available
error: failed to decompress '.debug_rnglists', zlib is not available
    #63 0x7f480011ad8f  (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
    #64 0x7f480011ae3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
    #65 0x5df9ed in _start (/home/yonghyeon/anaconda3/envs/torch-asan/bin/python3.12+0x5df9ed)

0x609000000142 is located 0 bytes to the right of 2-byte region [0x609000000140,0x609000000142)
allocated by thread T0 here:
    #0 0x7f48004c3807 in posix_memalign /tmp/llvm/utils/release/final/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:226:3
    #1 0x7f47c11a8375 in c10::alloc_cpu(unsigned long) /home/yonghyeon/pytorch/pytorch-asan/c10/core/impl/alloc_cpu.cpp:116:13
    #2 0x7f47c10af4ea in c10::DefaultCPUAllocator::allocate(unsigned long) const /home/yonghyeon/pytorch/pytorch-asan/c10/core/CPUAllocator.cpp:23:14
    #3 0x7f47ce56638c in at::new_qtensor(c10::ArrayRef<long>, c10::TensorOptions const&, c10::intrusive_ptr<at::Quantizer, c10::detail::intrusive_target_default_null_type<at::Quantizer> >) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/quantized/Quantizer.cpp:152:18
    #4 0x7f47c6dae99d in at::native::empty_affine_quantized(c10::ArrayRef<long>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/quantized/TensorFactories.cpp:35:10
    #5 0x7f47ce12e5ec in at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU___empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterQuantizedCPU.cpp:227:10
    #6 0x7f47ce130570 in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU___empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> > >::operator()(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #7 0x7f47ce130570 in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU___empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> > >, at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #8 0x7f47c9d13d5b in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>&&, std::optional<c10::ScalarType>&&, std::optional<c10::Layout>&&, std::optional<c10::Device>&&, std::optional<bool>&&, double&&, long&&, std::optional<c10::MemoryFormat>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #9 0x7f47c9d120f8 in at::Tensor c10::KernelFunction::call<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(c10::OperatorHandle const&, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:90:16
    #10 0x7f47c9d120f8 in at::Tensor c10::Dispatcher::redispatch<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)> const&, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:712:26
    #11 0x7f47c9b9b9eb in c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)>::redispatch(c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:532:41
    #12 0x7f47c9b9b9eb in at::_ops::_empty_affine_quantized::redispatch(c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_3.cpp:2924:15
    #13 0x7f47ca7ec573 in at::(anonymous namespace)::_empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterBackendSelect.cpp:199:10
    #14 0x7f47ca7ee510 in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::_empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> > >::operator()(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #15 0x7f47ca7ee510 in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::_empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> > >, at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #16 0x7f47c9d13d5b in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>&&, std::optional<c10::ScalarType>&&, std::optional<c10::Layout>&&, std::optional<c10::Device>&&, std::optional<bool>&&, double&&, long&&, std::optional<c10::MemoryFormat>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #17 0x7f47c9846e3e in at::Tensor c10::KernelFunction::call<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(c10::OperatorHandle const&, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:90:16
    #18 0x7f47c9846e3e in at::Tensor c10::Dispatcher::call<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)> const&, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:694:28
    #19 0x7f47c9846e3e in c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)>::call(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:527:41
    #20 0x7f47c9846e3e in at::_ops::_empty_affine_quantized::call(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_3.cpp:2917:15
    #21 0x7f47c57d710d in at::_empty_affine_quantized(c10::ArrayRef<long>, c10::TensorOptions, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/ops/_empty_affine_quantized.h:27:12
    #22 0x7f47c639baf0 in at::native::empty_like_quantized(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/TensorFactories.cpp:487:12
    #23 0x7f47ce13bdfe in at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__empty_like(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterQuantizedCPU.cpp:255:10
    #24 0x7f47ce13d8de in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__empty_like(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat> > >::operator()(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #25 0x7f47ce13d8de in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__empty_like(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat> > >, at::Tensor (at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #26 0x7f47c8703d1e in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, std::optional<c10::ScalarType>&&, std::optional<c10::Layout>&&, std::optional<c10::Device>&&, std::optional<bool>&&, std::optional<c10::MemoryFormat>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #27 0x7f47c984dd3e in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:102:16
    #28 0x7f47c984dd3e in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>)> const&, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:694:28
    #29 0x7f47c984dd3e in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>)>::call(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:527:41
    #30 0x7f47c984dd3e in at::_ops::empty_like::call(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_3.cpp:2967:15
    #31 0x7f47c4481f20 in at::empty_like(at::Tensor const&, c10::TensorOptions, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/ops/empty_like.h:27:12
    #32 0x7f47c64cce09 in at::native::flip(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/TensorTransformations.cpp:41:23
    #33 0x7f47ce1680f7 in at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterQuantizedCPU.cpp:451:10
    #34 0x7f47ce168c0a in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, c10::ArrayRef<long> > >::operator()(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #35 0x7f47ce168c0a in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, c10::ArrayRef<long> > >, at::Tensor (at::Tensor const&, c10::ArrayRef<long>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #36 0x7f47c79e3240 in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #37 0x7f47c98f6a15 in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:102:16
    #38 0x7f47c98f6a15 in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, c10::ArrayRef<long>)> const&, at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:694:28
    #39 0x7f47c98f6a15 in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, c10::ArrayRef<long>)>::call(at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:527:41
    #40 0x7f47c98f6a15 in at::_ops::flip::call(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_3.cpp:5692:15
    #41 0x7f47c5e80ac7 in at::Tensor::flip(c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/core/TensorBody.h:3751:12
    #42 0x7f47c64d1cd6 in at::native::rot90(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/TensorTransformations.cpp:148:19
    #43 0x7f47cb9082d3 in at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterCompositeExplicitAutograd.cpp:3981:10
    #44 0x7f47cb908eba in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, long, c10::ArrayRef<long> > >::operator()(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #45 0x7f47cb908eba in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, long, c10::ArrayRef<long> > >, at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14

SUMMARY: AddressSanitizer: heap-buffer-overflow /tmp/llvm/utils/release/final/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3 in __asan_memcpy
Shadow bytes around the buggy address:
  0x0c127fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c127fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c127fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c127fff8000: fa fa fa fa fa fa fa fa 00 00 fa fa fa fa fa fa
  0x0c127fff8010: fa fa fa fa fa fa fa fa 02 fa fa fa fa fa fa fa
=>0x0c127fff8020: fa fa fa fa fa fa fa fa[02]fa fa fa fa fa fa fa
  0x0c127fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==848202==ABORTING

Test code (c++):

#include <torch/torch.h>

int main() {

    torch::Tensor self_base = torch::randn({2,2});
    torch::Tensor self = at::quantize_per_tensor(self_base, 0.1, 10, c10::kQUInt4x2);
    self.rot90(-3, {1, 0});

  return 0;
}

Error log:

=================================================================
==845713==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x609000000142 at pc 0x7f5b4a4c218a bp 0x7ffd1f261a70 sp 0x7ffd1f261238
WRITE of size 1 at 0x609000000142 thread T0
    #0 0x7f5b4a4c2189 in __asan_memcpy /tmp/llvm/utils/release/final/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3
    #1 0x7f5b383e0b2e in void at::native::AVX2::execute_op<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2), (void*)0>(char* restrict*, long const*, long, long, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/Loops.h:91:14
    #2 0x7f5b383e085b in void at::native::AVX2::basic_loop<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(char* restrict*, long const*, long, long, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/Loops.h:126:3
    #3 0x7f5b383e0465 in void at::native::AVX2::cpu_kernel<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&, long)::'lambda'(char**, long const*, long)::operator()(char**, long const*, long) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/Loops.h:315:7
    #4 0x7f5b383e0266 in auto at::TensorIteratorBase::loop_2d_from_1d<void at::native::AVX2::cpu_kernel<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&, long)::'lambda'(char**, long const*, long)>(at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2) const&)::'lambda'(char**, long const*, long, long)::operator()(char**, long const*, long, long) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/TensorIterator.h:407:13
    #5 0x7f5b383df9ca in void c10::function_ref<void (char**, long const*, long, long)>::callback_fn<auto at::TensorIteratorBase::loop_2d_from_1d<void at::native::AVX2::cpu_kernel<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&, long)::'lambda'(char**, long const*, long)>(at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2) const&)::'lambda'(char**, long const*, long, long)>(long, char**, long const*, long, long) /home/yonghyeon/pytorch/pytorch-asan/c10/util/FunctionRef.h:43:12
    #6 0x7f5b2012d68b in c10::function_ref<void (char**, long const*, long, long)>::operator()(char**, long const*, long, long) const /home/yonghyeon/pytorch/pytorch-asan/c10/util/FunctionRef.h:64:12
    #7 0x7f5b201253e4 in at::internal::serial_for_each(c10::ArrayRef<long>, c10::ArrayRef<long>, char**, unsigned long, c10::function_ref<void (char**, long const*, long, long)>, at::Range) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/TensorIteratorInternal.h:65:7
    #8 0x7f5b20109d84 in at::TensorIteratorBase::serial_for_each(c10::function_ref<void (char**, long const*, long, long)>, at::Range) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/TensorIterator.cpp:778:3
    #9 0x7f5b2011a113 in at::TensorIteratorBase::for_each(c10::function_ref<void (char**, long const*, long, long)>, long) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/TensorIterator.cpp:750:12
    #10 0x7f5b383df3ab in void at::TensorIteratorBase::for_each<void at::native::AVX2::cpu_kernel<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&, long)::'lambda'(char**, long const*, long), 0>(at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2), long) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/TensorIterator.h:422:5
    #11 0x7f5b383df07c in void at::native::AVX2::cpu_kernel<at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)>(at::TensorIteratorBase&, at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const::'lambda'(c10::quint4x2, c10::quint4x2)&&, long) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/Loops.h:312:8
    #12 0x7f5b383d6748 in at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const::'lambda2'()::operator()() const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/IndexKernel.cpp:699:5
    #13 0x7f5b383d3b2e in at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool)::$_10::operator()() const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/IndexKernel.cpp:699:5
    #14 0x7f5b383d29dd in at::native::(anonymous namespace)::flip_kernel(at::TensorIterator&, bool) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/cpu/IndexKernel.cpp:699:5
    #15 0x7f5b221754c3 in void at::native::DispatchStub<void (*)(at::TensorIterator&, bool), at::native::flip_stub>::operator()<at::TensorIterator&, bool>(c10::DeviceType, at::TensorIterator&, bool&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/DispatchStub.h:158:12
    #16 0x7f5b2216f2c1 in at::native::flip(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/TensorTransformations.cpp:97:3
    #17 0x7f5b29e090f7 in at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterQuantizedCPU.cpp:451:10
    #18 0x7f5b29e09c0a in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, c10::ArrayRef<long> > >::operator()(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #19 0x7f5b29e09c0a in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, c10::ArrayRef<long> > >, at::Tensor (at::Tensor const&, c10::ArrayRef<long>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #20 0x7f5b23684240 in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #21 0x7f5b25597a15 in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:102:16
    #22 0x7f5b25597a15 in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, c10::ArrayRef<long>)> const&, at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:694:28
    #23 0x7f5b25597a15 in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, c10::ArrayRef<long>)>::call(at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:527:41
    #24 0x7f5b25597a15 in at::_ops::flip::call(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_3.cpp:5692:15
    #25 0x7f5b21b21ac7 in at::Tensor::flip(c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/core/TensorBody.h:3751:12
    #26 0x7f5b22172cd6 in at::native::rot90(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/TensorTransformations.cpp:148:19
    #27 0x7f5b275a92d3 in at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterCompositeExplicitAutograd.cpp:3981:10
    #28 0x7f5b275a9eba in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, long, c10::ArrayRef<long> > >::operator()(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #29 0x7f5b275a9eba in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, long, c10::ArrayRef<long> > >, at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #30 0x7f5b23701b4e in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long&&, c10::ArrayRef<long>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #31 0x7f5b24fb4830 in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:102:16
    #32 0x7f5b24fb4830 in at::Tensor c10::Dispatcher::redispatch<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)> const&, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:712:26
    #33 0x7f5b24d880c3 in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)>::redispatch(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:532:41
    #34 0x7f5b24d880c3 in at::_ops::rot90::redispatch(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_2.cpp:6441:15
    #35 0x7f5b2f55d873 in at::redispatch::rot90(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RedispatchFunctions.h:7622:16
    #36 0x7f5b2f342e7e in torch::autograd::VariableType::(anonymous namespace)::rot90(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>)::$_146::operator()() const /home/yonghyeon/pytorch/pytorch-asan/torch/csrc/autograd/generated/VariableType_2.cpp:15069:12
    #37 0x7f5b2f341a64 in torch::autograd::VariableType::(anonymous namespace)::rot90(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/torch/csrc/autograd/generated/VariableType_2.cpp:15067:15
    #38 0x7f5b2f34398a in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>), &(torch::autograd::VariableType::(anonymous namespace)::rot90(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long> > >::operator()(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #39 0x7f5b2f34398a in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>), &(torch::autograd::VariableType::(anonymous namespace)::rot90(c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long> > >, at::Tensor (c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:485:14
    #40 0x7f5b23701b4e in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long&&, c10::ArrayRef<long>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #41 0x7f5b24a153ff in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:102:16
    #42 0x7f5b24a153ff in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, long, c10::ArrayRef<long> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)> const&, at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:694:28
    #43 0x7f5b24a153ff in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)>::call(at::Tensor const&, long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:527:41
    #44 0x7f5b24a153ff in at::_ops::rot90::call(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_2.cpp:6434:15
    #45 0x406393 in at::Tensor::rot90(long, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/core/TensorBody.h:3776:12
    #46 0x404a80 in main /home/yonghyeon/pytorch/pytorch-asan/test/cpp/reproduce/rot90.cpp:7:10
error: failed to decompress '.debug_aranges', zlib is not available
error: failed to decompress '.debug_info', zlib is not available
error: failed to decompress '.debug_abbrev', zlib is not available
error: failed to decompress '.debug_line', zlib is not available
error: failed to decompress '.debug_str', zlib is not available
error: failed to decompress '.debug_line_str', zlib is not available
error: failed to decompress '.debug_loclists', zlib is not available
error: failed to decompress '.debug_rnglists', zlib is not available
    #47 0x7f5b13366d8f  (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
    #48 0x7f5b13366e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
    #49 0x404434 in _start (/home/yonghyeon/pytorch/pytorch-asan/build/bin/reproduce_rot90+0x404434)

0x609000000142 is located 0 bytes to the right of 2-byte region [0x609000000140,0x609000000142)
allocated by thread T0 here:
    #0 0x7f5b4a4c3807 in posix_memalign /tmp/llvm/utils/release/final/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:226:3
    #1 0x7f5b1ce49375 in c10::alloc_cpu(unsigned long) /home/yonghyeon/pytorch/pytorch-asan/c10/core/impl/alloc_cpu.cpp:116:13
    #2 0x7f5b1cd504ea in c10::DefaultCPUAllocator::allocate(unsigned long) const /home/yonghyeon/pytorch/pytorch-asan/c10/core/CPUAllocator.cpp:23:14
    #3 0x7f5b2a20738c in at::new_qtensor(c10::ArrayRef<long>, c10::TensorOptions const&, c10::intrusive_ptr<at::Quantizer, c10::detail::intrusive_target_default_null_type<at::Quantizer> >) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/quantized/Quantizer.cpp:152:18
    #4 0x7f5b22a4f99d in at::native::empty_affine_quantized(c10::ArrayRef<long>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/quantized/TensorFactories.cpp:35:10
    #5 0x7f5b29dcf5ec in at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU___empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterQuantizedCPU.cpp:227:10
    #6 0x7f5b29dd1570 in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU___empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> > >::operator()(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #7 0x7f5b29dd1570 in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU___empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> > >, at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #8 0x7f5b259b4d5b in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>&&, std::optional<c10::ScalarType>&&, std::optional<c10::Layout>&&, std::optional<c10::Device>&&, std::optional<bool>&&, double&&, long&&, std::optional<c10::MemoryFormat>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #9 0x7f5b259b30f8 in at::Tensor c10::KernelFunction::call<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(c10::OperatorHandle const&, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:90:16
    #10 0x7f5b259b30f8 in at::Tensor c10::Dispatcher::redispatch<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)> const&, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:712:26
    #11 0x7f5b2583c9eb in c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)>::redispatch(c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:532:41
    #12 0x7f5b2583c9eb in at::_ops::_empty_affine_quantized::redispatch(c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_3.cpp:2924:15
    #13 0x7f5b2648d573 in at::(anonymous namespace)::_empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterBackendSelect.cpp:199:10
    #14 0x7f5b2648f510 in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::_empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> > >::operator()(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #15 0x7f5b2648f510 in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::_empty_affine_quantized(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> > >, at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #16 0x7f5b259b4d5b in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>&&, std::optional<c10::ScalarType>&&, std::optional<c10::Layout>&&, std::optional<c10::Device>&&, std::optional<bool>&&, double&&, long&&, std::optional<c10::MemoryFormat>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #17 0x7f5b254e7e3e in at::Tensor c10::KernelFunction::call<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(c10::OperatorHandle const&, c10::DispatchKeySet, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:90:16
    #18 0x7f5b254e7e3e in at::Tensor c10::Dispatcher::call<at::Tensor, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat> >(c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)> const&, c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:694:28
    #19 0x7f5b254e7e3e in c10::TypedOperatorHandle<at::Tensor (c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>)>::call(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:527:41
    #20 0x7f5b254e7e3e in at::_ops::_empty_affine_quantized::call(c10::ArrayRef<c10::SymInt>, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_3.cpp:2917:15
    #21 0x7f5b2147810d in at::_empty_affine_quantized(c10::ArrayRef<long>, c10::TensorOptions, double, long, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/ops/_empty_affine_quantized.h:27:12
    #22 0x7f5b2203caf0 in at::native::empty_like_quantized(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/TensorFactories.cpp:487:12
    #23 0x7f5b29ddcdfe in at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__empty_like(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterQuantizedCPU.cpp:255:10
    #24 0x7f5b29dde8de in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__empty_like(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat> > >::operator()(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #25 0x7f5b29dde8de in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__empty_like(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat> > >, at::Tensor (at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #26 0x7f5b243a4d1e in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, std::optional<c10::ScalarType>&&, std::optional<c10::Layout>&&, std::optional<c10::Device>&&, std::optional<bool>&&, std::optional<c10::MemoryFormat>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #27 0x7f5b254eed3e in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:102:16
    #28 0x7f5b254eed3e in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>)> const&, at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:694:28
    #29 0x7f5b254eed3e in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>)>::call(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:527:41
    #30 0x7f5b254eed3e in at::_ops::empty_like::call(at::Tensor const&, std::optional<c10::ScalarType>, std::optional<c10::Layout>, std::optional<c10::Device>, std::optional<bool>, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_3.cpp:2967:15
    #31 0x7f5b20122f20 in at::empty_like(at::Tensor const&, c10::TensorOptions, std::optional<c10::MemoryFormat>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/ops/empty_like.h:27:12
    #32 0x7f5b2216de09 in at::native::flip(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/TensorTransformations.cpp:41:23
    #33 0x7f5b29e090f7 in at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterQuantizedCPU.cpp:451:10
    #34 0x7f5b29e09c0a in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, c10::ArrayRef<long> > >::operator()(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #35 0x7f5b29e09c0a in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_QuantizedCPU__flip(at::Tensor const&, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, c10::ArrayRef<long> > >, at::Tensor (at::Tensor const&, c10::ArrayRef<long>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14
    #36 0x7f5b23684240 in at::Tensor c10::callUnboxedKernelFunction<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(void*, c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>&&) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:50:12
    #37 0x7f5b25597a15 in at::Tensor c10::KernelFunction::call<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(c10::OperatorHandle const&, c10::DispatchKeySet, at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/KernelFunction_impl.h:102:16
    #38 0x7f5b25597a15 in at::Tensor c10::Dispatcher::call<at::Tensor, at::Tensor const&, c10::ArrayRef<long> >(c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, c10::ArrayRef<long>)> const&, at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:694:28
    #39 0x7f5b25597a15 in c10::TypedOperatorHandle<at::Tensor (at::Tensor const&, c10::ArrayRef<long>)>::call(at::Tensor const&, c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/dispatch/Dispatcher.h:527:41
    #40 0x7f5b25597a15 in at::_ops::flip::call(at::Tensor const&, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/Operators_3.cpp:5692:15
    #41 0x7f5b21b21ac7 in at::Tensor::flip(c10::ArrayRef<long>) const /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/core/TensorBody.h:3751:12
    #42 0x7f5b22172cd6 in at::native::rot90(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/native/TensorTransformations.cpp:148:19
    #43 0x7f5b275a92d3 in at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/build/aten/src/ATen/RegisterCompositeExplicitAutograd.cpp:3981:10
    #44 0x7f5b275a9eba in c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, long, c10::ArrayRef<long> > >::operator()(at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/WrapFunctionIntoFunctor.h:13:16
    #45 0x7f5b275a9eba in c10::impl::wrap_kernel_functor_unboxed_<c10::impl::detail::WrapFunctionIntoFunctor_<c10::CompileTimeFunctionPointer<at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>), &(at::(anonymous namespace)::(anonymous namespace)::wrapper_CompositeExplicitAutograd__rot90(at::Tensor const&, long, c10::ArrayRef<long>))>, at::Tensor, c10::guts::typelist::typelist<at::Tensor const&, long, c10::ArrayRef<long> > >, at::Tensor (at::Tensor const&, long, c10::ArrayRef<long>)>::call(c10::OperatorKernel*, c10::DispatchKeySet, at::Tensor const&, long, c10::ArrayRef<long>) /home/yonghyeon/pytorch/pytorch-asan/aten/src/ATen/core/boxing/impl/make_boxed_from_unboxed_functor.h:468:14

SUMMARY: AddressSanitizer: heap-buffer-overflow /tmp/llvm/utils/release/final/llvm-project/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cpp:22:3 in __asan_memcpy
Shadow bytes around the buggy address:
  0x0c127fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c127fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c127fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c127fff8000: fa fa fa fa fa fa fa fa 00 00 fa fa fa fa fa fa
  0x0c127fff8010: fa fa fa fa fa fa fa fa 02 fa fa fa fa fa fa fa
=>0x0c127fff8020: fa fa fa fa fa fa fa fa[02]fa fa fa fa fa fa fa
  0x0c127fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c127fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==845713==ABORTING

Versions

PyTorch version: 2.3.0a0+git1ee7950
Is debug build: True
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.2 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: 12.0.1
CMake version: version 3.26.4
Libc version: glibc-2.35

Python version: 3.12.0 | packaged by Anaconda, Inc. | (main, Oct 2 2023, 17:29:18) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-89-generic-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 96
On-line CPU(s) list: 0-95
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz
CPU family: 6
Model: 85
Thread(s) per core: 2
Core(s) per socket: 24
Socket(s): 2
Stepping: 7
CPU max MHz: 4000.0000
CPU min MHz: 1200.0000
BogoMIPS: 6000.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
Virtualization: VT-x
L1d cache: 1.5 MiB (48 instances)
L1i cache: 1.5 MiB (48 instances)
L2 cache: 48 MiB (48 instances)
L3 cache: 71.5 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-23,48-71
NUMA node1 CPU(s): 24-47,72-95
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed: Mitigation; Enhanced IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; TSX disabled

Versions of relevant libraries:
[pip3] numpy==1.26.2
[pip3] optree==0.10.0
[pip3] torch==2.3.0a0+git1ee7950
[conda] mkl 2023.1.0 h213fc3f_46344
[conda] mkl-include 2023.1.0 h06a4308_46344
[conda] numpy 1.26.2 pypi_0 pypi
[conda] optree 0.10.0 pypi_0 pypi
[conda] torch 2.3.0a0+git1ee7950 dev_0

cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel

@yonghyeon1064 yonghyeon1064 changed the title C++ API at::Tensor::rot90: Heap-buffer-overflow C++ API torch.Tensor.rot90: Heap-buffer-overflow Dec 21, 2023
@yonghyeon1064 yonghyeon1064 changed the title C++ API torch.Tensor.rot90: Heap-buffer-overflow torch.Tensor.rot90: Heap-buffer-overflow Dec 21, 2023
@janeyx99 janeyx99 added the oncall: quantization Quantization support in PyTorch label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oncall: quantization Quantization support in PyTorch
Projects
None yet
Development

No branches or pull requests

2 participants