View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004810 | ardour | bugs | public | 2012-04-04 23:25 | 2020-04-19 20:16 |
| Reporter | ahurst | Assigned To | cth103 | ||
| Priority | normal | Severity | major | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | ||
| Product Version | 3.0-beta3 | ||||
| Target Version | 3.0 | ||||
| Summary | 0004810: Using local variable pointer outside of scope | ||||
| Description | High impact static analysis bug: In gtk2_ardour/playlist_selector.cc:180: Using "selected_row", which points to an out-of-scope local variable "child_row". The pointer is no longer valid. | ||||
| Additional Information | 167 for (list<boost::shared_ptr<Playlist> >::iterator p = pls->begin(); p != pls->end(); ++p) { 168 169 TreeModel::Row child_row; 170 171 child_row = *(model->append (row.children())); 172 child_row[columns.text] = (*p)->name(); 173 child_row[columns.playlist] = *p; 174 175 if (*p == this_track->playlist()) { *** Assigning: "selected_row" = "&child_row" (address of local variable "child_row"). 176 selected_row = &child_row; 177 } *** Variable "child_row" goes out of scope. *** Jumping back to the beginning of the loop *** Reached end of loop 178 } 179 *** Pointer to local outside scope. Using "selected_row", which points to an out-of-scope variable "child_row". 180 if (selected_row != 0) { 181 tree.get_selection()->select (*selected_row); 182 } | ||||
| Tags | No tags attached. | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2012-04-04 23:25 | ahurst | New Issue | |
| 2012-04-05 01:12 | cth103 | cost | => 0.00 |
| 2012-04-05 01:12 | cth103 | Target Version | => 3.0 beta4 |
| 2012-04-05 01:12 | cth103 | Additional Information Updated | |
| 2012-04-07 01:54 | cth103 | Note Added: 0013086 | |
| 2012-04-07 01:54 | cth103 | Status | new => resolved |
| 2012-04-07 01:54 | cth103 | Resolution | open => fixed |
| 2012-04-07 01:54 | cth103 | Assigned To | => cth103 |
| 2012-05-23 15:08 | cth103 | Target Version | 3.0 beta4 => 3.0 |
| 2020-04-19 20:16 | system | Note Added: 0023019 | |
| 2020-04-19 20:16 | system | Status | resolved => closed |