bugConcurrent Versions System - Bugs: bug #30528, Segfault in linevector_free()

 
 

bug #30528: Segfault in linevector_free()

Submitter:  Petr Pisar <petrp>
Submitted:  Fri 23 Jul 2010 11:55:48 AM UTC
   
 
Category:  Bug Report Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release: 
Fixed Release:  1.11.24 Fixed Feature Release:  1.12.14
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 21 Oct 2010 03:30:34 PM UTC, comment #1: 

I belive this issue has been fixed in:

2010-10-21  Larry Jones  <lawrence.jones@siemens.com>

  • rcs.c (apply_rcs_changes): Correct deltatext position sanity

checks.  Keep lines in sync so that linevector_free() doesn't
try to free garbage.

Petr Pisar <petrp>
Fri 23 Jul 2010 11:55:48 AM UTC, original submission:  

Package: cvs-1.11.23-8.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)

cvs update: Updating common/v
P common/v/latch_test_ctrl.v
cvs update: checksum failure after patch to common/v/latch_test_ctrl.v; will refetch
P common/v/test_ctrl.v
cvs update: checksum failure after patch to common/v/test_ctrl.v; will refetch
P common/v/test_ctrl_n.v
Segmentation fault (core dumped)   


According back trace, it crashed in linevector_free() called from apply_rcs_changes() operating on local temporary lines structure while dereferrencing vec->vector[ln]:

/* Free storage associated with linevector.  */
static void
linevector_free (vec)
    struct linevector *vec;
{
    unsigned int ln;

    if (vec->vector != NULL)
    {
        for (ln = 0; ln < vec->nlines; ++ln)
→           if (vec->vector[ln] && --vec->vector[ln]->refcount == 0)
                                     ^^^^^^^^^^^^^^^^^
                free (vec->vector[ln]);

        free (vec->vector);
    }
}


This bug has been reported to Fedora bug tracking system originally: https://bugzilla.redhat.com/show_bug.cgi?id=617037

Petr Pisar <petrp>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #21038:  backtrace added by petrp (10KiB - application/octet-stream - Back trace)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by scjones (Updated the item)
  • -email is unavailable- added by petrp (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-21 scjones StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 1.11.24
        Fixed Feature ReleaseNone 1.12.14
    2010-07-23 petrp Attached File- Added backtrace, #21038

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code