Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize floss:BluetoothLocalGattDescriptorFloss::cccd_type_
BluetoothLowEnergyApiTestChromeOs.NotifyCharacteristicValueChanged fails when run in MSan mode with eager checks, which validates that uninit values are not passed as params or return values: ==1002568==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x561d07debefa in floss::BluetoothLocalGattCharacteristicFloss::CccdNotificationType() ./../../device/bluetooth/floss/bluetooth_local_gatt_characteristic_floss.cc:398:1 #1 0x561d07daf88b in floss::BluetoothAdapterFloss::SendValueChanged(floss::BluetoothLocalGattCharacteristicFloss*, std::__Cr::vector<unsigned char, std::__Cr::allocator<unsigned char>> const&) ./../../device/bluetooth/floss/bluetooth_adapter_floss.cc:1468:23 #2 0x561d07de5eb7 in floss::BluetoothLocalGattCharacteristicFloss::NotifyValueChanged(device::BluetoothDevice const*, std::__Cr::vector<unsigned char, std::__Cr::allocator<unsigned char>> const&, bool) ./../../device/bluetooth/floss/bluetooth_local_gatt_characteristic_floss.cc:104:34 #3 0x561cf920f095 in extensions::api::BluetoothLowEnergyNotifyCharacteristicValueChangedFunction::DoWork() ./../../extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc:1427:23 <...> Uninitialized value was created by a heap allocation #0 0x561cdea7d49c in operator new(unsigned long) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/msan/msan_new_delete.cpp:51:35 #1 0x561d07dede02 in floss::BluetoothLocalGattDescriptorFloss::Create(device::BluetoothUUID const&, unsigned int, floss::BluetoothLocalGattCharacteristicFloss*) ./../../device/bluetooth/floss/bluetooth_local_gatt_descriptor_floss.cc:26:22 #2 0x561d07de4ce6 in floss::BluetoothLocalGattCharacteristicFloss::Create(device::BluetoothUUID const&, unsigned int, unsigned int, floss::BluetoothLocalGattServiceFloss*) ./../../device/bluetooth/floss/bluetooth_local_gatt_characteristic_floss.cc:35:5 #3 0x561d07df5fec in floss::BluetoothLocalGattServiceFloss::CreateCharacteristic(device::BluetoothUUID const&, unsigned int, unsigned int) ./../../device/bluetooth/floss/bluetooth_local_gatt_service_floss.cc:142:10 #4 0x561cf920c91f in extensions::api::BluetoothLowEnergyCreateCharacteristicFunction::DoWork() ./../../extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.cc:1310:16 Bug: 40240570 Change-Id: I3dd8d46b5750bc881ada08560943151dac294c08 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5553870 Reviewed-by: Katherine Lai <[email protected]> Commit-Queue: Daniel Cheng <[email protected]> Cr-Commit-Position: refs/heads/main@{#1303901}
- Loading branch information