Anonymous | Login | 2024-11-21 08:43 UTC |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0003154 | VCMI | AI - Battles | public | 2020-10-25 06:49 | 2022-03-27 18:30 | ||||||||
Reporter | jambolo | ||||||||||||
Assigned To | Nullkiller | ||||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||||
Status | resolved | Resolution | fixed | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | 1.next | |||||||||||
Summary | 0003154: Potential race condition locking a weak pointer | ||||||||||||
Description | There is a potential race condition at lines 52 - 55 in client\battle\CBattleInterface.cpp. <code> if(anim.expired()) return; std::shared_ptr<CCreatureAnimation> animation = anim.lock(); if (animation->isIdle()) </code> Using a shared pointer obtained by locking a weak pointer without checking the result of the lock could result in a crash if the shared pointer has expired before lock() is called. When expired() is called before lock() in a multi-threaded environment, it is possible for the shared pointer to expire between expired() and lock(). The safe method is to check the result of lock(). | ||||||||||||
Tags | R1 | ||||||||||||
Attached Files | |||||||||||||
Issue History | |||
Date Modified | Username | Field | Change |
2020-10-25 06:49 | jambolo | New Issue | |
2020-10-25 06:50 | jambolo | Note Added: 0007946 | |
2022-03-17 09:43 | Povelitel | Assigned To | => Nullkiller |
2022-03-17 09:43 | Povelitel | Status | new => assigned |
2022-03-22 19:35 | Povelitel | Tag Attached: R1 | |
2022-03-27 18:30 | Povelitel | Status | assigned => resolved |
2022-03-27 18:30 | Povelitel | Fixed in Version | => 1.next |
2022-03-27 18:30 | Povelitel | Resolution | open => fixed |
Copyright © 2000 - 2024 MantisBT Team |