Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1059)

Issue 2188053003: ClientConnection Unittest memory leak fixed (Closed)

Created:
4 years, 4 months ago by jingxuy
Modified:
4 years, 4 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Revert of Substituting legacy protocol with uWeave protocol (patchset #1 id:1 of https://codereview.chromium.org/2189913002/ ) Reason for revert: The memory leak that caused Substituting legacy protocol with uWeave protocol to be reverted is fixed. First build showing the error: n/a Error text: n/a Original issue's description: >Revert of Substituting legacy protocol with uWeave protocol (patchset #33 id:630001 of https://codereview.chromium.org/2075313002/ ) > >Reason for revert: >This CL has a memory problem in the unit tests, as reported by DrMemory. > >First build showing the error: >https://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Unit%20%28DrMemory%29/builds/5364 > >Note, that build doesn't include this change as there was a problem introduced earlier that caused the whole build to fail. > >Error text: >UNADDRESSABLE ACCESS of freed memory: reading 0x069fa848-0x069fa84c 4 byte(s) ># 0 >proximity_auth::weave::BluetoothLowEnergyWeavePacketGenerator::Factory::NewInstance [components\proximity_auth\ble\bluetooth_low_energy_weave_packet_generator.cc:33] ># 1 >proximity_auth::weave::ProximityAuthBluetoothLowEnergyWeavePacketGeneratorTest_CreateConnectionRequestTest_Test::TestBody [components\proximity_auth\ble\bluetooth_low_energy_weave_packet_generator_unittest.cc:54] ># 2 >testing::internal::HandleExceptionsInMethodIfSupported<> [testing\gtest\src\gtest.cc:2458] >Note: @0:05:46.506 in thread 13092 >Note: 0x069fa848-0x069fa84c overlaps memory 0x069fa5d8-0x069fa8c0 that was freed here: >Note: # 0 replace_operator_delete_nothrow [d:\drmemory_package\common\alloc_replace.c:2974] >Note: # 1 >proximity_auth::weave::ProximityAuthBluetoothLowEnergyWeaveClientConnectionTest_ConnectAfterADelayWhenThrottled_Test::`scalar deleting destructor' >Note: # 2 testing::Test::DeleteSelf_ [testing\gtest\include\gtest\gtest.h:453] >Note: # 3 testing::TestInfo::Run [testing\gtest\src\gtest.cc:2661] >Note: instruction: mov (%eax) -> %edx >Suppression (error hash=#E743E83C1B0FB1CF#): >For more info on using suppressions see >http://dev.chromium.org/developers/how-tos/using-drmemory#TOC-Suppressing-error-reports-from-the- >{ >UNADDRESSABLE ACCESS >name=<insert_a_suppression_name_here> >*!proximity_auth::weave::BluetoothLowEnergyWeavePacketGenerator::Factory::NewInstance >*!proximity_auth::weave::ProximityAuthBluetoothLowEnergyWeavePacketGeneratorTest_CreateConnectionRequestTest_Test::TestBody >*!testing::internal::HandleExceptionsInMethodIfSupported<> >} > >The problem is real, to fix this SetInstanceForTesting should keep the previous factory around somewhere, and there should be a method to clear the testing instance. Or something like that. BUG=617238 Committed: https://crrev.com/2af35dd45f0a075fa0ce835302aeab0af3a4a392 Cr-Commit-Position: refs/heads/master@{#409618}

Patch Set 1 : memory leak version of migration CL #

Patch Set 2 : memory leak fixed version #

Total comments: 4

Messages

Total messages: 23 (11 generated)
jingxuy
4 years, 4 months ago (2016-07-28 18:33:59 UTC) #3
Kyle Horimoto
Your CL description should use the "revert" format like the CL which reverted your change ...
4 years, 4 months ago (2016-07-28 18:37:45 UTC) #4
Kyle Horimoto
lgtm https://codereview.chromium.org/2188053003/diff/40001/components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc File components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc (right): https://codereview.chromium.org/2188053003/diff/40001/components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc#newcode30 components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc:30: if (!factory_instance_) { nit: Please keep the == ...
4 years, 4 months ago (2016-08-02 00:04:46 UTC) #9
sacomoto
lgtm
4 years, 4 months ago (2016-08-02 17:37:35 UTC) #10
jingxuy
https://codereview.chromium.org/2188053003/diff/40001/components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc File components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc (right): https://codereview.chromium.org/2188053003/diff/40001/components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc#newcode30 components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc:30: if (!factory_instance_) { On 2016/08/02 00:04:45, Kyle Horimoto wrote: ...
4 years, 4 months ago (2016-08-03 18:04:38 UTC) #11
Kyle Horimoto
https://codereview.chromium.org/2188053003/diff/40001/components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc File components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc (right): https://codereview.chromium.org/2188053003/diff/40001/components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc#newcode23 components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc:23: std::shared_ptr<BluetoothLowEnergyWeavePacketGenerator::Factory> Now that you're using a class instead of ...
4 years, 4 months ago (2016-08-03 18:24:06 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2188053003/40001
4 years, 4 months ago (2016-08-03 18:30:31 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/230404)
4 years, 4 months ago (2016-08-03 18:39:30 UTC) #16
Tim Song
lgtm
4 years, 4 months ago (2016-08-03 20:18:31 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2188053003/40001
4 years, 4 months ago (2016-08-03 20:21:30 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years, 4 months ago (2016-08-03 21:04:35 UTC) #21
commit-bot: I haz the power
4 years, 4 months ago (2016-08-03 21:06:45 UTC) #23
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/2af35dd45f0a075fa0ce835302aeab0af3a4a392
Cr-Commit-Position: refs/heads/master@{#409618}

Powered by Google App Engine
This is Rietveld 408576698