New issue
Advanced search Search tips

Issue 731994 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Issue in ModelImpl::Update for download service.

Project Member Reported by xingliu@chromium.org, Jun 10 2017

Issue description

Currently ModelImpl::Update will create a new unique ptr to replace the existing one, so it will invalidate the previous pointer by destroying the previous object, which cause the later Store::Update call when try to access the invalidated memory.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/116dc3688df95f622c9d10feb566540b9e299d9f

commit 116dc3688df95f622c9d10feb566540b9e299d9f
Author: Xing Liu <xingliu@chromium.org>
Date: Mon Jun 12 19:16:10 2017

Fixed an issue in ModelImpl::Update for download service.

Currently Update call will create a new unique pointer and destroy the
existing one. This will cause crash if we get the same object, change
the states and call Update again.

This CL also removes the cache in model, since we should support pass
the same object into Model::Update call.

Bug:  731994 
Change-Id: I35ea73bf8b32f7f2a08d2e212dc738cfc4d155d9
Reviewed-on: https://chromium-review.googlesource.com/530484
Commit-Queue: Xing Liu <xingliu@chromium.org>
Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478712}
[modify] https://crrev.com/116dc3688df95f622c9d10feb566540b9e299d9f/components/download/internal/model.h
[modify] https://crrev.com/116dc3688df95f622c9d10feb566540b9e299d9f/components/download/internal/model_impl.cc
[modify] https://crrev.com/116dc3688df95f622c9d10feb566540b9e299d9f/components/download/internal/model_impl.h
[modify] https://crrev.com/116dc3688df95f622c9d10feb566540b9e299d9f/components/download/internal/model_impl_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment