mirror of
https://github.com/nyanmisaka/mpp.git
synced 2026-01-24 03:00:40 +01:00
fix[cfg]: fix cfg test segment fault problem
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x1de8ebf4
r0 1de8ebf4 r1 4570704d r2 961c9f22 r3 00000011
r4 082204c0 r5 ffb39ed0 r6 00000001 r7 00000000
r8 00000000 r9 00000000 r10 00000000 r11 ffb39d30
ip ffb39688 sp ffb39cfc lr 0822ac84 pc 0824b818
4 total frames
backtrace:
#00 pc 00044818 /vendor/bin/mpp_enc_cfg_test
(strof_cfg_type+32)
#01 pc 00023c80 /vendor/bin/mpp_enc_cfg_test
(mpp_enc_cfg_show+176)
#02 pc 000194fc /vendor/bin/mpp_enc_cfg_test
(main+60)
#03 pc 00043787 /apex/com.android.runtime/lib/bionic/libc.so
(__libc_init+58)
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I5e568ce72e35a97d4b5d246d6fb13cfb2eb40ae8
This commit is contained in:
parent
9a787f4438
commit
c93e4a050a
3 changed files with 18 additions and 4 deletions
|
|
@ -50,8 +50,12 @@ const char *strof_cfg_type(CfgType type)
|
|||
"RK_U64",
|
||||
"struct",
|
||||
"void *",
|
||||
"unknown"
|
||||
};
|
||||
|
||||
if (type < 0 || type >= CFG_FUNC_TYPE_BUTT)
|
||||
type = CFG_FUNC_TYPE_BUTT;
|
||||
|
||||
return cfg_type_names[type];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -276,9 +276,14 @@ void mpp_dec_cfg_show(void)
|
|||
MppTrieInfo *node = root;
|
||||
|
||||
do {
|
||||
MppCfgInfo *info = (MppCfgInfo *)mpp_trie_info_ctx(node);
|
||||
if (node->ctx_len == sizeof(MppCfgInfo)) {
|
||||
MppCfgInfo *info = (MppCfgInfo *)mpp_trie_info_ctx(node);
|
||||
|
||||
mpp_log("%-25s type %s\n", mpp_trie_info_name(node), strof_cfg_type(info->data_type));
|
||||
mpp_log("%-25s type %s - %d:%d\n", mpp_trie_info_name(node),
|
||||
strof_cfg_type(info->data_type), info->data_offset, info->data_size);
|
||||
} else {
|
||||
mpp_log("%-25s size - %d\n", mpp_trie_info_name(node), node->ctx_len);
|
||||
}
|
||||
|
||||
node = srv->get_info_next(node);
|
||||
if (!node)
|
||||
|
|
|
|||
|
|
@ -442,9 +442,14 @@ void mpp_enc_cfg_show(void)
|
|||
MppTrieInfo *node = root;
|
||||
|
||||
do {
|
||||
MppCfgInfo *info = (MppCfgInfo *)mpp_trie_info_ctx(node);
|
||||
if (node->ctx_len == sizeof(MppCfgInfo)) {
|
||||
MppCfgInfo *info = (MppCfgInfo *)mpp_trie_info_ctx(node);
|
||||
|
||||
mpp_log("%-25s type %s\n", mpp_trie_info_name(node), strof_cfg_type(info->data_type));
|
||||
mpp_log("%-25s type %s - %d:%d\n", mpp_trie_info_name(node),
|
||||
strof_cfg_type(info->data_type), info->data_offset, info->data_size);
|
||||
} else {
|
||||
mpp_log("%-25s size - %d\n", mpp_trie_info_name(node), node->ctx_len);
|
||||
}
|
||||
|
||||
node = srv->get_info_next(node);
|
||||
if (!node)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue