Skip to content

Commit cc3aa27

Browse files
authored
Disable coredumps for fuzzers (dotnet#67340)
1 parent 6ba20ab commit cc3aa27

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/coreclr/scripts/antigen_run.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,13 @@ def main(main_args):
202202
path_to_corerun += ".exe"
203203
path_to_tool += ".exe"
204204

205+
if not is_windows:
206+
# Disable core dumps. The fuzzers have their own graceful handling for
207+
# runtime crashes. Especially on macOS we can quickly fill up the drive
208+
# with dumps if we find lots of crashes since dumps there are very big.
209+
import resource
210+
resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
211+
205212
try:
206213
# Run tool such that issues are placed in a temp folder
207214
with TempDir() as temp_location:

src/coreclr/scripts/fuzzlyn_run.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ def main(main_args):
177177

178178
os.makedirs(output_directory, exist_ok=True)
179179

180+
if not is_windows:
181+
# Disable core dumps. The fuzzers have their own graceful handling for
182+
# runtime crashes. Especially on macOS we can quickly fill up the drive
183+
# with dumps if we find lots of crashes since dumps there are very big.
184+
import resource
185+
resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
186+
180187
with TempDir() as temp_location:
181188
summary_file_name = "issues-summary-{}.txt".format(tag_name)
182189
summary_file_path = path.join(temp_location, summary_file_name)

0 commit comments

Comments
 (0)