Commit Graph
28489 Commits
Author SHA1 Message Date
Ondřej Surý 8077ce039e Import parse_tsan.py file to v9_11 branch 2020-03-26 13:52:28 +01:00
Ondřej Surý ff814288af Fix 'Dead nested assignment' from scan-build-10
This is the warning:

In file included from print_test.c:47:
./../print.c:203:9: warning: Although the value stored to 'neg' is used in the enclosing expression, the value is never actually read from 'neg'
                dot = neg = space = plus = left = zero = alt = h = l = q = z = 0;
                      ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
2020-03-26 13:52:28 +01:00
Michał Kępień d934f4a9b2 Merge branch 'michal/misc-gitlab-ci-yml-cleanups-v9_11' into 'v9_11'
[v9_11] Miscellaneous .gitlab-ci.yml cleanups

See merge request isc-projects/bind9!3302
2020-03-26 10:46:33 +00:00
Michał Kępień 9e716a0add Remove unused YAML anchors
Some YAML anchors defined in .gitlab-ci.yml are not subsequently used.
Remove them to prevent confusion.

(cherry picked from commit 3d121ede6c)
2020-03-26 11:45:40 +01:00
Michał Kępień 7e45ec0084 Do not install compiledb in cppcheck job
compiledb is already included in the Docker image used by the cppcheck
job.  Do not attempt installing it again.

(cherry picked from commit 3d264dbe81)
2020-03-26 11:45:40 +01:00
Michał Kępień 13b942f60d Include compiler name in all build/test job names
Most build/test job names already contain a "clang", "gcc", or "msvc"
prefix which indicates the compiler used for a given job.  Apply that
naming convention to all build/test job names.

(cherry picked from commit 0c898084cd)
2020-03-26 11:45:39 +01:00
Michał Kępień cb541ea253 Refactor TSAN unit test job definitions
Multiple YAML keys have identical values for both TSAN unit test job
definitions.  Extract these common keys to a YAML anchor and use it in
TSAN unit test job definitions to reduce code duplication.

(cherry picked from commit 84463f33bf)
2020-03-26 11:45:39 +01:00
Michał Kępień ac43976113 Run "kyua report-html" for TSAN unit test jobs
Definitions of jobs running unit tests under TSAN contain an
"after_script" YAML key.  Since the "unit_test_job" anchor is included
in those job definitions before "after_script" is defined, the
job-specific value of that key overrides the one defined in the included
anchor.  This prevents "kyua report-html" from being run for TSAN unit
test jobs.  Moving the invocation of "kyua report-html" to the "script"
key in the "unit_test_job" anchor is not acceptable as it would cause
the exit code of that command to determine the result of all unit test
jobs and we need that to be the exit code of "make unit".  Instead, add
"kyua report-html" invocations to the "after_script" key of TSAN unit
test job definitions to address the problem without affecting other job
definitions.

(cherry picked from commit 6ebce9425e)
2020-03-26 11:45:39 +01:00
Michał Kępień a052bac38f Refactor TSAN system test job definitions
Multiple YAML keys have identical values for both TSAN system test job
definitions.  Extract these common keys to a YAML anchor and use it in
TSAN system test job definitions to reduce code duplication.

(cherry picked from commit a9aa295f1f)
2020-03-26 11:45:39 +01:00
Michał Kępień 671e0e7a08 Drop "before_script" key from TSAN job definitions
Both "system_test_job" and "unit_test_job" YAML anchors contain a
"before_script" key.  TSAN job definitions first specify their own value
of the "before_script" key and then include the aforementioned YAML
anchors, which results in the value of the "before_script" key being
overridden with the value specified by the included anchor.  Given this,
remove "before_script" definitions specific to TSAN jobs as they serve
no practical purpose.

(cherry picked from commit 8ef01c7b50)
2020-03-26 11:45:38 +01:00
Michał Kępień a9bc2311ca Define TSAN options in a global variable
All assignments for the TSAN_OPTIONS variable are identical across the
entire .gitlab-ci.yml file.  Define a global TSAN_OPTIONS_COMMON
variable and use it in job definitions to reduce code duplication.

(cherry picked from commit 6325c0993a)
2020-03-26 11:45:38 +01:00
Ondřej Surý b4a5c02b31 Merge branch 'ondrej/arch-ppc64le-v9_11' into 'v9_11'
Detect atomic operations support on ppc64le (v9.11)

