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

rocrand free an object that is not malloced #56

Closed
saadrahim opened this issue May 23, 2019 · 0 comments
Closed

rocrand free an object that is not malloced #56

saadrahim opened this issue May 23, 2019 · 0 comments
Assignees

Comments

@saadrahim
Copy link
Member

It seems librocrand is trying to free an object that is not malloc'ed. It's caught by our asan build (note we removed the asan flag for hcc compiler, but we keep it for the other files that are built with clang/gcc):
This happens on our clang 8 + glibc 2.26 runs, but not on clang 7 + glibc 2.23 run.

=================================================================
==1914160==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x7ffda0245c98 in thread T0
SCARINESS: 40 (bad-free)
#0 0x7f6a7ce486d8 in operator delete(void*)
#1 0x7f6a38566299 in hip_impl::functions()::'lambda'()::operator()() const (librocrand.so.1+0x32299)
#2 0x7f6a7c7c9cd8 in __pthread_once_slow glibc-2.26/nptl/pthread_once.c:116
#3 0x7f6a3855c86c in hip_impl::hipLaunchKernelGGLImpl(unsigned long, dim3 const&, dim3 const&, unsigned int, ihipStream_t*, void**) (librocrand.so.1+0x2886c)
#4 0x7f6a3855a58b in rocrand_xorwow::init() (librocrand.so.1+0x2658b)
#5 0x7f6a38558b6f in rocrand_status rocrand_xorwow::generate_normal(float*, unsigned long, float, float) (librocrand.so.1+0x24b6f)
#6 0x7f6a3efbe555 in hiprandGenerateNormal (libhiprand.so.1+0x3555)
#7 0x7f6a525a0112 in void caffe2::math::RandGaussian<float, caffe2::HIPContext>(unsigned long, float, float, float*, caffe2::HIPContext*) caffe2/utils/hip/math_gpu.hip:1569
#8 0x7f6a4ff696af in caffe2::GaussianFillOp<float, caffe2::HIPContext>::Fill(caffe2::Tensor*) caffe2/caffe2/operators/filler_op.h:433
#9 0x7f6a4ff3897b in caffe2::FillerOpcaffe2::HIPContext::RunOnDevice() caffe2/caffe2/operators/filler_op.h:93
#10 0x7f6a4ef1281a in caffe2::Operatorcaffe2::HIPContext::Run(int) caffe2/caffe2/core/operator.h:834
#11 0x7f6a4a7d35c4 in caffe2::SimpleNet::Run() caffe2/caffe2/core/net_simple.cc:63
#12 0x7f6a4a9369d9 in caffe2::Workspace::RunNetOnce(caffe2::NetDef const&) caffe2/caffe2/core/workspace.cc:292

Address 0x7ffda0245c98 is located in stack of thread T0
SUMMARY: AddressSanitizer: bad-free in operator delete(void*)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants