# ctest 3.29.2 crash on Windows with oversubscription

**URL:** https://discourse.cmake.org/t/ctest-3-29-2-crash-on-windows-with-oversubscription/10763
**Category:** Usage
**Tags:** tool:ctest
**Created:** [April 30, 2024, 9:13am UTC](https://discourse.cmake.org/t/ctest-3-29-2-crash-on-windows-with-oversubscription/10763 "2024-04-30T09:13:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![FROMAGMA](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/f/bbce88/32.png) [@FROMAGMA](https://discourse.cmake.org/u/FROMAGMA)
#### Post date: [April 30, 2024, 9:13am UTC](https://discourse.cmake.org/t/ctest-3-29-2-crash-on-windows-with-oversubscription/10763/1 "2024-04-30T09:13:32Z")

</div>

Hi,

Maybe this is the wrong place to report the following issue:

We found a heap corruption in ctest 3.29.2 while executing:  
ctest --preset windows-debug --parallel 50  
on a 2x18core Intel Windows 10 Enterprise machine  
With ctest 3.27.1 it works!

Best regards  
Frank

---

<div class="post-metadata">

### Author: ![scivision](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@scivision](https://discourse.cmake.org/u/scivision)
#### Post date: [May 1, 2024, 6:50pm UTC](https://discourse.cmake.org/t/ctest-3-29-2-crash-on-windows-with-oversubscription/10763/2 "2024-05-01T18:50:15Z")

</div>

Does this heap corrupt? It worked on a 4-core WIndows laptop with CMake 3.29.2.

```cmake
cmake_minimum_required(VERSION 3.20)

project(sleepy LANGUAGES NONE)

enable_testing()

foreach(i RANGE 500)
  add_test(NAME test${i} COMMAND ${CMAKE_COMMAND} -E sleep 2.0)
endforeach()

```

```sh
cmake -Bbuild
ctest --test-dir build --parallel 500

```

---

<div class="post-metadata">

### Author: ![bill.hoffman](https://discourse.cmake.org/user_avatar/discourse.cmake.org/bill.hoffman/32/13_2.png) [@bill.hoffman](https://discourse.cmake.org/u/bill.hoffman)
#### Post date: [May 1, 2024, 9:33pm UTC](https://discourse.cmake.org/t/ctest-3-29-2-crash-on-windows-with-oversubscription/10763/3 "2024-05-01T21:33:49Z")

</div>

Please create an issue here: [https://gitlab.kitware.com/cmake/cmake/-/issues](https://gitlab.kitware.com/cmake/cmake/-/issues) If you could provide a sample that reproduces the crash that would be great as well. A stack trace would be nice if you could get one. Thanks.

---

<div class="post-metadata">

### Author: ![FROMAGMA](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/f/bbce88/32.png) [@FROMAGMA](https://discourse.cmake.org/u/FROMAGMA)
#### Post date: [May 7, 2024, 1:57pm UTC](https://discourse.cmake.org/t/ctest-3-29-2-crash-on-windows-with-oversubscription/10763/4 "2024-05-07T13:57:24Z")

</div>

Hi,

I ran the above example over and over again with high oversubscription, but I can’t get a crash in ctest.  
When we ran our test-suite with 750 tests and 50 in parallel I sometimes get a heap corruption but not always! (I attach developer studio 2019 to it)  
Also I do not get a readable call-stack due to no debug information.  
With a linker map file it would be possible to calculate back to the faulting code. But pointer checker or address sanitizer builds would be much better.

Best regards  
Frank
