Enable C asserts in the cpython3 oss-fuzz build. (#7119)

* Enable C asserts in the cpython3 build.

* add a license header per now enforced policy.
This commit is contained in:
Gregory P. Smith 2022-01-12 05:40:42 -08:00 committed by GitHub
parent 1063bf256f
commit 6e272283e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -1,4 +1,19 @@
#!/bin/bash
# Copyright 2022 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.
#
################################################################################
# Ignore memory leaks from python scripts invoked in the build
export ASAN_OPTIONS="detect_leaks=0"
@ -8,6 +23,10 @@ export MSAN_OPTIONS="halt_on_error=0:exitcode=0:report_umrs=0"
# which thinks pthreads are available without any CLI flags
CFLAGS=${CFLAGS//"-pthread"/}
# Ensure assert statements are enabled. It may help identify problems
# earlier if those fire.
CFLAGS="${CFLAGS} -UNDEBUG"
FLAGS=()
case $SANITIZER in
address)