alibaba / alibaba/arthas

jad反编译出现行数乱串/不显示行数的问题

Open
#1,963 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
37.5k
Forks
7.6k
Avg merge
1d 22h
Merged PRs (30d)
4

Description

- [ ] 我已经在 [issues](https://github.com/alibaba/arthas/issues) 里搜索,没有重复的issue。

### 环境信息

* `arthas-boot.jar` 或者 `as.sh` 的版本: 3.5.0
* Arthas 版本: 3.5.4
* 操作系统版本: CentOS Linux release 7.9.2009 (Core)
* 目标进程的JVM版本: 1.8.0_211
* 执行`arthas-boot`的版本: 1.8.0_211

### 重现问题的步骤

1. jad *.AMQConnection查看反编译的代码,出现行数乱串(比如由上往下阅读,反编译后的代码,先显示行数为前500的代码,然后显示行数为1000到1500的代码,最后又显示行数为500到1000行的代码),反编译后的代码,中间还有部分不显示行数,具体可看后边的图片
### 期望的结果
提升jad反编译后文件的准确性

下图是行数串的截图
![image](https://user-images.githubusercontent.com/59059195/134772034-db116b7e-ccd6-4dcb-8513-a4ee67f694f8.png)

下图是同样 执行jad *.AMQConnection后不显示行数的截图
![image](https://user-images.githubusercontent.com/59059195/134772101-319f60dc-f00d-41f2-b569-49b19266bcf4.png)

原始java文件如下
[AMQConnection.java.txt](https://github.com/alibaba/arthas/files/7229753/AMQConnection.java.txt)
反编译的文件:


[AMQConnection.class.txt](https://github.com/alibaba/arthas/files/7229757/AMQConnection.class.txt)

Contributor guide

Open the contributing guide

Research direction

Start with the `jad` command and compare the attached `AMQConnection.java.txt` source with `AMQConnection.class.txt`, focusing on the reported line-number ordering and missing numbers. Reproduce the issue with `jad *.AMQConnection`; done means the decompiled output has accurate, consistently ordered line numbers without gaps where the class provides them.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.