See merge request isc-projects/bind9!3295
2020-03-25 23:03:36 +00:00
Petr MenšíkandOndřej Surý 33fcafe055 Detect atomic operations support on ppc64le
Current configure detects only stdatomic operations. Fix it to detect
also ISC atomics with assembly.
2020-03-25 23:04:23 +01:00
Ondřej Surý c5d3152edd Merge branch 'ondrej/no-clang-on-debian-sid-v9_11' into 'v9_11'
Rewrite .gitlab-ci.yml to have 'base_image' and other GitLab CI improvements (v9.11)

See merge request isc-projects/bind9!3289
2020-03-25 17:30:15 +00:00
Ondřej Surý f801f0f926 Adjust the differences between v9_16 and v9_11 GitLab CI job configuration 2020-03-25 18:20:40 +01:00
Ondřej Surý 95d2d8399a Replace clang:stretch:amd64 build with clang:buster:amd64 build (+ add missing system test)
(cherry picked from commit 281531d82b)
2020-03-25 18:15:15 +01:00
Ondřej Surý 00f12220c0 Replace bear with compiledb and drop MAKE_COMMAND because we don't need it
(cherry picked from commit ec72d1100d)
2020-03-25 18:15:14 +01:00
Ondřej Surý 7398668e76 Adjust the GitLab CI jobs to match the new images
The custom builds (oot, asan, tsan) were mostly built using Debian sid
amd64 image.  The problem was that this image broke too easily, because
it's Debian "unstable" after all.

This commit introduces "base_image" that should be most stable with
extra bits on top (clang, coccinelle, cppcheck, ...).  Currently, that
would be Debian buster amd64.

Other changes introduced by this commit:

* Change the default clang version to 10
* Run both ASAN and TSAN with both gcc and clang compilers
* Remove Clang Debian stretch i386 job

(cherry picked from commit 5f5721aa11)
2020-03-25 18:15:11 +01:00
Ondřej Surý 4ae7af00a8 Merge branch 'ondrej/scan-build-10-fixes-v9_11' into 'v9_11'
Fix new warnings reported by scan-build from LLVM/Clang 10 (v9.11)

See merge request isc-projects/bind9!3287
2020-03-25 17:11:37 +00:00
Ondřej Surý 9b76eea08f Fix 'Dereference of null pointer' from scan-build-10
These are mostly false positives, the clang-analyzer FAQ[1] specifies
why and how to fix it:

> The reason the analyzer often thinks that a pointer can be null is
> because the preceding code checked compared it against null. So if you
> are absolutely sure that it cannot be null, remove the preceding check
> and, preferably, add an assertion as well.

The 2 warnings reported are:

byname_test.c:308:34: warning: Access to field 'fwdtable' results in a dereference of a null pointer (loaded from variable 'view')
                RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname,
                                               ^~~~~~~~~~~~~~
/builds/isc-projects/bind9/lib/isc/include/isc/util.h:318:52: note: expanded from macro 'RUNTIME_CHECK'
                                                   ^~~~
