LGTM On 6/6/25 18:14, Sergey Kaplun wrote: > Hi, Sergey! > Thanks for the review! > > On 06.06.25, Sergey Bronnikov wrote: >> Hello, Sergey, >> >> the test is passed when CMake option -DLUAJIT_USE_VALGRIND=ON is used and >> >> patch with fix is reverted. > You should run it with the corresponding env variable (like it is done > in the CI), see the comment in the test header: > > | VALGRIND_OPTS="--track-fds=yes" ctest -V -R lj-1249 It works, thanks, but the test is still passed. In  private conversation, we have found a reason - I have a version of Valgrind, that doesn't fail on detected fd leak: Release 3.24.0 (31 Oct 2024) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... * ==================== CORE CHANGES =================== * Bad file descriptor usage now generates a real error with   --track-fds=yes that is suppressible and shows up in the xml output   with full execution backtrace. The warnings shown without using the   option are deprecated and will be removed in a future valgrind   version. The same behavior is in our CI, because Valgrind 3.24.0 is in 25.04+, but in GHA the latest version is 24.04. 1. https://repology.org/project/valgrind/versions 2. https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners >> Sergey