Azure / azure-storage-cpp

Microsoft Azure Storage Client Library for C++
http://azure.github.io/azure-storage-cpp
Apache License 2.0
132 stars 147 forks source link

Fix possible unobserved exception in istream_descriptor #314

Closed ShippyMSFT closed 4 years ago

ShippyMSFT commented 4 years ago

If buffer_task throws and provider.close() throws, it will lead to an unobserved exception error. Retrieve the buffer_task result first to avoid this.

Jinming-Hu commented 4 years ago

Hi @ShippyMSFT , thanks for pointing out the potential bug. It's very insightful. There have been unobserved exception errors for a long time in this sdk. I just wonder, when will provider.close() throw? Did you actually fix a crash issue with this change?

ShippyMSFT commented 4 years ago

Hello, @JinmingHu-MSFT . Yes, this change fixes a crashing issue we see due to an unobserved exception in low memory conditions.

ShippyMSFT commented 4 years ago

@JinmingHu-MSFT Thanks. I'm new to GitHub. How do I get these merged in and does Azure:dev make it into the main branch at some point?

Jinming-Hu commented 4 years ago

@ShippyMSFT You don't need to do anything. Before next release, we are going to do some tests and merge it. Thanks for your contribution.