From d405ef5009c788a15cc9cd08f171add3838b2713 Mon Sep 17 00:00:00 2001 From: Carlo Lemos <55899543+vitaliset@users.noreply.github.com> Date: Thu, 22 Jan 2026 16:43:02 -0300 Subject: [PATCH] =?UTF-8?q?Revert=20"[ossfuzz][project=5Fsetup]=20Improve?= =?UTF-8?q?=20weighting=20of=20memory=20safe=20vs=20unsafe=20p=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f97c7121d466c2fd66970e0219fcac653f49f5b9. --- src/clusterfuzz/_internal/cron/project_setup.py | 8 ++++---- .../tests/appengine/handlers/cron/project_setup_test.py | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) 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',],