Andrey Alekseenko
2018-04-02 16:06:23 UTC
Have a nice day!
I'm trying to debug native crash with stack corruption.
********** Crash dump: **********
Build fingerprint:
'OnePlus/OnePlus3/OnePlus3T:8.0.0/OPR6.170623.013/12041042:user/release-keys'
pid: 31958, tid: 32004, name: Thread-12 >>> * <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Stack frame #00 pc 0000000000069e04 /system/lib64/libc.so (tgkill+8)
Stack frame #01 pc 000000000001df20 /system/lib64/libc.so (abort+88)
Stack frame #02 pc 0000000000025714 /system/lib64/libc.so
(__libc_fatal+116)
Stack frame #03 pc 0000000000068c88 /system/lib64/libc.so
(__stack_chk_fail+16)
Stack frame #04 pc 00000000001133ec /data/app/*/lib/arm64/lib*.so: Routine
per_choice(per_data_s*, per_choice_s const*) at asn1per.cpp:?
Stack frame #05 pc 00000000000e6678 /data/app/*/lib/arm64/lib*.so: Routine
P_TransportAddress(per_data_s*) at h323.cpp:3262
...
The complete stack trace has much more entries and I've a suggestion that
the reason is stack overflow.
I've tried to increase stack size creating new thread using boost::thread
with stack_size attribute set and using pthread_create with
pthread_attr_setstack... but with no luck. Looks like these API for setting
stack size do not work or I'm doing something wrong...
What is the right way to change native thread stack size in NDK?
Or any other advices?
Code of h323.cpp looks like (it is legacy and generated by some tool, and
it uses recursion alot):
static void P_TransportAddress(per_data_t *pd) {
DBGX; static const per_choice_t TransportAddress_choice[] = {
{ 0, ASN1_EXT_ROOT, P_TransportAddress_ipAddress }, /* ipAddress */
{ 1, ASN1_EXT_ROOT, P_TransportAddress_ipSourceRoute }, /* ipSourceRoute */
{ 2, ASN1_EXT_ROOT, P_TransportAddress_ipxAddress }, /* ipxAddress */
{ 3, ASN1_EXT_ROOT, P_TransportAddress_ip6Address }, /* ip6Address */
{ 4, ASN1_EXT_ROOT, P_OCTET_STRING_16 }, /* netBios */
{ 5, ASN1_EXT_ROOT, P_OCTET_STRING_1_20 }, /* nsap */
{ 6, ASN1_EXT_ROOT, P_NonStandardParameter }, /* nonStandardAddress */
{ 0, 0, NULL }
};
per_choice(pd, TransportAddress_choice);
}
I'm trying to debug native crash with stack corruption.
********** Crash dump: **********
Build fingerprint:
'OnePlus/OnePlus3/OnePlus3T:8.0.0/OPR6.170623.013/12041042:user/release-keys'
pid: 31958, tid: 32004, name: Thread-12 >>> * <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Stack frame #00 pc 0000000000069e04 /system/lib64/libc.so (tgkill+8)
Stack frame #01 pc 000000000001df20 /system/lib64/libc.so (abort+88)
Stack frame #02 pc 0000000000025714 /system/lib64/libc.so
(__libc_fatal+116)
Stack frame #03 pc 0000000000068c88 /system/lib64/libc.so
(__stack_chk_fail+16)
Stack frame #04 pc 00000000001133ec /data/app/*/lib/arm64/lib*.so: Routine
per_choice(per_data_s*, per_choice_s const*) at asn1per.cpp:?
Stack frame #05 pc 00000000000e6678 /data/app/*/lib/arm64/lib*.so: Routine
P_TransportAddress(per_data_s*) at h323.cpp:3262
...
The complete stack trace has much more entries and I've a suggestion that
the reason is stack overflow.
I've tried to increase stack size creating new thread using boost::thread
with stack_size attribute set and using pthread_create with
pthread_attr_setstack... but with no luck. Looks like these API for setting
stack size do not work or I'm doing something wrong...
What is the right way to change native thread stack size in NDK?
Or any other advices?
Code of h323.cpp looks like (it is legacy and generated by some tool, and
it uses recursion alot):
static void P_TransportAddress(per_data_t *pd) {
DBGX; static const per_choice_t TransportAddress_choice[] = {
{ 0, ASN1_EXT_ROOT, P_TransportAddress_ipAddress }, /* ipAddress */
{ 1, ASN1_EXT_ROOT, P_TransportAddress_ipSourceRoute }, /* ipSourceRoute */
{ 2, ASN1_EXT_ROOT, P_TransportAddress_ipxAddress }, /* ipxAddress */
{ 3, ASN1_EXT_ROOT, P_TransportAddress_ip6Address }, /* ip6Address */
{ 4, ASN1_EXT_ROOT, P_OCTET_STRING_16 }, /* netBios */
{ 5, ASN1_EXT_ROOT, P_OCTET_STRING_1_20 }, /* nsap */
{ 6, ASN1_EXT_ROOT, P_NonStandardParameter }, /* nonStandardAddress */
{ 0, 0, NULL }
};
per_choice(pd, TransportAddress_choice);
}
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/3a8c1a58-40a6-4b61-9664-99eb05e4ffa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/3a8c1a58-40a6-4b61-9664-99eb05e4ffa7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.