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

Issue 567003002: Revert of Convert device::UsbConfigDescriptor and friends to structs. (Closed)

Created:
6 years, 3 months ago by weitao
Modified:
6 years, 3 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Revert of Convert device::UsbConfigDescriptor and friends to structs. (patchset #2 id:60001 of https://codereview.chromium.org/562763002/) Reason for revert: This broken the Linux ASan LSan Tests: http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%283%29/builds/7506 http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%20LSan%20Tests%20%281%29/builds/5717 Sample callstacks: Direct leak of 400 byte(s) in 10 object(s) allocated from: #0 0x55c6eb in __interceptor_malloc (/b/build/slave/Linux_ASan_LSan_Tests__3_/build/src/out/Release/browser_tests+0x55c6eb) #1 0xab24bb8 in raw_desc_to_config third_party/libusb/src/libusb/descriptor.c:501:45 #2 0xab24ab9 in libusb_get_active_config_descriptor third_party/libusb/src/libusb/descriptor.c:601:7 #3 0xab14aae in device::UsbDeviceImpl::GetConfiguration() device/usb/usb_device_impl.cc:199:9 #4 0xb37d57b in EnumerateOnFileThread(crypto::RSAPrivateKey*, base::Callback\u003Cvoid (std::__1::vector\u003Cscoped_refptr\u003CAndroidUsbDevice>, std::__1::allocator\u003Cscoped_refptr\u003CAndroidUsbDevice> > > const&)> const&, scoped_refptr\u003Cbase::MessageLoopProxy>) chrome/browser/devtools/device/usb/android_usb_device.cc:262:42 #5 0xb38aebf in Run base/bind_internal.h:288:12 #6 0xb38aebf in base::internal::InvokeHelper\u003Cfalse, void, base::internal::RunnableAdapter\u003Cvoid (*)(crypto::RSAPrivateKey*, base::Callback\u003Cvoid (std::__1::vector\u003Cscoped_refptr\u003CAndroidUsbDevice>, std::__1::allocator\u003Cscoped_refptr\u003CAndroidUsbDevice> > > const&)> const&, scoped_refptr\u003Cbase::MessageLoopProxy>)>, void (crypto::RSAPrivateKey* const&, base::Callback\u003Cvoid (std::__1::vector\u003Cscoped_refptr\u003CAndroidUsbDevice>, std::__1::allocator\u003Cscoped_refptr\u003CAndroidUsbDevice> > > const&)> const&, base::MessageLoopProxy*)>::MakeItSo(base::internal::RunnableAdapter\u003Cvoid (*)(crypto::RSAPrivateKey*, base::Callback\u003Cvoid (std::__1::vector\u003Cscoped_refptr\u003CAndroidUsbDevice>, std::__1::allocator\u003Cscoped_refptr\u003CAndroidUsbDevice> > > const&)> const&, scoped_refptr\u003Cbase::MessageLoopProxy>)>, crypto::RSAPrivateKey* const&, base::Callback\u003Cvoid (std::__1::vector\u003Cscoped_refptr\u003CAndroidUsbDevice>, std::__1::allocator\u003Cscoped_refptr\u003CAndroidUsbDevice> > > const&)> const&, base::MessageLoopProxy*) base/bind_internal.h:927 #7 0x2d58bff in Run base/callback.h:401:12 #8 0x2d58bff in base::debug::TaskAnnotator::RunTask(char const*, char const*, base::PendingTask const&) base/debug/task_annotator.cc:62 #9 0x2ca519c in base::MessageLoop::RunTask(base::PendingTask const&) base/message_loop/message_loop.cc:446:3 #10 0x2ca629e in DeferOrRunPendingTask base/message_loop/message_loop.cc:456:5 #11 0x2ca629e in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:565 #12 0x2c23ddf in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:232:21 #13 0x2cd57b4 in base::RunLoop::Run() base/run_loop.cc:49:3 #14 0x2ca39c4 in base::MessageLoop::Run() base/message_loop/message_loop.cc:308:3 #15 0x50fd018 in content::BrowserThreadImpl::FileThreadRun(base::MessageLoop*) content/browser/browser_thread_impl.cc:190:3 #16 0x50fdca7 in content::BrowserThreadImpl::Run(base::MessageLoop*) content/browser/browser_thread_impl.cc:244:14 #17 0x2d1ebc8 in base::Thread::ThreadMain() base/threading/thread.cc:228:5 #18 0x2d12b20 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:80:3 #19 0x7f4d560a3e99 in start_thread /build/buildd/eglibc-2.15/nptl/pthread_create.c:308 Direct leak of 400 byte(s) in 10 object(s) allocated from: #0 0x55c6eb in __interceptor_malloc (/b/build/slave/Linux_ASan_LSan_Tests__1_/build/src/out/Release/browser_tests+0x55c6eb) #1 0xab24bb8 in raw_desc_to_config third_party/libusb/src/libusb/descriptor.c:501:45 #2 0xab24ab9 in libusb_get_active_config_descriptor third_party/libusb/src/libusb/descriptor.c:601:7 #3 0xab14aae in device::UsbDeviceImpl::GetConfiguration() device/usb/usb_device_impl.cc:199:9 #4 0xb37d57b in EnumerateOnFileThread(crypto::RSAPrivateKey*, base::Callback\u003Cvoid (std::__1::vector\u003Cscoped_refptr\u003CAndroidUsbDevice>, std::__1::allocator\u003Cscoped_refptr\u003CAndroidUsbDevice> > > const&)> const&, scoped_refptr\u003Cbase::MessageLoopProxy>) chrome/browser/devtools/device/usb/android_usb_device.cc:262:42 #5 0xb38aebf in Run base/bind_internal.h:288:12 #6 0xb38aebf in base::internal::InvokeHelper\u003Cfalse, void, base::internal::RunnableAdapter\u003Cvoid (*)(crypto::RSAPrivateKey*, base::Callback\u003Cvoid (std::__1::vector\u003Cscoped_refptr\u003CAndroidUsbDevice>, std::__1::allocator\u003Cscoped_refptr\u003CAndroidUsbDevice> > > const&)> const&, scoped_refptr\u003Cbase::MessageLoopProxy>)>, void (crypto::RSAPrivateKey* const&, base::Callback\u003Cvoid (std::__1::vector\u003Cscoped_refptr\u003CAndroidUsbDevice>, std::__1::allocator\u003Cscoped_refptr\u003CAndroidUsbDevice> > > const&)> const&, base::MessageLoopProxy*)>::MakeItSo(base::internal::RunnableAdapter\u003Cvoid (*)(crypto::RSAPrivateKey*, base::Callback\u003Cvoid (std::__1::vector\u003Cscoped_refptr\u003CAndroidUsbDevice>, std::__1::allocator\u003Cscoped_refptr\u003CAndroidUsbDevice> > > const&)> const&, scoped_refptr\u003Cbase::MessageLoopProxy>)>, crypto::RSAPrivateKey* const&, base::Callback\u003Cvoid (std::__1::vector\u003Cscoped_refptr\u003CAndroidUsbDevice>, std::__1::allocator\u003Cscoped_refptr\u003CAndroidUsbDevice> > > const&)> const&, base::MessageLoopProxy*) base/bind_internal.h:927 #7 0x2d58bff in Run base/callback.h:401:12 #8 0x2d58bff in base::debug::TaskAnnotator::RunTask(char const*, char const*, base::PendingTask const&) base/debug/task_annotator.cc:62 #9 0x2ca519c in base::MessageLoop::RunTask(base::PendingTask const&) base/message_loop/message_loop.cc:446:3 #10 0x2ca629e in DeferOrRunPendingTask base/message_loop/message_loop.cc:456:5 #11 0x2ca629e in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:565 #12 0x2c23ddf in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:232:21 #13 0x2cd57b4 in base::RunLoop::Run() base/run_loop.cc:49:3 #14 0x2ca39c4 in base::MessageLoop::Run() base/message_loop/message_loop.cc:308:3 #15 0x50fd018 in content::BrowserThreadImpl::FileThreadRun(base::MessageLoop*) content/browser/browser_thread_impl.cc:190:3 #16 0x50fdca7 in content::BrowserThreadImpl::Run(base::MessageLoop*) content/browser/browser_thread_impl.cc:244:14 #17 0x2d1ebc8 in base::Thread::ThreadMain() base/threading/thread.cc:228:5 #18 0x2d12b20 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:80:3 #19 0x7f4aef980e99 in start_thread /build/buildd/eglibc-2.15/nptl/pthread_create.c:308 Original issue's description: > Convert device::UsbConfigDescriptor and friends to structs. > > These classes do not need to be classes and expecially don't need to be > abstract classes as this leads to a complicated implementation and > complicated tests. All USB devices no matter the platform will have the > same descriptor data. > > This change follows the model of device::HidDeviceInfo. > > BUG= > > Committed: https://crrev.com/be9e363a3af57bd313fbb96ec3b5fa02cef769b5 > Cr-Commit-Position: refs/heads/master@{#294594} TBR=dgozman@chromium.org,rockot@chromium.org,rpaquay@chromium.org,pfeldman@chromium.org,reillyg@chromium.org NOTREECHECKS=true NOTRY=true BUG= Committed: https://crrev.com/f49954838f51461f18be37c68ff85ddbbd042a47 Cr-Commit-Position: refs/heads/master@{#294640}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+852 lines, -468 lines) Patch
M chrome/browser/devtools/device/usb/android_usb_browsertest.cc View 5 chunks +124 lines, -30 lines 0 comments Download
M chrome/browser/devtools/device/usb/android_usb_device.cc View 7 chunks +48 lines, -40 lines 0 comments Download
M device/usb/BUILD.gn View 2 chunks +3 lines, -2 lines 0 comments Download
M device/usb/usb.gyp View 2 chunks +3 lines, -2 lines 0 comments Download
D device/usb/usb_descriptors.h View 1 chunk +0 lines, -83 lines 0 comments Download
D device/usb/usb_descriptors.cc View 1 chunk +0 lines, -43 lines 0 comments Download
M device/usb/usb_device.h View 2 chunks +4 lines, -3 lines 0 comments Download
M device/usb/usb_device_filter.cc View 2 chunks +17 lines, -11 lines 0 comments Download
M device/usb/usb_device_filter_unittest.cc View 1 chunk +131 lines, -30 lines 0 comments Download
M device/usb/usb_device_handle.h View 1 chunk +1 line, -1 line 0 comments Download
M device/usb/usb_device_handle_impl.h View 4 chunks +4 lines, -3 lines 0 comments Download
M device/usb/usb_device_handle_impl.cc View 3 chunks +18 lines, -23 lines 0 comments Download
M device/usb/usb_device_impl.h View 3 chunks +1 line, -7 lines 0 comments Download
M device/usb/usb_device_impl.cc View 6 chunks +16 lines, -135 lines 0 comments Download
A device/usb/usb_interface.h View 1 chunk +112 lines, -0 lines 0 comments Download
A device/usb/usb_interface_impl.h View 1 chunk +117 lines, -0 lines 0 comments Download
A device/usb/usb_interface_impl.cc View 1 chunk +168 lines, -0 lines 0 comments Download
M extensions/browser/api/usb/usb_api.h View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/api/usb/usb_api.cc View 2 chunks +67 lines, -49 lines 0 comments Download
M extensions/browser/api/usb/usb_apitest.cc View 4 chunks +17 lines, -6 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
weitao
Created Revert of Convert device::UsbConfigDescriptor and friends to structs.
6 years, 3 months ago (2014-09-12 19:19:32 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/567003002/1
6 years, 3 months ago (2014-09-12 19:38:34 UTC) #2
commit-bot: I haz the power
Committed patchset #1 (id:1) as 18b54f741ca72324f8b56585650630bd09ea30b6
6 years, 3 months ago (2014-09-12 19:49:08 UTC) #3
commit-bot: I haz the power
6 years, 3 months ago (2014-09-12 19:53:12 UTC) #4
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/f49954838f51461f18be37c68ff85ddbbd042a47
Cr-Commit-Position: refs/heads/master@{#294640}

Powered by Google App Engine
This is Rietveld 408576698