From 3a109121a2208e7f36963b66a5f7f20b6bc936dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=B1=9F=E6=B5=A9?= <5715935+yejianghao1995@user.noreply.gitee.com> Date: Thu, 7 Aug 2025 23:48:04 +0800 Subject: [PATCH] fuzz clearn Issue: https://gitee.com/openharmony/arkcompiler_toolchain/issues/ICRNHP Change-Id: I700cbdda6b4bd91a9b721c45e352e537a40471d7 Signed-off-by: yejianghao --- test/fuzztest/BUILD.gn | 8 --- .../pttypesexceptiondetails_fuzzer/BUILD.gn | 49 ------------------- .../corpus/init | 14 ------ .../project.xml | 25 ---------- .../pttypesexceptiondetails_fuzzer.cpp | 45 ----------------- .../pttypesexceptiondetails_fuzzer.h | 21 -------- .../pttypesexceptiondetailscreate_fuzzer.cpp | 8 +-- ...ttypesexceptiondetailsexception_fuzzer.cpp | 6 ++- .../BUILD.gn | 48 ------------------ .../corpus/init | 14 ------ .../project.xml | 25 ---------- .../pttypesexceptiondetailstojson_fuzzer.cpp | 45 ----------------- .../pttypesexceptiondetailstojson_fuzzer.h | 21 -------- .../BUILD.gn | 49 ------------------- .../corpus/init | 14 ------ .../project.xml | 25 ---------- .../pttypesinternalpropertydesp_fuzzer.cpp | 44 ----------------- .../pttypesinternalpropertydesp_fuzzer.h | 21 -------- .../BUILD.gn | 48 ------------------ .../corpus/init | 14 ------ .../project.xml | 25 ---------- ...typesinternalpropertydesptojson_fuzzer.cpp | 45 ----------------- ...pttypesinternalpropertydesptojson_fuzzer.h | 21 -------- ...ttypesinternalpropertydespvalue_fuzzer.cpp | 4 +- .../BUILD.gn | 49 ------------------- .../corpus/init | 14 ------ .../project.xml | 25 ---------- .../pttypesprivatepropertydesp_fuzzer.cpp | 44 ----------------- .../pttypesprivatepropertydesp_fuzzer.h | 21 -------- .../pttypesprivatepropertydespget_fuzzer.cpp | 4 +- .../pttypesprivatepropertydespset_fuzzer.cpp | 4 +- .../BUILD.gn | 48 ------------------ .../corpus/init | 14 ------ .../project.xml | 25 ---------- ...ttypesprivatepropertydesptojson_fuzzer.cpp | 45 ----------------- .../pttypesprivatepropertydesptojson_fuzzer.h | 21 -------- ...pttypesprivatepropertydespvalue_fuzzer.cpp | 4 +- .../pttypesremoteobject_fuzzer/BUILD.gn | 49 ------------------- .../pttypesremoteobject_fuzzer/corpus/init | 14 ------ .../pttypesremoteobject_fuzzer/project.xml | 25 ---------- .../pttypesremoteobject_fuzzer.cpp | 44 ----------------- .../pttypesremoteobject_fuzzer.h | 21 -------- .../pttypesremoteobjectgettype_fuzzer.cpp | 1 + .../pttypesremoteobjectgetvalue_fuzzer.cpp | 13 ++++- ...pttypesremoteobjecthasclassname_fuzzer.cpp | 1 + .../pttypesremoteobjecthassubtype_fuzzer.cpp | 1 + .../BUILD.gn | 49 ------------------- .../corpus/init | 14 ------ .../project.xml | 25 ---------- .../pttypesremoteobjectsetvalue_fuzzer.cpp | 46 ----------------- .../pttypesremoteobjectsetvalue_fuzzer.h | 21 -------- 51 files changed, 32 insertions(+), 1249 deletions(-) delete mode 100644 test/fuzztest/pttypesexceptiondetails_fuzzer/BUILD.gn delete mode 100644 test/fuzztest/pttypesexceptiondetails_fuzzer/corpus/init delete mode 100644 test/fuzztest/pttypesexceptiondetails_fuzzer/project.xml delete mode 100644 test/fuzztest/pttypesexceptiondetails_fuzzer/pttypesexceptiondetails_fuzzer.cpp delete mode 100644 test/fuzztest/pttypesexceptiondetails_fuzzer/pttypesexceptiondetails_fuzzer.h delete mode 100644 test/fuzztest/pttypesexceptiondetailstojson_fuzzer/BUILD.gn delete mode 100644 test/fuzztest/pttypesexceptiondetailstojson_fuzzer/corpus/init delete mode 100644 test/fuzztest/pttypesexceptiondetailstojson_fuzzer/project.xml delete mode 100644 test/fuzztest/pttypesexceptiondetailstojson_fuzzer/pttypesexceptiondetailstojson_fuzzer.cpp delete mode 100644 test/fuzztest/pttypesexceptiondetailstojson_fuzzer/pttypesexceptiondetailstojson_fuzzer.h delete mode 100755 test/fuzztest/pttypesinternalpropertydesp_fuzzer/BUILD.gn delete mode 100755 test/fuzztest/pttypesinternalpropertydesp_fuzzer/corpus/init delete mode 100755 test/fuzztest/pttypesinternalpropertydesp_fuzzer/project.xml delete mode 100755 test/fuzztest/pttypesinternalpropertydesp_fuzzer/pttypesinternalpropertydesp_fuzzer.cpp delete mode 100755 test/fuzztest/pttypesinternalpropertydesp_fuzzer/pttypesinternalpropertydesp_fuzzer.h delete mode 100755 test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/BUILD.gn delete mode 100755 test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/corpus/init delete mode 100755 test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/project.xml delete mode 100755 test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/pttypesinternalpropertydesptojson_fuzzer.cpp delete mode 100755 test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/pttypesinternalpropertydesptojson_fuzzer.h delete mode 100755 test/fuzztest/pttypesprivatepropertydesp_fuzzer/BUILD.gn delete mode 100755 test/fuzztest/pttypesprivatepropertydesp_fuzzer/corpus/init delete mode 100755 test/fuzztest/pttypesprivatepropertydesp_fuzzer/project.xml delete mode 100755 test/fuzztest/pttypesprivatepropertydesp_fuzzer/pttypesprivatepropertydesp_fuzzer.cpp delete mode 100755 test/fuzztest/pttypesprivatepropertydesp_fuzzer/pttypesprivatepropertydesp_fuzzer.h delete mode 100755 test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/BUILD.gn delete mode 100755 test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/corpus/init delete mode 100755 test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/project.xml delete mode 100755 test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/pttypesprivatepropertydesptojson_fuzzer.cpp delete mode 100755 test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/pttypesprivatepropertydesptojson_fuzzer.h delete mode 100644 test/fuzztest/pttypesremoteobject_fuzzer/BUILD.gn delete mode 100644 test/fuzztest/pttypesremoteobject_fuzzer/corpus/init delete mode 100644 test/fuzztest/pttypesremoteobject_fuzzer/project.xml delete mode 100644 test/fuzztest/pttypesremoteobject_fuzzer/pttypesremoteobject_fuzzer.cpp delete mode 100644 test/fuzztest/pttypesremoteobject_fuzzer/pttypesremoteobject_fuzzer.h delete mode 100644 test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/BUILD.gn delete mode 100644 test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/corpus/init delete mode 100644 test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/project.xml delete mode 100644 test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/pttypesremoteobjectsetvalue_fuzzer.cpp delete mode 100644 test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/pttypesremoteobjectsetvalue_fuzzer.h diff --git a/test/fuzztest/BUILD.gn b/test/fuzztest/BUILD.gn index e79944a8..a058013e 100644 --- a/test/fuzztest/BUILD.gn +++ b/test/fuzztest/BUILD.gn @@ -34,7 +34,6 @@ group("fuzztest") { "protocolhandlersendreply_fuzzer:fuzztest", "pttypesbreakpointparseid_fuzzer:fuzztest", "pttypesbreakpointtostring_fuzzer:fuzztest", - "pttypesexceptiondetails_fuzzer:fuzztest", "pttypesexceptiondetailscolumn_fuzzer:fuzztest", "pttypesexceptiondetailscreate_fuzzer:fuzztest", "pttypesexceptiondetailsexception_fuzzer:fuzztest", @@ -43,23 +42,17 @@ group("fuzztest") { "pttypesexceptiondetailsline_fuzzer:fuzztest", "pttypesexceptiondetailsscriptid_fuzzer:fuzztest", "pttypesexceptiondetailstext_fuzzer:fuzztest", - "pttypesexceptiondetailstojson_fuzzer:fuzztest", "pttypesexceptiondetailsurl_fuzzer:fuzztest", - "pttypesinternalpropertydesp_fuzzer:fuzztest", "pttypesinternalpropertydespcreate_fuzzer:fuzztest", "pttypesinternalpropertydespname_fuzzer:fuzztest", - "pttypesinternalpropertydesptojson_fuzzer:fuzztest", "pttypesinternalpropertydespvalue_fuzzer:fuzztest", "pttypesobjectremoteobject_fuzzer:fuzztest", "pttypesprimitiveremoteobject_fuzzer:fuzztest", - "pttypesprivatepropertydesp_fuzzer:fuzztest", "pttypesprivatepropertydespcreate_fuzzer:fuzztest", "pttypesprivatepropertydespget_fuzzer:fuzztest", "pttypesprivatepropertydespname_fuzzer:fuzztest", "pttypesprivatepropertydespset_fuzzer:fuzztest", - "pttypesprivatepropertydesptojson_fuzzer:fuzztest", "pttypesprivatepropertydespvalue_fuzzer:fuzztest", - "pttypesremoteobject_fuzzer:fuzztest", "pttypesremoteobjectdescription_fuzzer:fuzztest", "pttypesremoteobjectgetclassname_fuzzer:fuzztest", "pttypesremoteobjectgetsubtype_fuzzer:fuzztest", @@ -71,7 +64,6 @@ group("fuzztest") { "pttypesremoteobjectsetclassname_fuzzer:fuzztest", "pttypesremoteobjectsetsubtype_fuzzer:fuzztest", "pttypesremoteobjectsettype_fuzzer:fuzztest", - "pttypesremoteobjectsetvalue_fuzzer:fuzztest", "pttypesremoteobjectunserializablevalue_fuzzer:fuzztest", "pttypesstringremoteobject_fuzzer:fuzztest", "pttypessymbolremoteobject_fuzzer:fuzztest", diff --git a/test/fuzztest/pttypesexceptiondetails_fuzzer/BUILD.gn b/test/fuzztest/pttypesexceptiondetails_fuzzer/BUILD.gn deleted file mode 100644 index 54474374..00000000 --- a/test/fuzztest/pttypesexceptiondetails_fuzzer/BUILD.gn +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -##################################hydra-fuzz################################### -import("//arkcompiler/toolchain/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") - -##################################fuzztest##################################### -ohos_fuzztest("PtTypesExceptionDetailsFuzzTest") { - module_out_path = toolchain_output_path - - fuzz_config_file = - "//arkcompiler/toolchain/test/fuzztest/pttypesexceptiondetails_fuzzer" - - sources = [ "pttypesexceptiondetails_fuzzer.cpp" ] - - configs = [ "//arkcompiler/toolchain:toolchain_test_config" ] - - deps = [ "../../../tooling:libark_ecma_debugger_set" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ - "cJSON:cjson", - "ets_runtime:libark_jsruntime", - "icu:shared_icuuc", - "libuv:uv", - sdk_libc_secshared_dep, - ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":PtTypesExceptionDetailsFuzzTest" ] -} diff --git a/test/fuzztest/pttypesexceptiondetails_fuzzer/corpus/init b/test/fuzztest/pttypesexceptiondetails_fuzzer/corpus/init deleted file mode 100644 index b9a20c8e..00000000 --- a/test/fuzztest/pttypesexceptiondetails_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/pttypesexceptiondetails_fuzzer/project.xml b/test/fuzztest/pttypesexceptiondetails_fuzzer/project.xml deleted file mode 100644 index f7de9064..00000000 --- a/test/fuzztest/pttypesexceptiondetails_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - \ No newline at end of file diff --git a/test/fuzztest/pttypesexceptiondetails_fuzzer/pttypesexceptiondetails_fuzzer.cpp b/test/fuzztest/pttypesexceptiondetails_fuzzer/pttypesexceptiondetails_fuzzer.cpp deleted file mode 100644 index e6c51055..00000000 --- a/test/fuzztest/pttypesexceptiondetails_fuzzer/pttypesexceptiondetails_fuzzer.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "pttypesexceptiondetails_fuzzer.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "tooling/base/pt_types.h" - -using namespace panda; -using namespace panda::ecmascript; -using namespace panda::ecmascript::tooling; - -namespace OHOS { - void PtTypesExceptionDetailsFuzzTest(const uint8_t* data, size_t size) - { - RuntimeOption option; - option.SetLogLevel(RuntimeOption::LOG_LEVEL::ERROR); - auto vm = JSNApi::CreateJSVM(option); - if (size <= 0 || data == NULL) { - return; - } - ExceptionDetails details; - - JSNApi::DestroyJSVM(vm); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::PtTypesExceptionDetailsFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/pttypesexceptiondetails_fuzzer/pttypesexceptiondetails_fuzzer.h b/test/fuzztest/pttypesexceptiondetails_fuzzer/pttypesexceptiondetails_fuzzer.h deleted file mode 100644 index 7b031a6b..00000000 --- a/test/fuzztest/pttypesexceptiondetails_fuzzer/pttypesexceptiondetails_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef PROTOCOLHANDLER_FUZZER_H -#define PROTOCOLHANDLER_FUZZER_H - -#define FUZZ_PROJECT_NAME "pttypesexceptiondetails_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/pttypesexceptiondetailscreate_fuzzer/pttypesexceptiondetailscreate_fuzzer.cpp b/test/fuzztest/pttypesexceptiondetailscreate_fuzzer/pttypesexceptiondetailscreate_fuzzer.cpp index 1732fa11..b8ffae12 100644 --- a/test/fuzztest/pttypesexceptiondetailscreate_fuzzer/pttypesexceptiondetailscreate_fuzzer.cpp +++ b/test/fuzztest/pttypesexceptiondetailscreate_fuzzer/pttypesexceptiondetailscreate_fuzzer.cpp @@ -33,12 +33,8 @@ namespace OHOS { // if data: "{\"\":1," // cJSON_ParseWithLength will heap-buffer-overflow // https://github.com/DaveGamble/cJSON/issues/804 - cJSON* cjson = NULL; - if (cjson != NULL) { - PtJson pjson(cjson); - auto details = ExceptionDetails::Create(pjson); - cJSON_Delete(cjson); - } + std::unique_ptr pjson = PtJson::Parse(std::string((const char*)data, size)); + auto details = ExceptionDetails::Create(*pjson); JSNApi::DestroyJSVM(vm); } diff --git a/test/fuzztest/pttypesexceptiondetailsexception_fuzzer/pttypesexceptiondetailsexception_fuzzer.cpp b/test/fuzztest/pttypesexceptiondetailsexception_fuzzer/pttypesexceptiondetailsexception_fuzzer.cpp index dd3ffb24..2e65d82a 100644 --- a/test/fuzztest/pttypesexceptiondetailsexception_fuzzer/pttypesexceptiondetailsexception_fuzzer.cpp +++ b/test/fuzztest/pttypesexceptiondetailsexception_fuzzer/pttypesexceptiondetailsexception_fuzzer.cpp @@ -31,8 +31,10 @@ namespace OHOS { return; } ExceptionDetails details; - std::unique_ptr obj = std::make_unique(); - details.SetException(std::move(obj)); + uint8_t* val = const_cast(data); + RemoteObject* val1 = reinterpret_cast(val); + std::unique_ptr remote(val1); + details.SetException(std::move(remote)); details.GetException(); details.HasException(); JSNApi::DestroyJSVM(vm); diff --git a/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/BUILD.gn b/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/BUILD.gn deleted file mode 100644 index ad1e8f3c..00000000 --- a/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/BUILD.gn +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -##################################hydra-fuzz################################### -import("//arkcompiler/toolchain/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") - -##################################fuzztest##################################### -ohos_fuzztest("PtTypesExceptionDetailsToJsonFuzzTest") { - module_out_path = toolchain_output_path - - fuzz_config_file = "//arkcompiler/toolchain/test/fuzztest/pttypesexceptiondetailstojson_fuzzer" - - sources = [ "pttypesexceptiondetailstojson_fuzzer.cpp" ] - - configs = [ "//arkcompiler/toolchain:toolchain_test_config" ] - - deps = [ "../../../tooling:libark_ecma_debugger_set" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ - "cJSON:cjson", - "ets_runtime:libark_jsruntime", - "icu:shared_icuuc", - "libuv:uv", - sdk_libc_secshared_dep, - ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":PtTypesExceptionDetailsToJsonFuzzTest" ] -} diff --git a/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/corpus/init b/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/corpus/init deleted file mode 100644 index b9a20c8e..00000000 --- a/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/project.xml b/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/project.xml deleted file mode 100644 index f7de9064..00000000 --- a/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - \ No newline at end of file diff --git a/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/pttypesexceptiondetailstojson_fuzzer.cpp b/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/pttypesexceptiondetailstojson_fuzzer.cpp deleted file mode 100644 index 315db3fc..00000000 --- a/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/pttypesexceptiondetailstojson_fuzzer.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "pttypesexceptiondetailstojson_fuzzer.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "tooling/base/pt_types.h" - -using namespace panda; -using namespace panda::ecmascript; -using namespace panda::ecmascript::tooling; - -namespace OHOS { - void PtTypesExceptionDetailsToJsonFuzzTest(const uint8_t* data, size_t size) - { - RuntimeOption option; - option.SetLogLevel(RuntimeOption::LOG_LEVEL::ERROR); - auto vm = JSNApi::CreateJSVM(option); - if (size <= 0 || data == NULL) { - return; - } - ExceptionDetails details; - auto pj = details.ToJson(); - JSNApi::DestroyJSVM(vm); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::PtTypesExceptionDetailsToJsonFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/pttypesexceptiondetailstojson_fuzzer.h b/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/pttypesexceptiondetailstojson_fuzzer.h deleted file mode 100644 index dfa5affd..00000000 --- a/test/fuzztest/pttypesexceptiondetailstojson_fuzzer/pttypesexceptiondetailstojson_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef PROTOCOLHANDLER_FUZZER_H -#define PROTOCOLHANDLER_FUZZER_H - -#define FUZZ_PROJECT_NAME "pttypesexceptiondetailstojson_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/pttypesinternalpropertydesp_fuzzer/BUILD.gn b/test/fuzztest/pttypesinternalpropertydesp_fuzzer/BUILD.gn deleted file mode 100755 index 89046fab..00000000 --- a/test/fuzztest/pttypesinternalpropertydesp_fuzzer/BUILD.gn +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -##################################hydra-fuzz################################### -import("//arkcompiler/toolchain/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") - -##################################fuzztest##################################### -ohos_fuzztest("PtTypesInternalPropertyDespFuzzTest") { - module_out_path = toolchain_output_path - - fuzz_config_file = - "//arkcompiler/toolchain/test/fuzztest/pttypesinternalpropertydesp_fuzzer" - - sources = [ "pttypesinternalpropertydesp_fuzzer.cpp" ] - - configs = [ "//arkcompiler/toolchain:toolchain_test_config" ] - - deps = [ "../../../tooling:libark_ecma_debugger_set" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ - "cJSON:cjson", - "ets_runtime:libark_jsruntime", - "icu:shared_icuuc", - "libuv:uv", - sdk_libc_secshared_dep, - ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":PtTypesInternalPropertyDespFuzzTest" ] -} diff --git a/test/fuzztest/pttypesinternalpropertydesp_fuzzer/corpus/init b/test/fuzztest/pttypesinternalpropertydesp_fuzzer/corpus/init deleted file mode 100755 index b9a20c8e..00000000 --- a/test/fuzztest/pttypesinternalpropertydesp_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/pttypesinternalpropertydesp_fuzzer/project.xml b/test/fuzztest/pttypesinternalpropertydesp_fuzzer/project.xml deleted file mode 100755 index f7de9064..00000000 --- a/test/fuzztest/pttypesinternalpropertydesp_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - \ No newline at end of file diff --git a/test/fuzztest/pttypesinternalpropertydesp_fuzzer/pttypesinternalpropertydesp_fuzzer.cpp b/test/fuzztest/pttypesinternalpropertydesp_fuzzer/pttypesinternalpropertydesp_fuzzer.cpp deleted file mode 100755 index 17542961..00000000 --- a/test/fuzztest/pttypesinternalpropertydesp_fuzzer/pttypesinternalpropertydesp_fuzzer.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "pttypesinternalpropertydesp_fuzzer.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "tooling/base/pt_types.h" - -using namespace panda; -using namespace panda::ecmascript; -using namespace panda::ecmascript::tooling; - -namespace OHOS { - void PtTypesInternalPropertyDespFuzzTest(const uint8_t* data, size_t size) - { - RuntimeOption option; - option.SetLogLevel(RuntimeOption::LOG_LEVEL::ERROR); - auto vm = JSNApi::CreateJSVM(option); - if (size <= 0 || data == NULL) { - return; - } - InternalPropertyDescriptor desp; - JSNApi::DestroyJSVM(vm); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::PtTypesInternalPropertyDespFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/pttypesinternalpropertydesp_fuzzer/pttypesinternalpropertydesp_fuzzer.h b/test/fuzztest/pttypesinternalpropertydesp_fuzzer/pttypesinternalpropertydesp_fuzzer.h deleted file mode 100755 index 6e8d2d9a..00000000 --- a/test/fuzztest/pttypesinternalpropertydesp_fuzzer/pttypesinternalpropertydesp_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef PROTOCOLHANDLER_FUZZER_H -#define PROTOCOLHANDLER_FUZZER_H - -#define FUZZ_PROJECT_NAME "pttypesinternalpropertydesp_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/BUILD.gn b/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/BUILD.gn deleted file mode 100755 index f3ebb61c..00000000 --- a/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/BUILD.gn +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -##################################hydra-fuzz################################### -import("//arkcompiler/toolchain/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") - -##################################fuzztest##################################### -ohos_fuzztest("PtTypesInternalPropertyDespToJsonFuzzTest") { - module_out_path = toolchain_output_path - - fuzz_config_file = "//arkcompiler/toolchain/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer" - - sources = [ "pttypesinternalpropertydesptojson_fuzzer.cpp" ] - - configs = [ "//arkcompiler/toolchain:toolchain_test_config" ] - - deps = [ "../../../tooling:libark_ecma_debugger_set" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ - "cJSON:cjson", - "ets_runtime:libark_jsruntime", - "icu:shared_icuuc", - "libuv:uv", - sdk_libc_secshared_dep, - ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":PtTypesInternalPropertyDespToJsonFuzzTest" ] -} diff --git a/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/corpus/init b/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/corpus/init deleted file mode 100755 index b9a20c8e..00000000 --- a/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/project.xml b/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/project.xml deleted file mode 100755 index f7de9064..00000000 --- a/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - \ No newline at end of file diff --git a/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/pttypesinternalpropertydesptojson_fuzzer.cpp b/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/pttypesinternalpropertydesptojson_fuzzer.cpp deleted file mode 100755 index 86599921..00000000 --- a/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/pttypesinternalpropertydesptojson_fuzzer.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "pttypesinternalpropertydesptojson_fuzzer.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "tooling/base/pt_types.h" - -using namespace panda; -using namespace panda::ecmascript; -using namespace panda::ecmascript::tooling; - -namespace OHOS { - void PtTypesInternalPropertyDespToJsonFuzzTest(const uint8_t* data, size_t size) - { - RuntimeOption option; - option.SetLogLevel(RuntimeOption::LOG_LEVEL::ERROR); - auto vm = JSNApi::CreateJSVM(option); - if (size <= 0 || data == NULL) { - return; - } - InternalPropertyDescriptor desp; - desp.ToJson(); - JSNApi::DestroyJSVM(vm); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::PtTypesInternalPropertyDespToJsonFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/pttypesinternalpropertydesptojson_fuzzer.h b/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/pttypesinternalpropertydesptojson_fuzzer.h deleted file mode 100755 index 283c9491..00000000 --- a/test/fuzztest/pttypesinternalpropertydesptojson_fuzzer/pttypesinternalpropertydesptojson_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef PROTOCOLHANDLER_FUZZER_H -#define PROTOCOLHANDLER_FUZZER_H - -#define FUZZ_PROJECT_NAME "pttypesinternalpropertydesptojson_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/pttypesinternalpropertydespvalue_fuzzer/pttypesinternalpropertydespvalue_fuzzer.cpp b/test/fuzztest/pttypesinternalpropertydespvalue_fuzzer/pttypesinternalpropertydespvalue_fuzzer.cpp index 5e5d04d4..d7dcf120 100755 --- a/test/fuzztest/pttypesinternalpropertydespvalue_fuzzer/pttypesinternalpropertydespvalue_fuzzer.cpp +++ b/test/fuzztest/pttypesinternalpropertydespvalue_fuzzer/pttypesinternalpropertydespvalue_fuzzer.cpp @@ -31,7 +31,9 @@ namespace OHOS { return; } InternalPropertyDescriptor desp; - auto remote = std::make_unique(); + uint8_t* val = const_cast(data); + RemoteObject* val1 = reinterpret_cast(val); + std::unique_ptr remote(val1); desp.SetValue(std::move(remote)); desp.GetValue(); desp.HasValue(); diff --git a/test/fuzztest/pttypesprivatepropertydesp_fuzzer/BUILD.gn b/test/fuzztest/pttypesprivatepropertydesp_fuzzer/BUILD.gn deleted file mode 100755 index 7da5dac8..00000000 --- a/test/fuzztest/pttypesprivatepropertydesp_fuzzer/BUILD.gn +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -##################################hydra-fuzz################################### -import("//arkcompiler/toolchain/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") - -##################################fuzztest##################################### -ohos_fuzztest("PtTypesPrivatePropertyDespFuzzTest") { - module_out_path = toolchain_output_path - - fuzz_config_file = - "//arkcompiler/toolchain/test/fuzztest/pttypesprivatepropertydesp_fuzzer" - - sources = [ "pttypesprivatepropertydesp_fuzzer.cpp" ] - - configs = [ "//arkcompiler/toolchain:toolchain_test_config" ] - - deps = [ "../../../tooling:libark_ecma_debugger_set" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ - "cJSON:cjson", - "ets_runtime:libark_jsruntime", - "icu:shared_icuuc", - "libuv:uv", - sdk_libc_secshared_dep, - ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":PtTypesPrivatePropertyDespFuzzTest" ] -} diff --git a/test/fuzztest/pttypesprivatepropertydesp_fuzzer/corpus/init b/test/fuzztest/pttypesprivatepropertydesp_fuzzer/corpus/init deleted file mode 100755 index b9a20c8e..00000000 --- a/test/fuzztest/pttypesprivatepropertydesp_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/pttypesprivatepropertydesp_fuzzer/project.xml b/test/fuzztest/pttypesprivatepropertydesp_fuzzer/project.xml deleted file mode 100755 index f7de9064..00000000 --- a/test/fuzztest/pttypesprivatepropertydesp_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - \ No newline at end of file diff --git a/test/fuzztest/pttypesprivatepropertydesp_fuzzer/pttypesprivatepropertydesp_fuzzer.cpp b/test/fuzztest/pttypesprivatepropertydesp_fuzzer/pttypesprivatepropertydesp_fuzzer.cpp deleted file mode 100755 index c8e1f660..00000000 --- a/test/fuzztest/pttypesprivatepropertydesp_fuzzer/pttypesprivatepropertydesp_fuzzer.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "pttypesprivatepropertydesp_fuzzer.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "tooling/base/pt_types.h" - -using namespace panda; -using namespace panda::ecmascript; -using namespace panda::ecmascript::tooling; - -namespace OHOS { - void PtTypesPrivatePropertyDespFuzzTest(const uint8_t* data, size_t size) - { - RuntimeOption option; - option.SetLogLevel(RuntimeOption::LOG_LEVEL::ERROR); - auto vm = JSNApi::CreateJSVM(option); - if (size <= 0 || data == NULL) { - return; - } - PrivatePropertyDescriptor desp; - JSNApi::DestroyJSVM(vm); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::PtTypesPrivatePropertyDespFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/pttypesprivatepropertydesp_fuzzer/pttypesprivatepropertydesp_fuzzer.h b/test/fuzztest/pttypesprivatepropertydesp_fuzzer/pttypesprivatepropertydesp_fuzzer.h deleted file mode 100755 index 29273d91..00000000 --- a/test/fuzztest/pttypesprivatepropertydesp_fuzzer/pttypesprivatepropertydesp_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef PROTOCOLHANDLER_FUZZER_H -#define PROTOCOLHANDLER_FUZZER_H - -#define FUZZ_PROJECT_NAME "pttypesprivatepropertydesp_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/pttypesprivatepropertydespget_fuzzer/pttypesprivatepropertydespget_fuzzer.cpp b/test/fuzztest/pttypesprivatepropertydespget_fuzzer/pttypesprivatepropertydespget_fuzzer.cpp index 278189ee..543b8b9e 100755 --- a/test/fuzztest/pttypesprivatepropertydespget_fuzzer/pttypesprivatepropertydespget_fuzzer.cpp +++ b/test/fuzztest/pttypesprivatepropertydespget_fuzzer/pttypesprivatepropertydespget_fuzzer.cpp @@ -31,7 +31,9 @@ namespace OHOS { return; } PrivatePropertyDescriptor desp; - auto remote = std::make_unique(); + uint8_t* val = const_cast(data); + RemoteObject* val1 = reinterpret_cast(val); + std::unique_ptr remote(val1); desp.SetGet(std::move(remote)); desp.GetGet(); desp.HasGet(); diff --git a/test/fuzztest/pttypesprivatepropertydespset_fuzzer/pttypesprivatepropertydespset_fuzzer.cpp b/test/fuzztest/pttypesprivatepropertydespset_fuzzer/pttypesprivatepropertydespset_fuzzer.cpp index 4ad99271..5f8141c4 100755 --- a/test/fuzztest/pttypesprivatepropertydespset_fuzzer/pttypesprivatepropertydespset_fuzzer.cpp +++ b/test/fuzztest/pttypesprivatepropertydespset_fuzzer/pttypesprivatepropertydespset_fuzzer.cpp @@ -31,7 +31,9 @@ namespace OHOS { return; } PrivatePropertyDescriptor desp; - auto remote = std::make_unique(); + uint8_t* val = const_cast(data); + RemoteObject* val1 = reinterpret_cast(val); + std::unique_ptr remote(val1); desp.SetSet(std::move(remote)); desp.GetSet(); desp.HasSet(); diff --git a/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/BUILD.gn b/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/BUILD.gn deleted file mode 100755 index f8021301..00000000 --- a/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/BUILD.gn +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -##################################hydra-fuzz################################### -import("//arkcompiler/toolchain/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") - -##################################fuzztest##################################### -ohos_fuzztest("PtTypesPrivatePropertyDespToJsonFuzzTest") { - module_out_path = toolchain_output_path - - fuzz_config_file = "//arkcompiler/toolchain/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer" - - sources = [ "pttypesprivatepropertydesptojson_fuzzer.cpp" ] - - configs = [ "//arkcompiler/toolchain:toolchain_test_config" ] - - deps = [ "../../../tooling:libark_ecma_debugger_set" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ - "cJSON:cjson", - "ets_runtime:libark_jsruntime", - "icu:shared_icuuc", - "libuv:uv", - sdk_libc_secshared_dep, - ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":PtTypesPrivatePropertyDespToJsonFuzzTest" ] -} diff --git a/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/corpus/init b/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/corpus/init deleted file mode 100755 index b9a20c8e..00000000 --- a/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/project.xml b/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/project.xml deleted file mode 100755 index f7de9064..00000000 --- a/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - \ No newline at end of file diff --git a/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/pttypesprivatepropertydesptojson_fuzzer.cpp b/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/pttypesprivatepropertydesptojson_fuzzer.cpp deleted file mode 100755 index 12e81ae5..00000000 --- a/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/pttypesprivatepropertydesptojson_fuzzer.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "pttypesprivatepropertydesptojson_fuzzer.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "tooling/base/pt_types.h" - -using namespace panda; -using namespace panda::ecmascript; -using namespace panda::ecmascript::tooling; - -namespace OHOS { - void PtTypesPrivatePropertyDespToJsonFuzzTest(const uint8_t* data, size_t size) - { - RuntimeOption option; - option.SetLogLevel(RuntimeOption::LOG_LEVEL::ERROR); - auto vm = JSNApi::CreateJSVM(option); - if (size <= 0 || data == NULL) { - return; - } - PrivatePropertyDescriptor desp; - desp.ToJson(); - JSNApi::DestroyJSVM(vm); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::PtTypesPrivatePropertyDespToJsonFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/pttypesprivatepropertydesptojson_fuzzer.h b/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/pttypesprivatepropertydesptojson_fuzzer.h deleted file mode 100755 index ebcebd49..00000000 --- a/test/fuzztest/pttypesprivatepropertydesptojson_fuzzer/pttypesprivatepropertydesptojson_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef PROTOCOLHANDLER_FUZZER_H -#define PROTOCOLHANDLER_FUZZER_H - -#define FUZZ_PROJECT_NAME "pttypesprivatepropertydespcreate_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/pttypesprivatepropertydespvalue_fuzzer/pttypesprivatepropertydespvalue_fuzzer.cpp b/test/fuzztest/pttypesprivatepropertydespvalue_fuzzer/pttypesprivatepropertydespvalue_fuzzer.cpp index 3d66d082..d4f5b01a 100755 --- a/test/fuzztest/pttypesprivatepropertydespvalue_fuzzer/pttypesprivatepropertydespvalue_fuzzer.cpp +++ b/test/fuzztest/pttypesprivatepropertydespvalue_fuzzer/pttypesprivatepropertydespvalue_fuzzer.cpp @@ -31,7 +31,9 @@ namespace OHOS { return; } PrivatePropertyDescriptor desp; - auto remote = std::make_unique(); + uint8_t* val = const_cast(data); + RemoteObject* val1 = reinterpret_cast(val); + std::unique_ptr remote(val1); desp.SetValue(std::move(remote)); desp.GetValue(); desp.HasValue(); diff --git a/test/fuzztest/pttypesremoteobject_fuzzer/BUILD.gn b/test/fuzztest/pttypesremoteobject_fuzzer/BUILD.gn deleted file mode 100644 index d5b61116..00000000 --- a/test/fuzztest/pttypesremoteobject_fuzzer/BUILD.gn +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -##################################hydra-fuzz################################### -import("//arkcompiler/toolchain/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") - -##################################fuzztest##################################### -ohos_fuzztest("PtTypesRemoteObjectFuzzTest") { - module_out_path = toolchain_output_path - - fuzz_config_file = - "//arkcompiler/toolchain/test/fuzztest/pttypesremoteobject_fuzzer" - - sources = [ "pttypesremoteobject_fuzzer.cpp" ] - - configs = [ "//arkcompiler/toolchain:toolchain_test_config" ] - - deps = [ "../../../tooling:libark_ecma_debugger_set" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ - "cJSON:cjson", - "ets_runtime:libark_jsruntime", - "icu:shared_icuuc", - "libuv:uv", - sdk_libc_secshared_dep, - ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":PtTypesRemoteObjectFuzzTest" ] -} diff --git a/test/fuzztest/pttypesremoteobject_fuzzer/corpus/init b/test/fuzztest/pttypesremoteobject_fuzzer/corpus/init deleted file mode 100644 index b9a20c8e..00000000 --- a/test/fuzztest/pttypesremoteobject_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/pttypesremoteobject_fuzzer/project.xml b/test/fuzztest/pttypesremoteobject_fuzzer/project.xml deleted file mode 100644 index f7de9064..00000000 --- a/test/fuzztest/pttypesremoteobject_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - \ No newline at end of file diff --git a/test/fuzztest/pttypesremoteobject_fuzzer/pttypesremoteobject_fuzzer.cpp b/test/fuzztest/pttypesremoteobject_fuzzer/pttypesremoteobject_fuzzer.cpp deleted file mode 100644 index 9662e823..00000000 --- a/test/fuzztest/pttypesremoteobject_fuzzer/pttypesremoteobject_fuzzer.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "pttypesremoteobject_fuzzer.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "tooling/base/pt_types.h" - -using namespace panda; -using namespace panda::ecmascript; -using namespace panda::ecmascript::tooling; - -namespace OHOS { - void PtTypesRemoteObjectFuzzTest(const uint8_t* data, size_t size) - { - RuntimeOption option; - option.SetLogLevel(RuntimeOption::LOG_LEVEL::ERROR); - auto vm = JSNApi::CreateJSVM(option); - if (size <= 0 || data == NULL) { - return; - } - RemoteObject obj; - JSNApi::DestroyJSVM(vm); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::PtTypesRemoteObjectFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/pttypesremoteobject_fuzzer/pttypesremoteobject_fuzzer.h b/test/fuzztest/pttypesremoteobject_fuzzer/pttypesremoteobject_fuzzer.h deleted file mode 100644 index 8ef2e3f5..00000000 --- a/test/fuzztest/pttypesremoteobject_fuzzer/pttypesremoteobject_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef PROTOCOLHANDLER_FUZZER_H -#define PROTOCOLHANDLER_FUZZER_H - -#define FUZZ_PROJECT_NAME "pttypesremoteobject_fuzzer" - -#endif \ No newline at end of file diff --git a/test/fuzztest/pttypesremoteobjectgettype_fuzzer/pttypesremoteobjectgettype_fuzzer.cpp b/test/fuzztest/pttypesremoteobjectgettype_fuzzer/pttypesremoteobjectgettype_fuzzer.cpp index c5f7d02d..752af381 100644 --- a/test/fuzztest/pttypesremoteobjectgettype_fuzzer/pttypesremoteobjectgettype_fuzzer.cpp +++ b/test/fuzztest/pttypesremoteobjectgettype_fuzzer/pttypesremoteobjectgettype_fuzzer.cpp @@ -31,6 +31,7 @@ namespace OHOS { return; } RemoteObject obj; + obj.SetType(std::string((const char*)data, size)); std::string type = obj.GetType(); JSNApi::DestroyJSVM(vm); } diff --git a/test/fuzztest/pttypesremoteobjectgetvalue_fuzzer/pttypesremoteobjectgetvalue_fuzzer.cpp b/test/fuzztest/pttypesremoteobjectgetvalue_fuzzer/pttypesremoteobjectgetvalue_fuzzer.cpp index 761a78d2..fd4a214b 100644 --- a/test/fuzztest/pttypesremoteobjectgetvalue_fuzzer/pttypesremoteobjectgetvalue_fuzzer.cpp +++ b/test/fuzztest/pttypesremoteobjectgetvalue_fuzzer/pttypesremoteobjectgetvalue_fuzzer.cpp @@ -30,9 +30,18 @@ namespace OHOS { if (size <= 0 || data == NULL) { return; } + double input = 0; + const uint32_t doubleTypeSize = 8; // 8 : size of double type + if (size > doubleTypeSize) { + size = doubleTypeSize; + } + if (memcpy_s(&input, doubleTypeSize, data, size) != 0) { + std::cout << "memcpy_s failed"; + UNREACHABLE(); + } + Local value(NumberRef::New(vm, input)); RemoteObject obj; - Local val = JSValueRef::Undefined(vm); - obj.SetValue(val); + obj.SetValue(value); Local ref = obj.GetValue(); ref.IsEmpty(); obj.HasValue(); diff --git a/test/fuzztest/pttypesremoteobjecthasclassname_fuzzer/pttypesremoteobjecthasclassname_fuzzer.cpp b/test/fuzztest/pttypesremoteobjecthasclassname_fuzzer/pttypesremoteobjecthasclassname_fuzzer.cpp index f560041e..b755df7b 100644 --- a/test/fuzztest/pttypesremoteobjecthasclassname_fuzzer/pttypesremoteobjecthasclassname_fuzzer.cpp +++ b/test/fuzztest/pttypesremoteobjecthasclassname_fuzzer/pttypesremoteobjecthasclassname_fuzzer.cpp @@ -31,6 +31,7 @@ namespace OHOS { return; } RemoteObject obj; + obj.SetClassName(std::string((const char*)data, size)); obj.HasClassName(); JSNApi::DestroyJSVM(vm); } diff --git a/test/fuzztest/pttypesremoteobjecthassubtype_fuzzer/pttypesremoteobjecthassubtype_fuzzer.cpp b/test/fuzztest/pttypesremoteobjecthassubtype_fuzzer/pttypesremoteobjecthassubtype_fuzzer.cpp index d34ce6e5..1188948d 100644 --- a/test/fuzztest/pttypesremoteobjecthassubtype_fuzzer/pttypesremoteobjecthassubtype_fuzzer.cpp +++ b/test/fuzztest/pttypesremoteobjecthassubtype_fuzzer/pttypesremoteobjecthassubtype_fuzzer.cpp @@ -31,6 +31,7 @@ namespace OHOS { return; } RemoteObject obj; + obj.SetSubType(std::string((const char*)data, size)); obj.HasSubType(); JSNApi::DestroyJSVM(vm); } diff --git a/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/BUILD.gn b/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/BUILD.gn deleted file mode 100644 index f9ec5017..00000000 --- a/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/BUILD.gn +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -##################################hydra-fuzz################################### -import("//arkcompiler/toolchain/test/test_helper.gni") -import("//build/config/features.gni") -import("//build/ohos.gni") -import("//build/test.gni") - -##################################fuzztest##################################### -ohos_fuzztest("PtTypesRemoteObjectSetValueFuzzTest") { - module_out_path = toolchain_output_path - - fuzz_config_file = - "//arkcompiler/toolchain/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer" - - sources = [ "pttypesremoteobjectsetvalue_fuzzer.cpp" ] - - configs = [ "//arkcompiler/toolchain:toolchain_test_config" ] - - deps = [ "../../../tooling:libark_ecma_debugger_set" ] - - # hiviewdfx libraries - external_deps = hiviewdfx_ext_deps - external_deps += [ - "cJSON:cjson", - "ets_runtime:libark_jsruntime", - "icu:shared_icuuc", - "libuv:uv", - sdk_libc_secshared_dep, - ] - deps += hiviewdfx_deps -} - -group("fuzztest") { - testonly = true - deps = [] - deps += [ ":PtTypesRemoteObjectSetValueFuzzTest" ] -} diff --git a/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/corpus/init b/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/corpus/init deleted file mode 100644 index b9a20c8e..00000000 --- a/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/corpus/init +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FUZZ \ No newline at end of file diff --git a/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/project.xml b/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/project.xml deleted file mode 100644 index f7de9064..00000000 --- a/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/project.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - 1000 - - 300 - - 4096 - - \ No newline at end of file diff --git a/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/pttypesremoteobjectsetvalue_fuzzer.cpp b/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/pttypesremoteobjectsetvalue_fuzzer.cpp deleted file mode 100644 index 95f67506..00000000 --- a/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/pttypesremoteobjectsetvalue_fuzzer.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "pttypesremoteobjectsetvalue_fuzzer.h" -#include "ecmascript/napi/include/jsnapi.h" -#include "tooling/base/pt_types.h" - -using namespace panda; -using namespace panda::ecmascript; -using namespace panda::ecmascript::tooling; - -namespace OHOS { - void PtTypesRemoteObjectSetValueFuzzTest(const uint8_t* data, size_t size) - { - RuntimeOption option; - option.SetLogLevel(RuntimeOption::LOG_LEVEL::ERROR); - auto vm = JSNApi::CreateJSVM(option); - if (size <= 0 || data == NULL) { - return; - } - RemoteObject obj; - Local val = JSValueRef::Undefined(vm); - obj.SetValue(val); - JSNApi::DestroyJSVM(vm); - } -} - -// Fuzzer entry point. -extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) -{ - // Run your code on data. - OHOS::PtTypesRemoteObjectSetValueFuzzTest(data, size); - return 0; -} diff --git a/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/pttypesremoteobjectsetvalue_fuzzer.h b/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/pttypesremoteobjectsetvalue_fuzzer.h deleted file mode 100644 index 297025be..00000000 --- a/test/fuzztest/pttypesremoteobjectsetvalue_fuzzer/pttypesremoteobjectsetvalue_fuzzer.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef PROTOCOLHANDLER_FUZZER_H -#define PROTOCOLHANDLER_FUZZER_H - -#define FUZZ_PROJECT_NAME "pttypesremoteobjectsetvalue_fuzzer" - -#endif \ No newline at end of file -- Gitee