Commit c9e889f
committed
fix: improve vtable ownership verification in hasVtable
1. Enhanced hasVtable function to verify vtable pointer matches recorded
ghost vtable
2. Added address reuse detection with detailed warning logging
3. Implemented cleanup of stale mappings when address reuse is detected
4. Fixed potential false positives when memory addresses are reused by
different objects
Log: Fixed vtable hook detection reliability when memory addresses are
reused
Influence:
1. Test vtable hooking with objects that have similar memory addresses
2. Verify hasVtable returns correct results after object destruction
and recreation
3. Test memory reuse scenarios with multiple object allocations
4. Check warning logs for address reuse detection
5. Verify no memory leaks when stale mappings are cleaned up
6. Test vtable hook stability in long-running applications
fix: 改进 hasVtable 函数中的虚表所有权验证
1. 增强 hasVtable 函数以验证虚表指针是否与记录的 ghost 虚表匹配
2. 添加地址重用检测和详细的警告日志记录
3. 在检测到地址重用时实现陈旧映射的清理
4. 修复当内存地址被不同对象重用时可能出现的误判问题
Log: 修复了内存地址被重用时虚表钩子检测的可靠性问题
Influence:
1. 测试具有相似内存地址的对象的虚表钩子功能
2. 验证对象销毁和重新创建后 hasVtable 返回正确结果
3. 测试多个对象分配时的内存重用场景
4. 检查地址重用检测的警告日志
5. 验证清理陈旧映射时没有内存泄漏
6. 测试长时间运行应用程序中虚表钩子的稳定性
PMS: BUG-329331 BUG-3345911 parent 2dc1098 commit c9e889f
1 file changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
241 | 244 | | |
242 | 245 | | |
243 | 246 | | |
244 | 247 | | |
245 | 248 | | |
246 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
247 | 264 | | |
248 | 265 | | |
249 | 266 | | |
| |||
0 commit comments