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

HWAddressSanitizer: bad pointer 0x000000000030 #1432

Closed
LitterSun opened this issue Jul 12, 2021 · 1 comment
Closed

HWAddressSanitizer: bad pointer 0x000000000030 #1432

LitterSun opened this issue Jul 12, 2021 · 1 comment

Comments

@LitterSun
Copy link

Android
logcat:
07-12 21:10:38.556 30584 30616 I app_process64: HWAddressSanitizer: bad pointer 0x000000000030
07-12 21:10:38.556 30584 30616 I app_process64: ==30584==HWAddressSanitizer CHECK failed: out/llvm-project/compiler-rt/lib/hwasan/../sanitizer_common/sanitizer_allocator_secondary.h:177 "((IsAligned(reinterpret_cast(p), page_size_))) != (0)" (0x0, 0x0)
07-12 21:10:38.574 30584 30616 I app_process64: #0 0x7f2a1234e0 (/apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so+0x184e0)
07-12 21:10:38.574 30584 30616 I app_process64: #1 0x7f2a13567c (/apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so+0x2a67c)
07-12 21:10:38.574 30584 30616 I app_process64: #2 0x7f2a125194 (/apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so+0x1a194)
07-12 21:10:38.574 30584 30616 I app_process64: #3 0x7f2a125700 (/apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so+0x1a700)
07-12 21:10:38.574 30584 30616 I app_process64: #4 0x7f2a12870c (/apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so+0x1d70c)

backtrace:
#00 pc 000000000005bee4 /apex/com.android.runtime/lib64/bionic/libc.so (abort+356) (BuildId: 9f62d65af200562af6856c16fb045819)
#1 pc 000000000002b710 /apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so (__sanitizer::Abort()+60) (BuildId: c43f06ecec3119e9e2e588c25348b5a62e819c42)
#2 pc 000000000002a5f8 /apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so (__sanitizer::Die()+204) (BuildId: c43f06ecec3119e9e2e588c25348b5a62e819c42)
#3 pc 000000000001853c /apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so (__hwasan::HWAsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long)+176) (BuildId: c43f06ecec3119e9e2e588c25348b5a62e819c42)
#4 pc 000000000002a67c /apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so (__sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long)+112) (BuildId: c43f06ecec3119e9e2e588c25348b5a62e819c42)
#5 pc 000000000001a194 /apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so (__sanitizer::CombinedAllocator<__sanitizer::SizeClassAllocator64<__hwasan::AP64>, __sanitizer::LargeMmapAllocatorPtrArrayDynamic>::GetMetaData(void const*)+300) (BuildId: c43f06ecec3119e9e2e588c25348b5a62e819c42)
#6 pc 000000000001a700 /apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so (__hwasan::HwasanDeallocate(__sanitizer::StackTrace*, void*)+168) (BuildId: c43f06ecec3119e9e2e588c25348b5a62e819c42)
#7 pc 000000000001d70c /apex/com.android.runtime/lib64/bionic/libclang_rt.hwasan-aarch64-android.so (__sanitizer_free+176) (BuildId: c43f06ecec3119e9e2e588c25348b5a62e819c42)
#8 pc 0000000000766de8 /data/app/~~Y0kQSuI_iS-Ms9klmfJm6g==/com.lark.jsengineapp-sxGpJ0TgC7Ywy4sFOHgsbQ==/lib/arm64/libv8_libfull.cr.so
#9 pc 0000000000765d80 /data/app/~~Y0kQSuI_iS-Ms9klmfJm6g==/com.lark.jsengineapp-sxGpJ0TgC7Ywy4sFOHgsbQ==/lib/arm64/libv8_libfull.cr.so (v8::internal::Isolate::Init(v8::internal::ReadOnlyDeserializer*, v8::internal::StartupDeserializer*)+1140)
#10 pc 000000000076663c /data/app/~~Y0kQSuI_iS-Ms9klmfJm6g==/com.lark.jsengineapp-sxGpJ0TgC7Ywy4sFOHgsbQ==/lib/arm64/libv8_libfull.cr.so
#11 pc 000000000090cb48 /data/app/~~Y0kQSuI_iS-Ms9klmfJm6g==/com.lark.jsengineapp-sxGpJ0TgC7Ywy4sFOHgsbQ==/lib/arm64/libv8_libfull.cr.so
#12 pc 0000000000509074 /data/app/~~Y0kQSuI_iS-Ms9klmfJm6g==/com.lark.jsengineapp-sxGpJ0TgC7Ywy4sFOHgsbQ==/lib/arm64/libv8_libfull.cr.so (v8::Isolate::Initialize(v8::Isolate*, v8::Isolate::CreateParams const&)+264)
#13 pc 0000000000509184 /data/app/~~Y0kQSuI_iS-Ms9klmfJm6g==/com.lark.jsengineapp-sxGpJ0TgC7Ywy4sFOHgsbQ==/lib/arm64/libv8_libfull.cr.so (v8::Isolate::New(v8::Isolate::CreateParams const&)+36)

@eugenis
Copy link
Contributor

eugenis commented Jul 13, 2021

Your code calls free(0x30). It is a bad pointer.

@eugenis eugenis closed this as completed Jul 13, 2021
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