diff --git a/src/clusterfuzz/_internal/cron/project_setup.py b/src/clusterfuzz/_internal/cron/project_setup.py index f60e9e47c98..24f416b8ddb 100644 --- a/src/clusterfuzz/_internal/cron/project_setup.py +++ b/src/clusterfuzz/_internal/cron/project_setup.py @@ -65,7 +65,7 @@ PUBSUB_PLATFORMS = ['linux'] -MEMORY_UNSAFE_LANGUAGES = {'c++', 'c'} +MEMORY_SAFE_LANGUAGES = {'go', 'java', 'python', 'rust'} OSS_FUZZ_DEFAULT_PROJECT_CPU_WEIGHT = 1.0 OSS_FUZZ_MEMORY_SAFE_LANGUAGE_PROJECT_WEIGHT = 0.2 @@ -562,10 +562,10 @@ def create_project_settings(project, info, service_account): oss_fuzz_project.base_os_version = base_os_version oss_fuzz_project.put() else: - if language in MEMORY_UNSAFE_LANGUAGES: - cpu_weight = OSS_FUZZ_DEFAULT_PROJECT_CPU_WEIGHT - else: + if language in MEMORY_SAFE_LANGUAGES: cpu_weight = OSS_FUZZ_MEMORY_SAFE_LANGUAGE_PROJECT_WEIGHT + else: + cpu_weight = OSS_FUZZ_DEFAULT_PROJECT_CPU_WEIGHT data_types.OssFuzzProject( id=project, diff --git a/src/clusterfuzz/_internal/tests/appengine/handlers/cron/project_setup_test.py b/src/clusterfuzz/_internal/tests/appengine/handlers/cron/project_setup_test.py index c6bfd348fdc..4d0378d145c 100644 --- a/src/clusterfuzz/_internal/tests/appengine/handlers/cron/project_setup_test.py +++ b/src/clusterfuzz/_internal/tests/appengine/handlers/cron/project_setup_test.py @@ -247,15 +247,12 @@ def test_execute(self): }), ('lib2', { 'homepage': 'http://example2.com', - 'language': 'c++', 'disabled': True, 'fuzzing_engines': ['libfuzzer',], }), ('lib3', { 'homepage': 'http://example3.com', - 'language': - 'c', 'sanitizers': [ 'address', { @@ -284,7 +281,6 @@ def test_execute(self): }), ('lib5', { 'homepage': 'http://example5.com', - 'language': 'python', 'sanitizers': ['address'], 'fuzzing_engines': ['libfuzzer',], 'experimental': True, @@ -293,7 +289,6 @@ def test_execute(self): }), ('lib6', { 'homepage': 'http://example6.com', - 'language': 'rust', 'sanitizers': ['address', 'memory', 'undefined'], 'fuzzing_engines': ['libfuzzer', 'afl'], 'auto_ccs': 'User@example.com', @@ -301,7 +296,6 @@ def test_execute(self): }), ('lib7', { 'homepage': 'http://example.com', - 'language': 'jvm', 'primary_contact': 'primary@example.com', 'auto_ccs': ['User@example.com',], 'fuzzing_engines': ['libfuzzer',],