Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
极致猎手
jadx
提交
a7173923
J
jadx
项目概览
极致猎手
/
jadx
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jadx
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
a7173923
编写于
4月 29, 2022
作者:
S
Skylot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: workaround to prevent incorrect order after `move` inline (#1472)
上级
a71b3a71
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
84 addition
and
1 deletion
+84
-1
jadx-core/src/main/java/jadx/core/dex/visitors/MoveInlineVisitor.java
...c/main/java/jadx/core/dex/visitors/MoveInlineVisitor.java
+3
-1
jadx-core/src/test/java/jadx/tests/integration/others/TestMoveInline.java
...st/java/jadx/tests/integration/others/TestMoveInline.java
+37
-0
jadx-core/src/test/smali/others/TestMoveInline.smali
jadx-core/src/test/smali/others/TestMoveInline.smali
+44
-0
未找到文件。
jadx-core/src/main/java/jadx/core/dex/visitors/MoveInlineVisitor.java
浏览文件 @
a7173923
...
...
@@ -61,7 +61,9 @@ public class MoveInlineVisitor extends AbstractVisitor {
}
SSAVar
ssaVar
=
resultArg
.
getSVar
();
if
(
ssaVar
.
isUsedInPhi
())
{
return
deleteMove
(
mth
,
move
);
return
false
;
// TODO: review conditions of 'up' move inline (test TestMoveInline)
// return deleteMove(mth, move);
}
RegDebugInfoAttr
debugInfo
=
moveArg
.
get
(
AType
.
REG_DEBUG_INFO
);
for
(
RegisterArg
useArg
:
ssaVar
.
getUseList
())
{
...
...
jadx-core/src/test/java/jadx/tests/integration/others/TestMoveInline.java
0 → 100644
浏览文件 @
a7173923
package
jadx.tests.integration.others
;
import
org.junit.jupiter.api.Test
;
import
jadx.tests.api.SmaliTest
;
import
static
jadx
.
tests
.
api
.
utils
.
assertj
.
JadxAssertions
.
assertThat
;
@SuppressWarnings
(
"CommentedOutCode"
)
public
class
TestMoveInline
extends
SmaliTest
{
// @formatter:off
/*
public final void Y(int i) throws k {
int i2 = 0;
while ((i & (-128)) != 0) {
this.h[i2] = (byte) ((i & 127) | 128);
i >>>= 7;
i2++;
}
byte[] bArr = this.h;
bArr[i2] = (byte) i;
this.a.k(bArr, 0, i2 + 1);
}
*/
// @formatter:on
@Test
public
void
test
()
{
getArgs
().
setRawCFGOutput
(
true
);
assertThat
(
getClassNodeFromSmali
())
.
code
()
// check operations order
.
containsLines
(
3
,
"i >>>= 7;"
,
"i2++;"
);
}
}
jadx-core/src/test/smali/others/TestMoveInline.smali
0 → 100644
浏览文件 @
a7173923
.class public Lothers/TestMoveInline;
.super Ljava/lang/Object;
.field private h:[B
.field private a:Lothers/TestMoveInline;
.method public k([BII)V
.registers 5
return-void
.end method
.method public test(I)V
.registers 7
const/4 v0, 0x0
move v1, v0
:goto_2
and-int/lit8 v2, p1, -0x80
if-nez v2, :cond_13
.line 1
iget-object v2, p0, Lothers/TestMoveInline;->h:[B
add-int/lit8 v3, v1, 0x1
int-to-byte p1, p1
aput-byte p1, v2, v1
.line 2
iget-object p1, p0, Lothers/TestMoveInline;->a:Lothers/TestMoveInline;
invoke-virtual {p1, v2, v0, v3}, Lothers/TestMoveInline;->k([BII)V
return-void
.line 3
:cond_13
iget-object v2, p0, Lothers/TestMoveInline;->h:[B
add-int/lit8 v3, v1, 0x1
and-int/lit8 v4, p1, 0x7f
or-int/lit16 v4, v4, 0x80
int-to-byte v4, v4
aput-byte v4, v2, v1
ushr-int/lit8 p1, p1, 0x7
move v1, v3
goto :goto_2
.end method
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录