commit | 0211fdf8f27cd87c2245039a8c7eb3c1535d84b2 | [log] [tgz] |
---|---|---|
author | Ted Pudlik <tpudlik@google.com> | Fri Nov 05 17:14:49 2021 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Nov 05 19:26:19 2021 +0000 |
tree | be25d290798a4cb207dd5a47c422930f3e0ba7c7 | |
parent | dd25904f4e13949588d18241e5225fbb6a6964d3 [diff] |
pw_trace: Fix UB in fake_backend.h Using memcmp to compare nullptr's is undefined behavior, so special handling is required for the case when one of the pointers is null. Tested by running, ninja -C out host_clang_ubsan/obj/pw_trace/test/trace_facade_test out/host_clang_ubsan/obj/pw_trace/test/trace_facade_test Bug: 541 Change-Id: Id680516fe6066d827d64001bb772cb5ad4e73117 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/67343 Reviewed-by: Ewout van Bekkum <ewout@google.com> Commit-Queue: Ted Pudlik <tpudlik@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/