View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002647 | FSSCP | physics | public | 2012-05-06 14:56 | 2012-07-01 04:35 |
Reporter | Echelon9 | Assigned To | The_E | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.6.14 RC5 | ||||
Target Version | 3.6.14 | ||||
Summary | 0002647: PVS-Studio warning: Pointer to local variables stored outside scope in ArmorType::GetDamage() | ||||
Description | Series of pointer related issues that may be related to the armour / damage problems that have been reported in WiH. For more background, see http://www.viva64.com/en/d/0095/ | ||||
Additional Information | V506 Pointer to local variable 'base_damage' is stored outside the scope of this variable. Such a pointer will become invalid. ship.cpp:16650 V506 Pointer to local variable 'constant_val' is stored outside the scope of this variable. Such a pointer will become invalid. ship.cpp:16660 V506 Pointer to local variable 'constant_val' is stored outside the scope of this variable. Such a pointer will become invalid. ship.cpp:16664 V506 Pointer to local variable 'constant_val' is stored outside the scope of this variable. Such a pointer will become invalid. ship.cpp:16668 | ||||
Tags | No tags attached. | ||||
|
Fix committed to trunk@8769. |
|
Not resolved, still present as of r8780. |
|
Fix committed to trunk@8781. |
|
This was flagged under RC5, but the code that PVS Studio checked was trunk specific, so the fixes by the related commits (8769/8770/8781) can't be applied to the RC Branch due to Nukes Armor Types changes not being present in the RC Branch. We need a better evaluation of the RC Branch code for this issue with an RC Branch specific fix (preferably by patch first to test) to evaluate how to actually fix this problem in RC Branch for Final. |
|
Maybe this doesn't actually affect the RC branch. I just looked at the 3.6.14 code and those variables aren't even present in ship.cpp. |
|
Re-resolving because no change is needed in the 3.6.14 branch. |
fs2open: trunk r8769 2012-05-10 11:04 Ported: N/A Details Diff |
Fix for Mantis 2647: Pointers becoming invalid when going out of scope during armor calculations (PVS Studio warning) |
Affected Issues 0002647 |
|
mod - /trunk/fs2_open/code/ship/ship.cpp | Diff File | ||
fs2open: trunk r8781 2012-05-13 15:38 Ported: N/A Details Diff |
Fix for Mantis 2647, take two: Remove the pointers in question |
Affected Issues 0002647 |
|
mod - /trunk/fs2_open/code/ship/ship.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-06 14:56 | Echelon9 | New Issue | |
2012-05-06 14:58 | Echelon9 | Summary | PVS-Studio warning: Pointer to local variable stored outside scope in ArmorType::GetDamage() => PVS-Studio warning: Pointer to local variables stored outside scope in ArmorType::GetDamage() |
2012-05-10 15:02 | The_E | Changeset attached | => fs2open trunk r8769 |
2012-05-10 15:02 | The_E | Note Added: 0013539 | |
2012-05-10 15:02 | The_E | Status | new => resolved |
2012-05-10 15:02 | The_E | Resolution | open => fixed |
2012-05-13 05:16 | Echelon9 | Assigned To | => The_E |
2012-05-13 05:16 | Echelon9 | Note Added: 0013556 | |
2012-05-13 05:16 | Echelon9 | Status | resolved => feedback |
2012-05-13 05:16 | Echelon9 | Resolution | fixed => reopened |
2012-05-13 19:36 | The_E | Changeset attached | => fs2open trunk r8781 |
2012-05-13 19:36 | The_E | Note Added: 0013557 | |
2012-05-13 19:36 | The_E | Status | feedback => resolved |
2012-06-28 18:13 | Zacam | Note Added: 0013734 | |
2012-06-28 18:13 | Zacam | Status | resolved => feedback |
2012-06-30 23:42 | Goober5000 | Note Added: 0013739 | |
2012-07-01 04:35 | Goober5000 | Note Added: 0013742 | |
2012-07-01 04:35 | Goober5000 | Status | feedback => resolved |
2012-07-01 04:35 | Goober5000 | Resolution | reopened => fixed |