Repository: godot
Issue: Scons command line option use_coverage=yes causes crashes on Linux when used with `use_llvm=yes`
Labels: bug,topic:buildsystem

### Godot version

v4.0.beta.custom_build [394bb0ee2]

### System information

Debian Linux 11

### Issue description

As a prerequisite build godot with 
`scons target=editor dev_build=yes dev_mode=yes use_llvm=yes use_lld=yes optimize=debug tests=yes use_coverage=yes '-j X'`

Running `./bin/godot.linuxbsd.editor.dev.x86_64.llvm --test` causes crashes

```
===============================================================================
./tests/core/os/test_os.h:128:
TEST CASE:  [OS] Execute

./tests/core/os/test_os.h:128: FATAL ERROR: test case CRASHED: SIGSEGV - Segmentation violation signal

===============================================================================
[doctest] test cases:     389 |     388 passed | 1 failed | 364 skipped
[doctest] assertions: 2259917 | 2259917 passed | 0 failed |
[doctest] Status: FAILURE!

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.0.beta.custom_build (f7397a5ac6bffc0df24cae61b8aabfa4a3b65347)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libpthread.so.0(+0x13140) [0x7f6b05c07140] (??:0)
[2] ./bin/godot.linuxbsd.editor.dev.x86_64.llvm() [0x8c69541] (:?)
[3] ./bin/godot.linuxbsd.editor.dev.x86_64.llvm() [0x460c41d] (particles_storage.cpp:?)
[4] ./bin/godot.linuxbsd.editor.dev.x86_64.llvm() [0x8c6a2f3] (:?)
[5] OS_Unix::execute(String const&, List<String, DefaultAllocator> const&, String*, int*, bool, MutexImpl<std::recursive_mutex>*, bool) (/srv/docker/data/godot-compile/godot/drivers/unix/os_unix.cpp:336)
[6] ./bin/godot.linuxbsd.editor.dev.x86_64.llvm() [0x279f928] (test_main.cpp:?)
[7] doctest::Context::run() (/srv/docker/data/godot-compile/godot/./thirdparty/doctest/doctest.h:6931)
[8] test_main(int, char**) (??:?)
[9] Main::test_entrypoint(int, char**, bool&) (/srv/docker/data/godot-compile/godot/main/main.cpp:619)
[10] ./bin/godot.linuxbsd.editor.dev.x86_64.llvm(main+0x46) [0x2558716] (/srv/docker/data/godot-compile/godot/platform/linuxbsd/godot_linuxbsd.cpp:?)
[11] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f6b058f8d0a] (??:0)
[12] ./bin/godot.linuxbsd.editor.dev.x86_64.llvm(_start+0x2a) [0x255860a] (??:?)
-- END OF BACKTRACE --
================================================================
===============================================================================
./tests/core/os/test_os.h:128:
TEST CASE:  [OS] Execute

./tests/core/os/test_os.h:152: ERROR: CHECK( exit_code == 0 ) is NOT correct!
  values: CHECK( 6 == 0 )
  logged: Running the command `sh -c "ls > /dev/null"` returns a zero (successful) exit code.

```


Also the following messages get spamed (copied a few of them):
```
profiling: /srv/docker/data/godot-compile/godot/platform/linuxbsd/godot_linuxbsd.linuxbsd.editor.dev.x86_64.llvm.gcda: cannot merge previous run count: corrupt object tag (0x01000000)
profiling: /srv/docker/data/godot-compile/godot/platform/linuxbsd/crash_handler_linuxbsd.linuxbsd.editor.dev.x86_64.llvm.gcda: cannot merge previous GCDA file: mismatched number of counters (400)
profiling: /srv/docker/data/godot-compile/godot/main/main.linuxbsd.editor.dev.x86_64.llvm.gcda: cannot merge previous GCDA file: corrupt arc tag (0x00000000)
profiling: /srv/docker/data/godot-compile/godot/tests/test_main.linuxbsd.editor.dev.x86_64.llvm.gcda: cannot merge previous GCDA file: corrupt arc tag (0x00000000)
```

I would expect that using `use_coverage=yes` as scons parameter doesn't cause crashes.

### Steps to reproduce

1. Compile Godot with `scons target=editor dev_build=yes dev_mode=yes use_llvm=yes use_lld=yes optimize=debug tests=yes use_coverage=yes`
2. Run tests with `./bin/godot.linuxbsd.editor.dev.x86_64.llvm --test`

### Minimal reproduction project

N/A
Problem with compiling & tests