From e11c6961b26bdca94b141bf0e60014115d491474 Mon Sep 17 00:00:00 2001 From: Allison Vacanti Date: Wed, 13 Oct 2021 17:25:16 -0400 Subject: [PATCH] Revert .cu -> .cxx change for option_parser TU. This change introduced a strange bug on GCC where a stack object is changed seemingly randomly. In `option_parser::update_axis`, the `flag` variable's `data()` pointer is overwritten to point at garbage memory shortly after parsing. Nothing related to this object is being updated when the corruption occurs. This has been observed on gcc7+, but cannot be reproduced on MSVC. Reverting the `option_parser.cxx` TU to be a CUDA object works around this. Fixes issue #36. --- nvbench/CMakeLists.txt | 2 +- nvbench/{option_parser.cxx => option_parser.cu} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename nvbench/{option_parser.cxx => option_parser.cu} (100%) diff --git a/nvbench/CMakeLists.txt b/nvbench/CMakeLists.txt index a5e3cb2..af4ce5c 100644 --- a/nvbench/CMakeLists.txt +++ b/nvbench/CMakeLists.txt @@ -12,7 +12,7 @@ set(srcs int64_axis.cxx markdown_printer.cu named_values.cxx - option_parser.cxx + option_parser.cu printer_base.cxx printer_multiplex.cxx runner.cxx diff --git a/nvbench/option_parser.cxx b/nvbench/option_parser.cu similarity index 100% rename from nvbench/option_parser.cxx rename to nvbench/option_parser.cu