View Issue Details

IDProjectCategoryView StatusLast Update
0004810ardourbugspublic2020-04-19 20:16
Reporterahurst Assigned Tocth103  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.0-beta3 
Target Version3.0 
Summary0004810: Using local variable pointer outside of scope
DescriptionHigh 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 Information167 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 }
TagsNo tags attached.

Activities

cth103

2012-04-07 01:54

administrator   ~0013086

SVN 11808.

system

2020-04-19 20:16

developer   ~0023019

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

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