ASSERT NOT IMPLEMENTED hit in ARM Android: aarchxx/mangle.c:2534 "base reg is in the reglist"
Created by: sudakshina-das-arm
I am continuing on one of the crash reports #2465 (closed) and #2492 After @egrimley merged his patch of adding some missing instructions, the APKs that were earlier failing with the missing vmov.f32 instructions are all now failing with a signal 11. The modified debug version (refer to #2492 ) gave out
07-05 11:20:39.040 I/wrap.sh ( 5183): referenceTable GDEF length=814 1
07-05 11:20:39.047 I/wrap.sh ( 5183): referenceTable GSUB length=11364 1
07-05 11:20:39.066 I/wrap.sh ( 5183): referenceTable GPOS length=47302 1
07-05 11:20:50.640 I/wrap.sh ( 5183): wrap.sh terminated by signal 11
07-05 11:26:41.344 I/wrap.sh ( 5594): <Starting application /system/bin/app_process32 (5595)>
07-05 11:26:41.353 I/wrap.sh ( 5594): <Paste into GDB to debug DynamoRIO clients:
07-05 11:26:41.354 I/wrap.sh ( 5594): set confirm off
07-05 11:26:41.354 I/wrap.sh ( 5594): add-symbol-file '/data/local/tmp/fresh-build/lib32/debug/libdynamorio.so' 0xb6d3c350
07-05 11:26:41.354 I/wrap.sh ( 5594): >
07-05 11:26:41.375 I/wrap.sh ( 5594): <Initial options = -no_dynamic_options -code_api -no_use_all_memory_areas -stack_size 56K -max_elide_jmp 0 -max_elide_call 0 -early_inject -emulate_brk -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct >
07-05 11:26:55.832 I/wrap.sh ( 5594): <unhandled signal system call 177>
07-05 11:27:09.229 I/wrap.sh ( 5594): referenceTable GDEF length=814 1
07-05 11:27:09.252 I/wrap.sh ( 5594): referenceTable GSUB length=11364 1
07-05 11:27:09.317 I/wrap.sh ( 5594): referenceTable GPOS length=47302 1
07-05 11:27:15.668 I/wrap.sh ( 5594): <-- parent 5595 forked child 5664 -->
07-05 11:27:16.099 I/wrap.sh ( 5594): <Stopping application /system/bin/app_process32 (5664)>
07-05 11:27:30.348 I/wrap.sh ( 5594): <(1+x) Handling our fault in a TRY at 0xb6f5a9bc>
07-05 11:27:30.374 I/wrap.sh ( 5594): <CURIOSITY : (0) && "crashed while walking dynamic header" in file /work/arkham/ada-2/fresh/core/unix/module_elf.c line 482
07-05 11:27:30.374 I/wrap.sh ( 5594): version 6.2.17301, custom build
07-05 11:27:30.374 I/wrap.sh ( 5594): -no_dynamic_options -code_api -no_use_all_memory_areas -stack_size 56K -max_elide_jmp 0 -max_elide_call 0 -early_inject -emulate_brk -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct
07-05 11:27:30.374 I/wrap.sh ( 5594): 0xb6df17a9 0x78af04b0>
07-05 11:27:35.394 I/wrap.sh ( 5594): <CURIOSITY : (app_pc)((((ptr_uint_t)addr+len) + ((os_page_size())-1)) & (~((ptr_uint_t)(os_page_size())-1))) == ma->end in file /dynamorio//core/unix/os.c line 6737
07-05 11:27:35.395 I/wrap.sh ( 5594): version 6.2.17301, custom build
07-05 11:27:35.395 I/wrap.sh ( 5594): -no_dynamic_options -code_api -no_use_all_memory_areas -stack_size 56K -max_elide_jmp 0 -max_elide_call 0 -early_inject -emulate_brk -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct
07-05 11:27:35.395 I/wrap.sh ( 5594): 0xb6df17a9 0x78af04b0>
07-05 11:27:43.368 I/wrap.sh ( 5594): <Application /system/bin/app_process32 (5595). Internal Error: DynamoRIO debug check failure: Not implemented @dynamorio/core/arch/aarchxx/mangle.c:2534 !(write_pc && !writeback && instr_writes_to_reg(instr, base, DR_QUERY_INCLUDE_ALL))
07-05 11:27:43.368 I/wrap.sh ( 5594): (Error occurred @139164 frags)
07-05 11:27:43.368 I/wrap.sh ( 5594): version 6.2.17301, custom build
07-05 11:27:43.368 I/wrap.sh ( 5594): -no_dynamic_options -code_api -no_use_all_memory_areas -stack_size 56K -max_elide_jmp 0 -max_elide_call 0 -early_inject -emulate_brk -no_inline_ignored_syscalls -native_exec_default_list '' -no_native_exec_managed_code -no_indcall2direct
07-05 11:27:43.368 I/wrap.sh ( 5594): 0xb6df17a9 0x78af04b0>
07-05 11:27:43.409 I/wrap.sh ( 5594): wrap.sh terminated by exit(255)
Just to confirm, the clean release build also does fail there if I check with print statement:
07-05 12:08:20.559 I/wrap.sh ( 4718): referenceTable GDEF length=814 1
07-05 12:08:20.565 I/wrap.sh ( 4718): referenceTable GSUB length=11364 1
07-05 12:08:20.583 I/wrap.sh ( 4718): referenceTable GPOS length=47302 1
07-05 12:08:37.563 I/wrap.sh ( 4718): ASSERT not implemented instr->opcode: 71
07-05 12:08:37.648 I/wrap.sh ( 4718): wrap.sh terminated by signal 11
diff --git a/core/arch/aarchxx/mangle.c b/core/arch/aarchxx/mangle.c
index 216ed57..d3c9649 100644
--- a/core/arch/aarchxx/mangle.c
+++ b/core/arch/aarchxx/mangle.c
@@ -2535,6 +2535,12 @@ normalize_ldm_instr(dcontext_t *dcontext,
/* base reg is in the reglist */
instr_writes_to_reg(instr, base, DR_QUERY_INCLUDE_ALL)));
+ if(write_pc && !writeback &&
+ /* base reg is in the reglist */
+ instr_writes_to_reg(instr, base, DR_QUERY_INCLUDE_ALL)) {
+ print_file (STDOUT, "ASSERT not implemented instr->opcode: %d\n", instr->opcode);
+ }
+
ASSERT(pre_ldm_adjust != NULL && pre_ldm_ldr != NULL &&
post_ldm_adjust != NULL && ldr_pc != NULL);
*pre_ldm_adjust = NULL;
I have 4 different APKs failing in the same manner and they were all earlier complaining about the missing vmov.f32 instruction.
Sudi