redex
redex copied to clipboard
RuntimeError: redex-all crashed with exit code -6!
when I run redex -c config/default.config /Users/zhusniffstherose-/Documents/Android/Project/optimization/ReDexDemo/app/build/outputs/apk/debug/app-debug.apk -o /Users/zhusniffstherose-/Documents/Android/Project/optimization/ReDexDemo/app/build/outputs/apk/debug/app-redex.apk, there is output:
WARNING:root:No android_sdk_api_XX_file parameters found!
Trace settings:
TRACEFILE=
SHOW_TIMESTAMPS=
SHOW_TRACEMODULE=
TRACE_METHOD_FILTER=
libc++abi.dylib: terminating with uncaught exception of type boost::exception_detail::error_info_injector<RedexException>: libredex/DexLoader.cpp:50: void validate_dex_header(const dex_header *, size_t, int): assertion `supported' failed.
Bad dex magic dex
039 for support_dex_version 35
0 redex-all 0x0000000104f5a052 _Z23crash_backtrace_handleri + 50
1 libsystem_platform.dylib 0x00007fff203ced7d _sigtramp + 29
2 ??? 0x00007fff00000400 0x0 + 140733193389056
3 libsystem_c.dylib 0x00007fff202dd720 abort + 120
4 libc++abi.dylib 0x00007fff2034f418 abort_message + 231
5 libc++abi.dylib 0x00007fff20340a65 _ZL28demangling_terminate_handlerv + 242
6 libobjc.A.dylib 0x00007fff202369b9 _ZL15_objc_terminatev + 104
7 libc++abi.dylib 0x00007fff2034e847 _ZSt11__terminatePFvvE + 8
8 libc++abi.dylib 0x00007fff20351167 __cxa_get_exception_ptr + 0
9 libc++abi.dylib 0x00007fff2035112e _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
10 redex-all 0x0000000104f5a64e _Z11assert_failPKcS0_jS0_10RedexErrorS0_z + 894
11 redex-all 0x0000000104f9b956 _ZN9DexLoader8load_dexEPKcP11dex_stats_ti + 550
12 redex-all 0x0000000104f9d045 _Z21load_classes_from_dexPKcP11dex_stats_tbi + 117
13 redex-all 0x0000000104eef0e1 _ZN5redex36load_classes_from_dexes_and_metadataERKNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERNS1_I8DexStoreNS5_ISC_EEEER11dex_stats_tRNS1_ISG_NS5_ISG_EEEE + 2033
14 redex-all 0x0000000104f077e0 _ZNSt3__110__function6__funcIZN12_GLOBAL__N_114redex_frontendER11ConfigFilesRNS2_9ArgumentsERN10keep_rules21ProguardConfigurationERNS_6vectorI8DexStoreNS_9allocatorISB_EEEERN4Json5ValueEE3$_4NSC_ISJ_EEFvvEEclEv + 192
15 redex-all 0x00000001050f2b30 _Z27run_rethrow_first_aggregateRKNSt3__18functionIFvvEEE + 32
16 redex-all 0x0000000104efb482 _ZN12_GLOBAL__N_114redex_frontendER11ConfigFilesRNS_9ArgumentsERN10keep_rules21ProguardConfigurationERNSt3__16vectorI8DexStoreNS7_9allocatorIS9_EEEERN4Json5ValueE + 1650
17 redex-all 0x0000000104ef4932 main + 1586
18 libdyld.dylib 0x00007fff203a5621 start + 1
Traceback (most recent call last):
File "/tmp/redex.UhHyEy/redex.py", line 1156, in <module>
with_temp_cleanup(lambda: run_redex(args), args.always_clean_up)
File "/private/tmp/redex.UhHyEy/pyredex/utils.py", line 57, in with_temp_cleanup
fn()
File "/tmp/redex.UhHyEy/redex.py", line 1156, in <lambda>
with_temp_cleanup(lambda: run_redex(args), args.always_clean_up)
File "/tmp/redex.UhHyEy/redex.py", line 1135, in run_redex
run_redex_binary(state, term_handler, exception_formatter)
File "/tmp/redex.UhHyEy/redex.py", line 520, in run_redex_binary
if run():
File "/tmp/redex.UhHyEy/redex.py", line 506, in run
raise RuntimeError(msg)
RuntimeError: redex-all crashed with exit code -6! You can re-run it under gdb by running /tmp/redex.UhHyEy/redex-gdb-97ctj1au.sh or under lldb by running /tmp/redex.UhHyEy/redex-lldb-m0xa0kvn.sh
is the dex version of 039 not support?
also, the default.config:
{
"redex" : {
"passes" : [
"ReBindRefsPass",
"BridgePass",
"ResultPropagationPass", # Run after BridgePass to avoid pattern matching conflicts
"FinalInlinePassV2",
"DelSuperPass",
"CommonSubexpressionEliminationPass", # Run once just before MethodInlinePass
"MethodInlinePass",
"PeepholePass",
"ConstantPropagationPass",
"LocalDcePass",
"RemoveUnreachablePass",
"RemoveGotosPass",
"DedupBlocksPass",
"UpCodeMotionPass",
"SingleImplPass",
"ReorderInterfacesDeclPass",
"RemoveEmptyClassesPass",
"ShortenSrcStringsPass",
"CommonSubexpressionEliminationPass", # Run a second time after all method inlining is done
"RegAllocPass",
"CopyPropagationPass",
"LocalDcePass",
"InterDexPass",
"ReduceGotosPass" # This pass should come at the very end, after all other code transformations that might add gotos
]
},
"coldstart_classes": "list_of_classes.txt",
"FinalInlinePass" : {
"propagate_static_finals": true,
"replace_encodable_clinits": true
},
"MethodInlinePass": {
"throws": true,
"multiple_callers": true,
"blocklist": []
},
"RegAllocPass" : {
"live_range_splitting": false
},
"CopyPropagationPass" : {
"eliminate_const_literals": false,
"full_method_analysis": true
},
"PeepholePass" : {
"disabled_peepholes": [
"Replace_PutGet",
"Replace_PutGetWide",
"Replace_PutGetObject",
"Replace_PutGetShort",
"Replace_PutGetChar",
"Replace_PutGetByte",
"Replace_PutGetBoolean"
]
},
"keep_packages": [
"Lcom/fasterxml/jackson/",
"Lcom/google/dexmaker/mockito/"
],
"debug_info_kind": "no_custom_symbolication",
"method_move_map" : "redex-moved-methods-map.txt",
"string_sort_mode" : "class_order",
"bytecode_sort_mode" : ["method_similarity_order", "class_order"],
"ir_type_checker": {
"run_after_each_pass" : false,
"verify_moves" : false
}
}
Dex 39 is not supported as the error msg said, we are working on supporting new versions but it's currently not our high priority.
Dex 39 is not supported as the error msg said, we are working on supporting new versions but it's currently not our high priority.
thx for your response, It is better to declare the supported versions in the Document to avoid developers spending a lot of time compiling the library only to have it not work in the end.
How to solve this problem at last ? I have this problem again, any ideas?
RuntimeError: redex-all crashed with exit code -6!
0 redex-all 0x000000010e8a2811 _Z23debug_backtrace_handleri + 81
1 libsystem_platform.dylib 0x00007fff203cbd7d _sigtramp + 29
2 ??? 0x00007fa200000400 0x0 + 140333761430528
3 libsystem_c.dylib 0x00007fff202db406 abort + 125
4 libc++abi.dylib 0x00007fff20349ef2 abort_message + 241
5 libc++abi.dylib 0x00007fff2033b5e5 _ZL28demangling_terminate_handlerv + 242
6 libobjc.A.dylib 0x00007fff20234595 _ZL15_objc_terminatev + 104
7 libc++abi.dylib 0x00007fff20349307 _ZSt11__terminatePFvvE + 8
8 libc++abi.dylib 0x00007fff2034bbeb __cxa_get_exception_ptr + 0
9 libc++abi.dylib 0x00007fff2034bbb2 _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
10 redex-all 0x000000010e8a2e01 _Z11assert_failPKcS0_jS0_10RedexErrorS0_z + 913
11 redex-all 0x000000010ea1443d _ZN12_GLOBAL__N_113CheckerConfig12run_verifierERKNSt3__16vectorIP8DexClassNS1_9allocatorIS4_EEEEbbbbb + 4221
12 redex-all 0x000000010ea0cc58 _ZN11PassManager10run_passesERNSt3__16vectorI8DexStoreNS0_9allocatorIS2_EEEER11ConfigFiles + 6136
13 redex-all 0x000000010e82a984 main + 2852
14 libdyld.dylib 0x00007fff203a1f3d start + 1
15 ??? 0x000000000000001d 0x0 + 29
Traceback (most recent call last):
File "/tmp/redex.OWtjNT/redex.py", line 1262, in
如何解决?
你的邮件已收到。