Repository navigation
Conversation
1. Move deletion of m_pWaringNotices before m_pTextEdit in ~EditWrapper() 2. DMessageManager holds a reference to m_pTextEdit via event filter 3. Deleting m_pTextEdit first left DMessageManager with a dangling pointer 4. Previous fix for bug 78042 commented out m_pWaringNotices deletion entirely 5. Re-enable deletion with corrected order to fix both bug 378881 and 78042 Log: Fix crash when closing text document opened from a compressed archive Influence: 1. Test opening a text file from a zip archive, modifying and closing it 2. Verify no crash log is generated after closing the document 3. Test file reload prompt appears correctly when external modification occurs fix: 修复 EditWrapper 析构函数中的 use-after-free 问题 1. 在 ~EditWrapper() 中将 m_pWaringNotices 的删除移至 m_pTextEdit 之前 2. DMessageManager 通过事件过滤器持有 m_pTextEdit 的引用 3. 先删除 m_pTextEdit 会导致 DMessageManager 持有悬空指针 4. 此前 bug 78042 的修复直接注释掉了 m_pWaringNotices 的删除 5. 以正确顺序重新启用删除,同时修复 bug 378881 和避免 bug 78042 回归 Log: 修复压缩包中打开文本文档关闭后文本编辑器崩溃的问题 Influence: 1. 测试从 zip 压缩包中打开文本文档,修改后关闭 2. 验证关闭文档后不产生崩溃日志 3. 测试文件被外部修改时重新加载提示框正常显示 PMS: BUG-378881
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pengfeixx The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe destructor now cleans up m_pWaringNotices before m_pTextEdit, ensuring DMessageManager no longer references a freed editor while preserving warning-notice cleanup and addressing the related crash regressions. Sequence diagram for safe EditWrapper destructionsequenceDiagram
participant EditWrapper
participant DMessageManager
participant WarningNotices
participant TextEdit
EditWrapper->>WarningNotices: disconnect()
EditWrapper->>WarningNotices: delete
WarningNotices-->>DMessageManager: remove event filter
EditWrapper->>TextEdit: disconnect()
EditWrapper->>TextEdit: delete
DMessageManager-->>TextEdit: no dangling reference
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 无 💡 改进建议代码示例// 暂无代码示例本报告由 AI 代码审查工具自动生成 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: fix use-after-free in EditWrapper destructor
Log: Fix crash when closing text document opened from a compressed archive
Influence:
fix: 修复 EditWrapper 析构函数中的 use-after-free 问题
Log: 修复压缩包中打开文本文档关闭后文本编辑器崩溃的问题
Influence:
PMS: BUG-378881
Summary by Sourcery
Fix EditWrapper destruction to clean up warning notices before the text editor and eliminate dangling event-filter references.
Bug Fixes: