Skip to content
Snippets Groups Projects
Verified Commit a13b2b57 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

:bug: k-order MEX: mutex was not correctly locked in initialization

Since the lock was not assigned to a variable, it was a temporary value and
would thus be immediately released.

Problem detected through a warning produced by GCC 14.
parent e7506218
Branches
No related tags found
No related merge requests found
Pipeline #10798 passed
/* /*
* Copyright © 2004 Ondra Kamenik * Copyright © 2004 Ondra Kamenik
* Copyright © 2019-2022 Dynare Team * Copyright © 2019-2024 Dynare Team
* *
* This file is part of Dynare. * This file is part of Dynare.
* *
...@@ -55,7 +55,7 @@ init(int dim, int nvar) ...@@ -55,7 +55,7 @@ init(int dim, int nvar)
throw TLException(__FILE__, __LINE__, throw TLException(__FILE__, __LINE__,
"Problem too large, you should decrease the approximation order"); "Problem too large, you should decrease the approximation order");
std::lock_guard<std::mutex> {mut}; std::lock_guard<std::mutex> lk {mut};
ebundle.generateUpTo(dim); ebundle.generateUpTo(dim);
pbundle.generateUpTo(dim); pbundle.generateUpTo(dim);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment