Skip to content

Commit a121102

Browse files
authored
Merge pull request #4733 from michaliskok/genmc-bug-fixes
genmc: Bug fixes
2 parents b9bad1e + 68a81c4 commit a121102

File tree

13 files changed

+530
-509
lines changed

13 files changed

+530
-509
lines changed

src/tools/miri/genmc-sys/build.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mod downloading {
2828
/// The GenMC repository the we get our commit from.
2929
pub(crate) const GENMC_GITHUB_URL: &str = "https://github.com/MPI-SWS/genmc.git";
3030
/// The GenMC commit we depend on. It must be available on the specified GenMC repository.
31-
pub(crate) const GENMC_COMMIT: &str = "aa10ed65117c3291524efc19253b5d443a4602ac";
31+
pub(crate) const GENMC_COMMIT: &str = "22d3d0b44dedb4e8e1aae3330e546465e4664529";
3232

3333
/// Ensure that a local GenMC repo is present and set to the correct commit.
3434
/// Return the path of the GenMC repo and whether the checked out commit was changed.
@@ -178,14 +178,8 @@ fn compile_cpp_dependencies(genmc_path: &Path, always_configure: bool) {
178178
// These are all the C++ files we need to compile, which needs to be updated if more C++ files are added to Miri.
179179
// We use absolute paths since relative paths can confuse IDEs when attempting to go-to-source on a path in a compiler error.
180180
let cpp_files_base_path = Path::new("cpp/src/");
181-
let cpp_files = [
182-
"MiriInterface/EventHandling.cpp",
183-
"MiriInterface/Exploration.cpp",
184-
"MiriInterface/Mutex.cpp",
185-
"MiriInterface/Setup.cpp",
186-
"MiriInterface/ThreadManagement.cpp",
187-
]
188-
.map(|file| std::path::absolute(cpp_files_base_path.join(file)).unwrap());
181+
let cpp_files = ["MiriInterface/Exploration.cpp", "MiriInterface/Setup.cpp"]
182+
.map(|file| std::path::absolute(cpp_files_base_path.join(file)).unwrap());
189183

190184
let mut bridge = cxx_build::bridge("src/lib.rs");
191185
// FIXME(genmc,cmake): Remove once the GenMC debug setting is available in the config.h file.

src/tools/miri/genmc-sys/cpp/include/MiriInterface.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,11 @@ struct MiriGenmcShim : private GenMCDriver {
125125
void handle_fence(ThreadId thread_id, MemOrdering ord);
126126

127127
/**** Memory (de)allocation ****/
128+
128129
auto handle_malloc(ThreadId thread_id, uint64_t size, uint64_t alignment) -> uint64_t;
129-
auto handle_free(ThreadId thread_id, uint64_t address) -> bool;
130+
131+
/** Returns null on success, or an error string if an error occurs. */
132+
auto handle_free(ThreadId thread_id, uint64_t address) -> std::unique_ptr<std::string>;
130133

131134
/**** Thread management ****/
132135
void handle_thread_create(ThreadId thread_id, ThreadId parent_id);

src/tools/miri/genmc-sys/cpp/src/MiriInterface/EventHandling.cpp

Lines changed: 0 additions & 265 deletions
This file was deleted.

0 commit comments

Comments
 (0)