File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -388,9 +388,22 @@ jobs:
388
388
- name : Valgrind checks for memory leaks
389
389
shell : bash
390
390
run : |
391
- valgrind --leak-check=full --show-leak-kinds=all \
392
- --track-origins=yes --track-fds=yes \
393
- --trace-children=yes \
391
+ # hack to close fd 155 and 158 as github leaves them open
392
+ # thread: https://github.com/actions/runner-images/issues/3729
393
+ # solution from: https://github.com/actions/runner-images/issues/3391#issuecomment-842139475
394
+ if [ -d /proc/$$/fd/ ]; then
395
+ for descriptor_path in /proc/$$/fd/*; do
396
+ descriptor="$(basename "$descriptor_path")"
397
+ # Don't close stdin/stderr/stdout (-gt 2)
398
+ if [ $descriptor -gt 2 ]; then
399
+ exec {descriptor}<&-
400
+ fi
401
+ done
402
+ fi
403
+ valgrind --leak-check=full \
404
+ --show-leak-kinds=all --show-reachable=yes \
405
+ --track-origins=yes --track-fds=yes --trace-children=yes \
394
406
--verbose -s \
407
+ --demangle=yes \
395
408
--error-exitcode=1 \
396
409
build/arkscript tests/unittests/resources/LangSuite/unittests.ark -L ./lib valgrind
You can’t perform that action at this time.
0 commit comments