summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-11-18 08:05:31 -0600
committerGitHub <noreply@github.com>2020-11-18 08:05:31 -0600
commit8cdef42785fd294d1727ce1df1b11d754c9bb3d1 (patch)
tree1489b9ddf416677020841d60ef9ba7d09ea5c49f
parent83a502c54b59e6d654ed2a068c5f29f5e22ff660 (diff)
Fix asan issues related to solver and symbol manager (#5457)
Should fix the nightlies.
-rw-r--r--src/main/command_executor.cpp6
-rw-r--r--src/main/command_executor.h4
-rw-r--r--test/unit/main/interactive_shell_black.h3
3 files changed, 10 insertions, 3 deletions
diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp
index be90be3f0..b1a7c70b5 100644
--- a/src/main/command_executor.cpp
+++ b/src/main/command_executor.cpp
@@ -57,6 +57,12 @@ CommandExecutor::CommandExecutor(Options& options)
d_result()
{
}
+CommandExecutor::~CommandExecutor()
+{
+ // ensure that symbol manager is destroyed before solver
+ d_symman.reset(nullptr);
+ d_solver.reset(nullptr);
+}
void CommandExecutor::flushStatistics(std::ostream& out) const
{
diff --git a/src/main/command_executor.h b/src/main/command_executor.h
index acf9e45bb..4023b86de 100644
--- a/src/main/command_executor.h
+++ b/src/main/command_executor.h
@@ -61,9 +61,7 @@ class CommandExecutor
public:
CommandExecutor(Options& options);
- virtual ~CommandExecutor()
- {
- }
+ virtual ~CommandExecutor();
/**
* Executes a command. Recursively handles if cmd is a command
diff --git a/test/unit/main/interactive_shell_black.h b/test/unit/main/interactive_shell_black.h
index 993f24690..df6a79bd8 100644
--- a/test/unit/main/interactive_shell_black.h
+++ b/test/unit/main/interactive_shell_black.h
@@ -52,6 +52,9 @@ class InteractiveShellBlack : public CxxTest::TestSuite
{
delete d_sin;
delete d_sout;
+ // ensure that symbol manager is destroyed before solver
+ d_symman.reset(nullptr);
+ d_solver.reset(nullptr);
}
void testAssertTrue() {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback