From 1ff3d1bfb5600c591e52e99fac4bb2888787d52d Mon Sep 17 00:00:00 2001 From: Barb Cutler Date: Thu, 21 Sep 2023 22:30:25 -0400 Subject: [PATCH] [Bugfix:Autograding] add dwarf 4 option to drmemory (#39) with g++11 it is necessary to compile with dwarf4 to get line numbers from DrMemory "command" : "clang++ -g -gdwarf-4 -Wall -o a.out *.cpp", // NOTE: Compiling with the -gdwarf-4 option is required with g++ 11+ // so that DrMemory can print source code line numbers with. // See also: // https://github.com/DynamoRIO/drmemory/issues/2485 Also, in PR https://github.com/Submitty/Submitty/pull/9793 the category for a system call previously in the unknown category is updated so that the configuration runs without the system call failure. --------- Co-authored-by: Barb Cutler --- examples/08_memory_debugging/config/config.json | 12 +++++++++++- examples/18_postgres_database/config/config.json | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/examples/08_memory_debugging/config/config.json b/examples/08_memory_debugging/config/config.json index 159a361..3e5458a 100644 --- a/examples/08_memory_debugging/config/config.json +++ b/examples/08_memory_debugging/config/config.json @@ -11,7 +11,17 @@ { "type" : "Compilation", "title" : "C++ - Compilation (for Dr Memory)", - "command" : "clang++ -g -Wall -o a.out *.cpp", + + // ORIGINAL + //"command" : "clang++ -g -Wall -o a.out *.cpp", + + // TEMPORARY WORKAROUND + "command" : "clang++ -g -gdwarf-4 -Wall -o a.out *.cpp", + // NOTE: Compiling with the -gdwarf-4 option is required with g++ 11+ + // so that DrMemory can print source code line numbers with. + // See also: + // https://github.com/DynamoRIO/drmemory/issues/2485 + "executable_name" : "a.out", "points" : 2 }, diff --git a/examples/18_postgres_database/config/config.json b/examples/18_postgres_database/config/config.json index 71fba2d..a821949 100644 --- a/examples/18_postgres_database/config/config.json +++ b/examples/18_postgres_database/config/config.json @@ -50,4 +50,4 @@ ] } ] -} \ No newline at end of file +}