# HG changeset patch # User Thinker K.F. Li # Date 1313378036 -28800 # Node ID 46e40afd45586028ae1616e05db20dad48f970ef # Parent c56c7cf32b8897e0cb629ab92540136e8ca181ec Fix bug of typo in dex_sort_sorted_arrays_consistent() diff -r c56c7cf32b88 -r 46e40afd4558 paraspace/injection.py --- a/paraspace/injection.py Mon Aug 15 10:08:43 2011 +0800 +++ b/paraspace/injection.py Mon Aug 15 11:13:56 2011 +0800 @@ -735,7 +735,7 @@ new_typeids = dex_linked.typeIds.items new_methodids = dex_linked.methodIds.items - methodidxs_map, typeidxs_map = \ + typeidxs_map, methodidxs_map = \ _make_idx_map(saved_typeids, saved_methodids, \ new_typeids, new_methodids) diff -r c56c7cf32b88 -r 46e40afd4558 paraspace/tests/injection_test.py --- a/paraspace/tests/injection_test.py Mon Aug 15 10:08:43 2011 +0800 +++ b/paraspace/tests/injection_test.py Mon Aug 15 11:13:56 2011 +0800 @@ -698,6 +698,9 @@ method = hello_linked.find_method_idx(methodidx) blk = dexfile.DEXFile_linked.get_code_block_method(method) opvectors = decode_insn_blk(blk) + # Check correctness of typeid of a new_instance. + # This is an error of dex_sort_sorted_arrays_consistent(). + assert opvectors[2][1][1] < len(hello_linked.typeIds.items) pass pass pass