• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: VWR-85
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Phoenix Linden
Reporter: Strife Onizuka
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
1. Second Life Viewer - VWR

lsa_cmp_lists, memory leak

Created: 10/Jan/07 01:30 AM   Updated: 24/May/07 05:02 PM
Return to search
Component/s: Scripting
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File listcompare.diff (2 kB)

Issue Links:
Relates
 

Source Version: 1.13.2.12
Linden Lab Issue ID: SL-33898
Patch attached: Patch attached


 Description  « Hide
\linden\indra\lscript\lscript_library\lscript_alloc.cpp
Lines 1001 -> 1051

There are a few bugs with this function that can be fixed without breaking any existing scripts.
Bug1: Memory Leak: When the lengths are not equal 'list1' & 'list2' are not released before return.
Bug2: Memory Leak: In the while loop, 'list1' & 'list2' are never released before return.
Bug3: 'count' is never incremented so zero is always returned by the while loop.

Incrementing 'count' would break existing scripts. Since the while loop always returns zero, it can be eliminated since zero is the default return at this point.

We can simplify this entire section of code by
Replacing the above mentioned lines with:

delete list1;
delete list2;
return length1 - length2;



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Strife Onizuka made changes - 22/Jan/07 02:01 PM
Field Original Value New Value
Patch attached [Patch attached]
Strife Onizuka made changes - 22/Jan/07 02:01 PM
Priority Major [ 3 ] Minor [ 4 ]
Strife Onizuka made changes - 22/Jan/07 03:58 PM
Source Version 1.13.2.12
Attachment listcompare.diff [ 10020 ]
Rob Linden made changes - 29/Jan/07 02:38 PM
Project Second Life Service - SVC [ 10002 ] Second Life Viewer - VWR [ 10003 ]
Component/s Scripts [ 10043 ]
Affects Version/s 1.13.1.5 [ 10001 ]
Component/s Scripting [ 10030 ]
Key SVC-3 VWR-85
Second Life Admin made changes - 29/Jan/07 02:39 PM
Linden Lab Issue ID SL-33826
Second Life Admin made changes - 29/Jan/07 10:08 PM
Linden Lab Issue ID SL-33826 SL-33898
Phoenix Linden made changes - 31/Jan/07 09:32 AM
Assignee Phoenix Linden [ Phoenix Linden ]
Phoenix Linden made changes - 31/Jan/07 09:47 AM
Status Open [ 1 ] In Progress [ 3 ]
Phoenix Linden made changes - 06/Feb/07 02:16 PM
Resolution Fixed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
Strife Onizuka made changes - 15/Apr/07 01:17 AM
Link This issue is related to by SVC-113 [ SVC-113 ]
Simon Nolan made changes - 24/May/07 05:02 PM
Link This issue is related to by SVC-227 [ SVC-227 ]
Rob Linden made changes - 22/Dec/07 02:32 AM
Workflow jira [ 10034 ] jira-2007-12-21 [ 25913 ]
Rob Linden made changes - 22/Dec/07 02:44 AM
Workflow jira [ 25913 ] jira-2007-12-21 [ 26595 ]
Rob Linden made changes - 22/Dec/07 03:30 PM
Workflow jira-2007-12-21 [ 26595 ] jira-2007-12-22 [ 32991 ]
Rob Linden made changes - 22/Dec/07 03:53 PM
Workflow jira-2007-12-21 [ 32991 ] jira-2007-12-22 [ 35043 ]
Rob Linden made changes - 22/Dec/07 08:51 PM
Workflow jira-2007-12-22 [ 35043 ] jira-2007-12-22a [ 40175 ]
Rob Linden made changes - 22/Dec/07 10:08 PM
Workflow jira-2007-12-22 [ 40175 ] jira-2007-12-22a [ 44150 ]
Rob Linden made changes - 22/Dec/07 10:31 PM
Workflow jira-2007-12-22 [ 44150 ] jira-2007-12-22a [ 45504 ]
Sue Linden made changes - 13/Nov/08 11:10 AM
Workflow jira-2007-12-22a [ 45504 ] jira-2008-11-14 [ 65183 ]
Sue Linden made changes - 13/Nov/08 11:34 AM
Workflow jira-2007-12-22a [ 65183 ] jira-2008-11-14 [ 73647 ]
Sue Linden made changes - 13/Nov/08 05:06 PM
Workflow jira-2008-11-14 [ 73647 ] jira-2008-11-14a [ 99193 ]
Sue Linden made changes - 13/Nov/08 05:21 PM
Workflow jira-2008-11-14 [ 99193 ] jira-2008-11-14a [ 105047 ]
Sue Linden made changes - 13/Nov/08 05:30 PM
Workflow jira-2008-11-14 [ 105047 ] jira-2008-11-14a [ 108898 ]
Sue Linden made changes - 13/Nov/08 05:49 PM
Workflow jira-2008-11-14 [ 108898 ] jira-2008-11-14a [ 114699 ]
Sue Linden made changes - 13/Nov/08 06:20 PM
Workflow jira-2008-11-14 [ 114699 ] jira-2008-11-14a [ 126226 ]
Sue Linden made changes - 13/Nov/08 06:47 PM
Workflow jira-2008-11-14 [ 126226 ] jira-2008-11-14a [ 136646 ]