Skip to content

Conversation

@UzJu
Copy link
Member

@UzJu UzJu commented Oct 24, 2023

No description provided.

@CC11001100 CC11001100 requested a review from a team October 24, 2023 08:57
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

卸载时把 QLExpressCheck.setQLClassLoader 置空,如果loader还在那么这个引用还在,会导致该类卸载不掉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果不是用SetQLClassLoader 直接使用Class.forName 会存在该情况吗
我看FastJSONCheck也没有做这些处理

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果不是用SetQLClassLoader 直接使用Class.forName 会存在该情况吗 我看FastJSONCheck也没有做这些处理

底层原理是:类成员变量尽量不要引用被插桩程序对象,若必须引用情况的下,要在卸载时将其置空取消引用。类成员变量随着对象的建立而建立,随着对象的消失而消失,存在于对象所在的堆内存中,所以如果不把其置为空,单卸载iastclassloader是没办法将该引用取消的。

Class.forName 也分情况,若有对被插桩应用的引用,就会存在这种情况。

FastJSONCheck 同样需要置空

@mazp99 mazp99 requested a review from a team November 2, 2023 06:22
return true;
}
}catch (Throwable e){
DongTaiLog.debug("Beim Abrufen der Felder der QLExpress-Komponente ist ein Fehler aufgetreten.: {}, {}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

哥,这是德文不是英文啊 @UzJu

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

。。。后面的commit改了

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

笑死我了

@mazp99 mazp99 merged commit 4917fba into HXSecurity:beta Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants