Leak TechAndDesign in Main.cc using absl::NoDestructor#10297
Conversation
Signed-off-by: Drew Lewis <cannada@google.com>
There was a problem hiding this comment.
Code Review
This pull request introduces absl::NoDestructor for the static TechAndDesign object in src/Main.cc to prevent static destruction order issues. The changes include adding the Abseil dependency to the build configuration and updating the object's usage throughout the file to use pointer-like access. A review comment correctly points out that existing documentation in the file regarding destruction order is now misleading and should be updated to reflect that the object is now intentionally leaked.
Signed-off-by: Drew Lewis <cannada@google.com>
Signed-off-by: Drew Lewis <cannada@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
The tests failing here are passing in master. |
Signed-off-by: Drew Lewis <cannada@google.com>
|
@maliberty the failures seem pretty unrelated to any changes in this PR. Any insight? Okay they indeed don't fail on master, I'm investigating. |
When Tech and Design were leaked to avoid static destruction order issues, the Logger destructor was no longer called, preventing metrics files from being written. This commit registers a Tcl exit handler to finalize metrics and switches from exit() to Tcl_Exit() to ensure handlers are called. Signed-off-by: Drew Lewis <cannada@google.com>
|
It isn't obvious how your change affects this result but it does seem to be consistent and not a random failure. |
Added tclDecls.h to provide Tcl_CreateExitHandler. TAG=agy CONV=79f113c7-30ba-4c57-9f8d-63ed49e63636 Signed-off-by: Drew Lewis <cannada@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Running into static destruction order fiasco issues with the destructor of TechAndDesign in Main.cc. Just leak it to avoid this issue.