aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/periph_manager/x4xx.py
diff options
context:
space:
mode:
authorAaron Rossetto <aaron.rossetto@ni.com>2021-08-30 12:12:30 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2021-08-31 07:32:41 -0500
commitf8d8c23e701b5e1bc2c18d1a0f28b7a2699afbac (patch)
treecbbb8cf82a0064a6d2ddfa349f3737e2453ba2ff /mpm/python/usrp_mpm/periph_manager/x4xx.py
parent919043f305efdd29fbdf586e9cde95d9507150e8 (diff)
downloaduhd-f8d8c23e701b5e1bc2c18d1a0f28b7a2699afbac.tar.gz
uhd-f8d8c23e701b5e1bc2c18d1a0f28b7a2699afbac.tar.bz2
uhd-f8d8c23e701b5e1bc2c18d1a0f28b7a2699afbac.zip
uhd: transport: Avoid exceptions in disconnect_receiver()
inline_io_service::disconnect_receiver() uses the recv_link_if parameter as a key into the _recv_tbl map. In some error cases, notably when an underlying link timeout occurs when setting up a transport, that key may not exist in the table. Attempting to index the table by that non-existent key causes an std::out_of_range exception to be thrown. However, in the aforementioned error case, disconnect_receiver() is called as part of a destructor of an object that is in one of the stack frames being unwound as the timeout exception is in flight. Throwing an exception while one is in flight ultimately causes the C++ runtime to terminate the process. (Generally, throwing an exception in a destructor, unless caught within the destructor, is considered a bad practice for this very reason.) This PR modifies disconnect_receiver() to check for the existence of the entry in the map and bypass the access if it is not present, thus preventing the exception from being thrown in this function which is invoked from another object's destructor.
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/x4xx.py')
0 files changed, 0 insertions, 0 deletions