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

 
 

bug #30528: Segfault in linevector_free()

Submitted by:  Petr Pisar <petrp>
Submitted on:  Fri 23 Jul 2010 11:55:48 AM UTC  
 
Category: Bug ReportSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedRelease: 
Fixed Release: 1.11.24Fixed Feature Release: 1.12.14

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 File(s):
   
   
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
  • -unavailable- added by scjones (Updated the item)
  • -unavailable- added by petrp (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 21 Oct 2010 04:05:31 PM UTCscjonesStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.11.24
      Fixed Feature ReleaseNone=>1.12.14
    Fri 23 Jul 2010 11:55:48 AM UTCpetrpAttached File-=>Added backtrace, #21038

    Back to the top


    Powered by Savane 3.1-cleanup1