mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
During tests with the reinitialization of the MPM, we discovered that the USRP session sometimes ended with an access violation. The root cause was a call to reset_timer_and_mgr, which was sent using notify_with_token from the rpclib. This function internally performs a notify, which itself makes a call. The call invokes the function as an async_call and subsequently attempts to retrieve the result of the future from the async_call, provided no timeout occurs. The issue arose because the call did not use rvalue references for the variadic array. As a result, the variadic array values were copied during the call and then deallocated afterward. However, the rpclib also retained a pointer to the variadic array, which led to a double free after the async_call completed. The problem became evident when the memory management code enabled heap protection (e.g., the ucrtd.dll on Windows, which writes hex-D into unallocated memory). In most other cases, these regions are initialized to 0, and freeing a 0 pointer is effectively a no-op. The fix introduces lvalue passing of the variadic array in the call function, which prevents double free errors. This change ensures that the callee no longer frees the array. The fix has also been applied to async_call and send. |
||
|---|---|---|
| .. | ||
| flatbuffers | ||
| pybind11 | ||
| rpclib | ||
| 0001-rpclib-replace-fmt-with-boost-format-but-leave-it-in.patch | ||
| 0002-rpclib-use-the-real-boost-asio-namespace.patch | ||
| 0003-rpclib-add-boost-system-error_code-and-include-rpc-c.patch | ||
| 0004-rpclib-fix-hang-on-connection-error-during-construct.patch | ||
| CMakeLists.txt | ||
| import_rpclib.py | ||
| rpc_CMakeLists.txt | ||