@@ -83,6 +83,7 @@ def _create_tasks(
8383 analyzer_env : Optional [Dict [str , str ]] = None ,
8484 tools : Optional [Container ] = None ,
8585 task_env : Optional [Dict [str , str ]] = None ,
86+ min_available_memory_mb : Optional [int ] = None ,
8687 ) -> None :
8788 target_options = target_options or []
8889 regression_containers : List [Tuple [ContainerType , Container ]] = [
@@ -127,6 +128,7 @@ def _create_tasks(
127128 colocate = colocate_all_tasks or colocate_secondary_tasks ,
128129 minimized_stack_depth = minimized_stack_depth ,
129130 task_env = task_env ,
131+ min_available_memory_mb = min_available_memory_mb ,
130132 )
131133
132134 fuzzer_containers : List [Tuple [ContainerType , Container ]] = [
@@ -180,6 +182,7 @@ def _create_tasks(
180182 check_fuzzer_help = check_fuzzer_help ,
181183 expect_crash_on_failure = expect_crash_on_failure ,
182184 task_env = task_env ,
185+ min_available_memory_mb = min_available_memory_mb ,
183186 )
184187
185188 prereq_tasks = [fuzzer_task .task_id , regression_task .task_id ]
@@ -243,6 +246,7 @@ def _create_tasks(
243246 module_allowlist = module_allowlist ,
244247 source_allowlist = source_allowlist ,
245248 task_env = task_env ,
249+ min_available_memory_mb = min_available_memory_mb ,
246250 )
247251
248252 report_containers : List [Tuple [ContainerType , Container ]] = [
@@ -280,6 +284,7 @@ def _create_tasks(
280284 colocate = colocate_all_tasks or colocate_secondary_tasks ,
281285 minimized_stack_depth = minimized_stack_depth ,
282286 task_env = task_env ,
287+ min_available_memory_mb = min_available_memory_mb ,
283288 )
284289
285290 if analyzer_exe is not None :
@@ -320,6 +325,7 @@ def _create_tasks(
320325 debug = debug ,
321326 target_timeout = target_timeout ,
322327 task_env = task_env ,
328+ min_available_memory_mb = min_available_memory_mb ,
323329 )
324330
325331 def basic (
@@ -369,6 +375,7 @@ def basic(
369375 extra_output_container : Optional [Container ] = None ,
370376 crashes : Optional [Container ] = None ,
371377 task_env : Optional [Dict [str , str ]] = None ,
378+ min_available_memory_mb : Optional [int ] = None ,
372379 ) -> Optional [Job ]:
373380 """
374381 Basic libfuzzer job
@@ -507,6 +514,7 @@ def basic(
507514 tools = tools ,
508515 task_env = task_env ,
509516 target_timeout = target_timeout ,
517+ min_available_memory_mb = min_available_memory_mb ,
510518 )
511519
512520 self .logger .info ("done creating tasks" )
@@ -543,6 +551,7 @@ def merge(
543551 no_check_fuzzer_help : bool = False ,
544552 extra_setup_container : Optional [Container ] = None ,
545553 task_env : Optional [Dict [str , str ]] = None ,
554+ min_available_memory_mb : Optional [int ] = None ,
546555 ) -> Optional [Job ]:
547556 """
548557 libfuzzer merge task
@@ -657,6 +666,7 @@ def merge(
657666 preserve_existing_outputs = preserve_existing_outputs ,
658667 check_fuzzer_help = check_fuzzer_help ,
659668 task_env = task_env ,
669+ min_available_memory_mb = min_available_memory_mb ,
660670 )
661671
662672 self .logger .info ("done creating tasks" )
@@ -698,6 +708,7 @@ def dotnet(
698708 extra_setup_container : Optional [Container ] = None ,
699709 crashes : Optional [Container ] = None ,
700710 task_env : Optional [Dict [str , str ]] = None ,
711+ min_available_memory_mb : Optional [int ] = None ,
701712 ) -> Optional [Job ]:
702713 pool = self .onefuzz .pools .get (pool_name )
703714
@@ -820,6 +831,7 @@ def dotnet(
820831 expect_crash_on_failure = expect_crash_on_failure ,
821832 check_fuzzer_help = False ,
822833 task_env = task_env ,
834+ min_available_memory_mb = min_available_memory_mb ,
823835 )
824836
825837 # Ensure the fuzzing task starts before we schedule the coverage and
@@ -874,6 +886,7 @@ def dotnet(
874886 debug = debug ,
875887 colocate = colocate_all_tasks or colocate_secondary_tasks ,
876888 task_env = task_env ,
889+ min_available_memory_mb = min_available_memory_mb ,
877890 )
878891
879892 report_containers = [
@@ -915,6 +928,7 @@ def dotnet(
915928 debug = debug ,
916929 colocate = colocate_all_tasks or colocate_secondary_tasks ,
917930 task_env = task_env ,
931+ min_available_memory_mb = min_available_memory_mb ,
918932 )
919933
920934 self .logger .info ("done creating tasks" )
@@ -956,6 +970,7 @@ def qemu_user(
956970 crashes : Optional [Container ] = None ,
957971 readonly_inputs : Optional [Container ] = None ,
958972 task_env : Optional [Dict [str , str ]] = None ,
973+ min_available_memory_mb : Optional [int ] = None ,
959974 ) -> Optional [Job ]:
960975 """
961976 libfuzzer tasks, wrapped via qemu-user (PREVIEW FEATURE)
@@ -1125,6 +1140,7 @@ def qemu_user(
11251140 expect_crash_on_failure = False ,
11261141 check_fuzzer_help = check_fuzzer_help ,
11271142 task_env = task_env ,
1143+ min_available_memory_mb = min_available_memory_mb ,
11281144 )
11291145
11301146 report_containers = [
@@ -1167,6 +1183,7 @@ def qemu_user(
11671183 expect_crash_on_failure = False ,
11681184 check_fuzzer_help = check_fuzzer_help ,
11691185 task_env = task_env ,
1186+ min_available_memory_mb = min_available_memory_mb ,
11701187 )
11711188
11721189 self .logger .info ("done creating tasks" )
0 commit comments