Opened 10 years ago

Closed 10 years ago

#7349 closed Bugs (fixed)

packaged_task holds refence to temporary

Reported by: olli Owned by: viboes
Milestone: Boost 1.52.0 Component: thread
Version: Boost 1.51.0 Severity: Problem
Keywords: allocator_destructor packaged_task temporary reference Cc:

Description

The ctor of packaged_task creates a rebound allocator on the stack (stack frame of ctor). the allocator instance is passed to allocator_destructor which hold a reference to the allocator. Unfortunately the allocator instance will be destroyed/invalid after return from ctor.

Suggestion, because of the allocators a required to by copyable allocator_destructor should store the value of the allocator instance (using allocators copy-ctor).

Attachments (1)

7349_7250.pacth (1.9 KB ) - added by viboes 10 years ago.
Fix for this ticket and #7350

Download all attachments as: .zip

Change History (4)

comment:1 by viboes, 10 years ago

Milestone: To Be DeterminedBoost 1.52.0
Status: newassigned
Version: Boost 1.52.0Boost 1.51.0

by viboes, 10 years ago

Attachment: 7349_7250.pacth added

Fix for this ticket and #7350

comment:2 by viboes, 10 years ago

Committed in trunk revision [80460].

comment:3 by viboes, 10 years ago

Resolution: fixed
Status: assignedclosed

Committed revision 80516.

Note: See TracTickets for help on using tickets.