Modify

Ticket #7164 (closed Bugs: fixed)

Opened 21 months ago

Last modified 11 months ago

[interprocess] Two potential bugs with b::int::vector of b::i::weak_ptr

Reported by: Gaëtan Gaumer <gaetan.gaumer@…> Owned by: igaztanaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.47.0 Severity: Problem
Keywords: interprocess vector weak_ptr Cc: igaztanaga@…

Description

Here are two potential bugs discussed on boost-users mailing list when using b::int::vector of b::i::weak_ptr

  • 1 - Erase of an element delete the wrong post

The original post :  http://lists.boost.org/boost-users/2010/11/64591.php

This bug is reproduced by the sample programm pasted here :  http://pastebin.com/yDCngGw4

It's still present in v1.50

  • 2 - After a pushback sometimes the last element is not the one push_backed.

The original post :  http://lists.boost.org/boost-users/2012/07/75311.php

The sample program trying to reproduce the bug :  http://pastebin.com/rdpZA7CU

Note that this program does not reproduce the problem, as when it runs, only the priv_range_insert_new_allocation method is called. I don't know how to force the program to use priv_range_insert_expand_backwards to reproduce the problem.

A sample of a trace when the bug occurs :

In priv_range_insert_expand_backwards possibility 4/8  and  NOT do_after
After pushback in cableToUpdate vector last elem Id=50332165 added cable Id =134218245
!--> sizeBefore=8, capacityBefore=8, sizeAfter=9, capacityAfter=13
CableToUpdate[16777216260, 16777216260, 16777216260, 50332165, 67109381, 16777216260, 16777216260, 16777216260, 50332165, ]

The 4 firsts elements are wrongly duplicated at index 5-8. This vector corruption is perhaps done when the vector is resized from 5 to 8.

Attachments

Change History

comment:1 Changed 14 months ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

(In [82810]) Fixes #7164 (first bug only)

comment:2 Changed 14 months ago by igaztanaga

  • Status changed from closed to reopened
  • Resolution fixed deleted

Thanks for the report. The first bug it's caused by a missing assignment in weak_count. I'll reopen the bug until you can confirm current trunk code does not suffer from bug #2

comment:3 Changed 11 months ago by igaztanaga

  • Status changed from reopened to closed
  • Resolution set to fixed

No bug report received so closing the bug as fixed.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.