/builds/isc-projects/bind9/lib/isc/include/isc/error.h:50:21: note: expanded from macro 'ISC_ERROR_RUNTIMECHECK'
        ((void)(ISC_LIKELY(cond) ||  \
                           ^~~~
/builds/isc-projects/bind9/lib/isc/include/isc/likely.h:23:43: note: expanded from macro 'ISC_LIKELY'
                                            ^
1 warning generated.

--

./rndc.c:255:6: warning: Dereference of null pointer (loaded from variable 'host')
        if (*host == '/') {
            ^~~~~
1 warning generated.

References:
1. https://clang-analyzer.llvm.org/faq.html#null_pointer

(cherry picked from commit ddd0d356e5)
2020-03-25 18:09:20 +01:00
Ondřej Surý 138dded9d9 Fix 'Dead nested assignment's from scan-build-10
The 3 warnings reported are:

os.c:872:7: warning: Although the value stored to 'ptr' is used in the enclosing expression, the value is never actually read from 'ptr'
        if ((ptr = strtok_r(command, " \t", &last)) == NULL) {
             ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

--

rpz.c:1117:10: warning: Although the value stored to 'zbits' is used in the enclosing expression, the value is never actually read from 'zbits'
        return (zbits &= x);
                ^        ~
1 warning generated.

--

openssleddsa_link.c:532:10: warning: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err'
        while ((err = ERR_get_error()) != 0) {
                ^     ~~~~~~~~~~~~~~~
1 warning generated.

(cherry picked from commit 262f087bcf)
2020-03-25 18:08:12 +01:00
Ondřej Surý df81669a27 Merge branch 'ondrej/remove-debian-jessie-from-gitlab-ci-v9_11' into 'v9_11'
Remove Debian 8 ("Jessie") from the GitLab CI

See merge request isc-projects/bind9!3284
2020-03-25 06:29:09 +00:00
Ondřej Surý e2d6d0ee54 Remove Debian 8 ("Jessie") from the GitLab CI
There are several reason why remove Debian 8 from the CI:

* Debian 8 ("jessie") has been superseded by Debian 9 ("stretch").
* Regular security support updates have been discontinued as of
  June 17th, 2018.
* Jessie LTS is supported from 17th June 2018 to June 30, 2020.

In other words, it's no longer officially supported by Debian security
team, but by the volunteer/paid contributor composed LTS team.  And the
release will be discontinued in three months from now.  We can use the
freed CI resources to bring new platforms or just to make the jobs run a
bit faster.

(cherry picked from commit 75f46cc3d1)
2020-03-24 14:52:16 +01:00
Ondřej Surý 54e6a881fe Merge branch '4-gitlab-ci.yml-improvement-v9_11' into 'v9_11'
Improve GitLab CI configuration (v9.11)

See merge request isc-projects/bind9!3261
2020-03-20 15:14:09 +00:00
Ondřej SurýandOndřej Surý 10d671ae95 Rename MAKE environment variable to MAKE_COMMAND
The environment variable MAKE has been replaced with MAKE_COMMAND,
because overriding MAKE variable also changed the definition of the MAKE
inside the Makefiles, and we want only a single wrapper around the whole
build process.

Previously, setting `MAKE` to `bear make` meant that `bear make` would
be run at every nested make invocation, which messed up the upcoming
automake transition as compile_commands.json would be generated in every
subdirectory instead of just having one central file at the top of the
build tree.

(cherry picked from commit de1a637a69)
2020-03-20 16:13:28 +01:00
Ondřej SurýandOndřej Surý 8fa8ed29c9 Replace dependencies+needs with needs+artifacts in GitLabCI config
All jobs now use solely the newer needs configuration to declare
dependencies between jobs:

    needs:
      - job: <foo>
        artifacts: true

instead of combination of dependencies and needs which is deprecated.
This change completely unbundles the stages (alas the stages still needs
to stay because the job graph has to stay acyclic between the stages).

(cherry picked from commit 66ba808c1b)
2020-03-20 16:13:28 +01:00
Michal Nowak 6975b3a8aa Merge branch 'mnowak/abi-tracker-helper-v9.17.0-v9_11' into 'v9_11'
[v9_11] Bump BIND baseline version for abi-check

See merge request isc-projects/bind9!3271
2020-03-20 12:15:14 +00:00
Michal Nowak ba6ed67545 Bump BIND baseline version for abi-check
(cherry picked from commit 3730d59bf9)
2020-03-20 13:13:45 +01:00
Michal Nowak 1befd980e0 Merge branch 'mnowak/unit-test-debugging-enhancements-v9_11' into 'v9_11'
[v9_11] Enhance unit test debugging

See merge request isc-projects/bind9!3268
2020-03-20 10:43:39 +00:00
Michal Nowak 0603dc862e Enhance unit test debugging
When unit test fails, core file is created. Kyua's 'debug' command can
run GDB on it and provide backtrace. Unfortunately Kyua is picky about
location of these core files we opt to use custom Kyua fork and copy
core files from Kyua working directory to source tree and make it
available in GitLab.

(cherry picked from commit 94fa27e43f)
2020-03-20 11:13:35 +01:00
Matthijs Mekking c17114d132 Merge branch 'v9_11_17-release' into 'v9_11'
Apply 9.11.17 release branch

See merge request isc-projects/bind9!3264
2020-03-20 10:04:46 +00:00
Michał KępieńandMatthijs Mekking 7beca6a4ab Ensure util/check-make-install.in is exported
./configure needs util/check-make-install.in to be present in the source
directory in order to complete successfully.  Make sure this file is
included in source tarballs created from the repository.
2020-03-20 10:32:32 +01:00
Tinderbox UserandMatthijs Mekking 4236979e90 Adjust lib/isc/api version
The libisc LIBINTERFACE bump for 9.11.17 is unnecessary.
A lot of headers were altered but the ABI tool did not report anything.
Trust the ABI tool on this and decrement LIBINTERFACE and increment
LIBREVISION.
2020-03-20 10:32:32 +01:00
Tinderbox UserandMatthijs Mekking bee39b1293 Note 9.11.17 in README 2020-03-20 10:32:32 +01:00
Tinderbox UserandMatthijs Mekking 05ceac542b regen v9_11
Michal caught at the last moment that a CHANGES entry did
not have a GitLab issue/mr reference.  This check was omitted from
the release process documentation.  The wiki is updated and the
CHANGES file is updated in this commit.
2020-03-20 10:32:28 +01:00
Tinderbox UserandMatthijs Mekking d050ec2429 prep 9.11.17
Bumped the version file and added release line in CHANGES.

API files:
- lib/bind9/api:
  No changes because only changes in comments.
- lib/dns/api:
  Increment LIBINTERFACE because of the added field structure in
  dns_struct_update.
- lib/isc/api:
  Increment LIBINTERFACE because of the PKCS#11 replacement.
- lib/isccc/api:
  No changes because no source code changes.
- lib/isccfg/api:
  Increment LIBREVISION because of minor source code changes.
- lib/lwres/api:
  No changes because no source code changes.

I decided no changes to README.md or the release notes were necessary.

Perflab graphs look sane.
2020-03-20 10:31:29 +01:00
Ondřej Surý 05c2c35cdb Merge branch 'ondrej/remove-serve-stale-options-from-v9_11' into 'v9_11'
Remove serve stale options from v9 11

See merge request isc-projects/bind9!3265
2020-03-19 11:18:35 +00:00
Ondřej Surý 6641024bab Revert "arm: document resolver-nonbackoff-tries and resolver-retry-interval"
This reverts commit bedefad22d.
2020-03-19 11:59:38 +01:00
Mark Andrews 0fa64e6682 Merge branch '1679-handle-systems-with-broken-gettimeofday-system-calls' into 'v9_11'
Resolve "Handle systems with broken gettimeofday system calls"

See merge request isc-projects/bind9!3232
2020-03-18 07:20:37 +00:00
Mark Andrews 0ddfa675e4 Just return tv_sec field 2020-03-18 06:36:10 +00:00
Evan Hunt 4b1e020deb Merge branch 'each-lgtm-fixes-v9_11' into 'v9_11'
fix LGTM warnings

See merge request isc-projects/bind9!3250
2020-03-18 00:07:39 +00:00
Ondřej SurýandEvan Hunt 5ae4d3d94a Add C11 localtime_r and gmtime_r shims for Windows
On Windows, C11 localtime_r() and gmtime_r() functions are not
available.  While localtime() and gmtime() functions are already thread
safe because they use Thread Local Storage, it's quite ugly to #ifdef
around every localtime_r() and gmtime_r() usage to make the usage also
thread-safe on POSIX platforms.

The commit adds wrappers around Windows localtime_s() and gmtime_s()
functions.

NOTE: The implementation of localtime_s and gmtime_s in Microsoft CRT
are incompatible with the C standard since it has reversed parameter
order and errno_t return type.

(cherry picked from commit 08f4c7d6c0)
2020-03-17 15:45:35 -07:00
Evan Hunt bdb8e3ad85 silence a warning about unsafe snprintf() call
(cherry picked from commit ec95b84e8d)
2020-03-17 15:42:14 -07:00
Evan Hunt c16c095b32 replace unsafe ctime() and gmtime() function calls
This silences LGTM warnings that these functions are not thread-safe.

(cherry picked from commit 5703f70427)
2020-03-17 15:39:08 -07:00
Evan Hunt beaca3e8db remove or comment empty conditional branches
some empty conditional branches which contained a semicolon were
"fixed" by clang-format to contain nothing. add comments to prevent this.

(cherry picked from commit 735be3b816)
2020-03-17 15:39:03 -07:00
Evan Hunt fa320d03a2 Merge branch '1684-timer-test-build-v9_11' into 'v9_11'
fix a pointer-to-int cast error

See merge request isc-projects/bind9!3248
2020-03-17 20:27:23 +00:00
Evan Hunt 1dbd238c15 fix a pointer-to-int cast error
(cherry picked from commit 6b76646037)
2020-03-17 13:16:07 -07:00
Michał Kępień 6c93fb890d Merge branch 'michal/update-gitlab-ci-to-freebsd-12.1-v9_11' into 'v9_11'
[v9_11] Update GitLab CI to FreeBSD 12.1

See merge request isc-projects/bind9!3241
2020-03-16 19:05:32 +00:00
Michał Kępień e81e1fc458 Move FreeBSD CI jobs to libvirt-based executors
To get rid of the currently used FreeBSD-specific executor, move FreeBSD
CI jobs to libvirt-based executors.  Make the necessary tag and variable
adjustments.

(cherry picked from commit 80618b5378)
2020-03-16 11:40:18 +01:00
Michał Kępień cc39ce5b04 Update GitLab CI to FreeBSD 12.1
Since FreeBSD 12.1 is the current FreeBSD 12.x release, replace FreeBSD
12.0 GitLab CI jobs with their up-to-date counterparts.

(cherry picked from commit 4c68b56246)
2020-03-16 11:40:16 +01:00