memcpy crashese in native shared object logic on particular device (VIVO / Samsung) and on 64bit devices only(arm64-v8a)

Recently, we made some optimization attempts in the Native code of a specific app in our company to address performance issues. We released a gray version containing the mentioned modifications to a subset of users for evaluating the effectiveness of the optimizations. However, after the release, we observed a significant number of crash reports, and the crashes were mainly limited to 64-bit smartphones of the VIVO brand, with a few similar issues reported on Samsung phones. The crash reports indicate that the libc’s memcpy function is the source of the error, while our modifications did not involve any changes to the calling path of the memcpy function but instead focused on modifying other business logic. Can anyone provide some troubleshooting ideas?

Below is the stack trace from one of the above mentioned crashes,

SIGSEGV(SEGV_ACCERR)

#00 pc 000000000004eebc /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy+60) [arm64-v8a::3bac97c2012f8248ca610b4e558e17d1]
#01 pc 000000000014a4c8 /data/app/~~k3_ers-e6zmrSs_FANzwIg==/<OurAPPCorporationName>.<OurAPPTypeName>-yFrQvavwtQa6pbKyOTxrKA==/lib/arm64/<OurNativeSharedObjectName>.so [arm64-v8a::2b50f378ff7e1b8d1d2b6ba552079baf]
#02 pc 0000000000087aa8 /data/app/~~k3_ers-e6zmrSs_FANzwIg==/<OurAPPCorporationName>.<OurAPPTypeName>-yFrQvavwtQa6pbKyOTxrKA==/lib/arm64/<OurNativeSharedObjectName>.so [arm64-v8a::2b50f378ff7e1b8d1d2b6ba552079baf]
#03 pc 0000000000086c78 /data/app/~~k3_ers-e6zmrSs_FANzwIg==/<OurAPPCorporationName>.<OurAPPTypeName>-yFrQvavwtQa6pbKyOTxrKA==/lib/arm64/<OurNativeSharedObjectName>.so [arm64-v8a::2b50f378ff7e1b8d1d2b6ba552079baf]
#04 pc 000000000009e330 /data/app/~~k3_ers-e6zmrSs_FANzwIg==/<OurAPPCorporationName>.<OurAPPTypeName>-yFrQvavwtQa6pbKyOTxrKA==/lib/arm64/<OurNativeSharedObjectName>.so [arm64-v8a::2b50f378ff7e1b8d1d2b6ba552079baf]
#05 pc 000000000009bb20 /data/app/~~k3_ers-e6zmrSs_FANzwIg==/<OurAPPCorporationName>.<OurAPPTypeName>-yFrQvavwtQa6pbKyOTxrKA==/lib/arm64/<OurNativeSharedObjectName>.so [arm64-v8a::2b50f378ff7e1b8d1d2b6ba552079baf]
#06 pc 000000000008ab80 /data/app/~~k3_ers-e6zmrSs_FANzwIg==/<OurAPPCorporationName>.<OurAPPTypeName>-yFrQvavwtQa6pbKyOTxrKA==/lib/arm64/<OurNativeSharedObjectName>.so [arm64-v8a::2b50f378ff7e1b8d1d2b6ba552079baf]
#07 pc 00000000002072e4 /data/app/~~k3_ers-e6zmrSs_FANzwIg==/<OurAPPCorporationName>.<OurAPPTypeName>-yFrQvavwtQa6pbKyOTxrKA==/oat/arm64/base.odex [arm64-v8a::515535bd03fc04c8a3440ba0667ca07e]
java:
<OurAPPCorporationName>.engine.logic.<OurBusinessLogicModuleName>.F(SourceFile:1)
<OurAPPCorporationName>.engine.logic.PinyinLogic.h0(SourceFile:3)
<OurAPPCorporationName>.engine.logic.state.PredictionState.o(SourceFile:29)
<OurAPPCorporationName>.engine.logic.state.PredictionState.k(SourceFile:165)
<OurAPPCorporationName>.engine.logic.state.PredictionState.a(SourceFile:5)
<OurAPPCorporationName>.engine.logic.PyLogicStateContext.a(SourceFile:16)
<OurAPPCorporationName>.engine.logic.thread.LogicHandler.handleMessage(SourceFile:20)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loopOnce(Looper.java:223)
android.os.Looper.loop(Looper.java:324)
android.os.HandlerThread.run(HandlerThread.java:67)

,and on other mobile phones that also crash at calll to memcpy, there are also crashes as below, with top of the call stack being like below, seemingly more platform-specific variant of memcpy named __memcpy_aarch64_simd:

#00 pc 000000000009d6e0 /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy_aarch64_simd+160) [arm64-v8a::5ba801faadc5ce7796fe32eab5104a1e] 

We also attempted to reproduce the issue by using a large number of random inputs (100,000 records) on a local VIVO phone but did not experience any application crashes. By analyzing the calling path from our local business logic to the memcpy function, we were able to pinpoint the file and line number of each layer in the crash’s call stack. However, our modifications were not directly present in the calling path leading to the crash. This has left us confused and without a clear troubleshooting approach, as we lack direct clues or a specific direction for investigation.

The platform of the crashes are primarily distributed on (1)Android 13,level 33 and (2)Android 14,level 34

, as shown below from online crash reports

Android 13,level 33
Android 14,level 34
Android 14,level 34
Android 14,level 34
Android 13,level 33
Android 14,level 34
Android 14,level 34
Android 13,level 33
Android 14,level 34
Android 14,level 34
Android 13,level 33
Android 13,level 33
Android 13,level 33
Android 13,level 33
Android 13,level 33
Android 13,level 33
Android 13,level 33
Android 14,level 34

New contributor

larry king is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật