2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00
Commit Graph

29998 Commits

Author SHA1 Message Date
Ondřej Surý
2e304b0b7f Change dns_tsigkey_identity from macro to a function and const argument and result 2019-10-03 09:04:26 +02:00
Ondřej Surý
4d2697b31c Constify dns_name_t *signer argument to dns_acl_allowed() 2019-10-03 09:04:26 +02:00
Ondřej Surý
476277a6e6 bin/named/server.c: Fix couple of DbC conditions reported by Cppcheck 2019-10-03 09:04:26 +02:00
Ondřej Surý
9366ca769f bin/dig/dighost.c: Fix REQUIRE(!= NULL) condition after the variable has been dereferenced 2019-10-03 09:04:26 +02:00
Ondřej Surý
9ab16d10d4 bin/delv/delv.c: Fix invalid logic operation in REQUIRE() condition 2019-10-03 09:04:26 +02:00
Ondřej Surý
f55dc51f42 Add Cppcheck job to the CI
This MR changes the default Debian sid build to wrap make with bear
that creates compilation database and use the compilation database
to run Cppcheck on the source files systematically.

The job is currently set to be allowed to fail as it will take some
time to fix all the Cppcheck detected issues.
2019-10-03 09:04:26 +02:00
Ondřej Surý
5be620bd35 Merge branch '1119-disable-time-consuming-tests-benchmarks-when-tsan-is-enabled' into 'master'
Disable time consuming tests when compiling with Thread Sanitizer

See merge request isc-projects/bind9!2365
2019-10-02 08:49:00 -04:00
Ondřej Surý
2230b9d55d Disable benchmark tests when Thread Sanitizer is enabled 2019-10-02 14:09:33 +02:00
Ondřej Surý
8828a41077 Declare __SANITIZE_THREAD__ in isc/util.h when clang ThreadSanitizer is used 2019-10-02 14:09:33 +02:00
Ondřej Surý
86983405f2 Merge branch '1119-tsan-lib/isc/tests/timer_test.c' into 'master'
Convert all variables accessed between multiple threads to atomic

See merge request isc-projects/bind9!2364
2019-10-02 08:06:13 -04:00
Ondřej Surý
e06a34674a Convert all variables accessed between multiple threads to atomic 2019-10-02 13:41:45 +02:00
Ondřej Surý
3a0a69a9cd Merge branch '1119-tsan-lib/isc/tests/task_test.c' into 'master'
Convert all variables accessed between multiple threads to atomic

See merge request isc-projects/bind9!2363
2019-10-02 07:38:10 -04:00
Ondřej Surý
07879f354c Properly initialize atomic variables 2019-10-02 13:09:33 +02:00
Ondřej Surý
76e954124a lib/isc/tests/task_test.c: Convert all variables accessed between multiple threads to atomic 2019-10-02 13:09:28 +02:00
Ondřej Surý
91e2deede6 Merge branch '1119-tsan-lib/dns/zone.c-flags' into 'master'
Convert the dns_zone_t flags, options and keyopts to stdatomic

See merge request isc-projects/bind9!2359
2019-10-02 07:08:35 -04:00
Ondřej Surý
9b0d4f520e Convert DNS_ZONEKEY_, DNS_ZONEFLG_ and DNS_ZONELOADFLAG_ #defines to enums 2019-10-02 12:41:12 +02:00
Ondřej Surý
679ef8bb95 Fix miscelaneous zone object validity checking errors (missing REQUIRE(), out of order REQUIRE()) 2019-10-02 12:41:12 +02:00
Ondřej Surý
2638337826 Convert the flags, options, and keyopts of dns_zone_t structure to 64-bit stdatomic types
...and use atomic_fetch_or and atomic_fetch_and to set and clear the flags
2019-10-02 12:41:12 +02:00
Ondřej Surý
e1b24a4dfe Merge branch '1119-tsan-dispatch_test.c' into 'master'
lib/dns/tests/dispatch_test.c: Convert global responses variable to atomic to prevent data race

See merge request isc-projects/bind9!2355
2019-10-02 06:39:28 -04:00
Ondřej Surý
55a3217fe7 Convert global variables to atomic to prevent possible data race 2019-10-02 12:09:44 +02:00
Stephen Morris
2aec2e6425 Merge branch 'stephen/update-release-template' into 'master'
Update release checklist template

See merge request isc-projects/bind9!2428
2019-10-02 05:15:26 -04:00
Stephen Morris
27b98a1e78 Update release template
Include a step stating that tags for the published releases must
be created in the public repository.
2019-10-02 09:28:21 +01:00
Evan Hunt
9c0262f1c9 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!2427
2019-10-02 01:08:05 -04:00
Evan Hunt
0d65990741 placeholder 2019-10-01 22:07:31 -07:00
Evan Hunt
3520d62b07 Merge branch '1191-qmin-fetch-failure' into 'master'
SERVFAIL if a prior qmin fetch has not been canceled when a new one starts

See merge request isc-projects/bind9!2416
2019-10-02 00:13:07 -04:00
Evan Hunt
1d741c5c0f CHANGES 2019-10-01 20:47:45 -07:00
Evan Hunt
488cb4da10 SERVFAIL if a prior qmin fetch has not been canceled when a new one starts 2019-10-01 20:41:53 -07:00
Ondřej Surý
879c0f4cf6 Merge branch 'ondrej/fix-coccinelle-detected-issues' into 'master'
Various little fixes found by coccinelle

See merge request isc-projects/bind9!2325
2019-10-01 11:17:45 -04:00
Ondřej Surý
288f5a4b52 Various little fixes found by coccinelle
The coccinellery repository provides many little semantic patches to fix common
problems in the code.  The number of semantic patches in the coccinellery
repository is high and most of the semantic patches apply only for Linux, so it
doesn't make sense to run them on regular basis as the processing takes a lot of
time.

The list of issue found in BIND 9, by no means complete, includes:

- double assignment to a variable
- `continue` at the end of the loop
- double checks for `NULL`
- useless checks for `NULL` (cannot be `NULL`, because of earlier return)
- using `0` instead of `NULL`
- useless extra condition (`if (foo) return; if (!foo) { ...; }`)
- removing & in front of static functions passed as arguments
2019-10-01 16:48:55 +02:00
Ondřej Surý
c2e8a111f5 Merge branch 'ondrej/fix-gitlab-ci-for-master-branch-v2' into 'master'
Fix the triggering rule for autoreconf job (take 2)

See merge request isc-projects/bind9!2424
2019-10-01 10:43:56 -04:00
Ondřej Surý
afa6d88e21 Fix the triggering rule for autoreconf job (take 2) 2019-10-01 16:42:33 +02:00
Ondřej Surý
7b33f048b0 Merge branch 'ondrej/fix-gitlab-ci-for-master-branch' into 'master'
Fix docs -> autoreconf dependencies in the .gitlab-ci.yml

See merge request isc-projects/bind9!2423
2019-10-01 10:32:27 -04:00
Ondřej Surý
978476934c Fix docs -> autoreconf dependencies in the .gitlab-ci.yml 2019-10-01 16:29:33 +02:00
Ondřej Surý
7b554b0e46 Merge branch 'ondrej/use-%zu-for-sizeof-formatting' into 'master'
lib/dns/ssu_external.c: Use %zu for formatting sizeof() output

See merge request isc-projects/bind9!2415
2019-10-01 10:25:22 -04:00
Ondřej Surý
395741f9ad lib/dns/ssu_external.c: Use %zu for formatting sizeof() output 2019-10-01 16:24:29 +02:00
Mark Andrews
e7f0a252a1 Merge branch 'marka-placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!2422
2019-10-01 09:12:09 -04:00
Mark Andrews
738e4cb0fe placeholder 2019-10-01 22:56:53 +10:00
Mark Andrews
cca33260f2 Merge branch 'marka-remove-unused-variable' into 'master'
remove unused variable

See merge request isc-projects/bind9!2418
2019-09-30 23:11:52 -04:00
Mark Andrews
dfcc9e18cb remove unused variable 2019-10-01 12:47:26 +10:00
Mark Andrews
066e860f8f Merge branch 'marka-missing-runtime-check' into 'master'
missing RUNTIME_CHECK

See merge request isc-projects/bind9!2265
2019-09-30 21:10:28 -04:00
Mark Andrews
346624fe38 add CHANGES 2019-10-01 10:44:06 +10:00
Ondřej Surý
69ecc711ac Move the failure handling block closer to the only place where it could fail 2019-10-01 10:43:26 +10:00
Ondřej Surý
c2dad0dcb2 Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf()
Use the semantic patch from the previous commit to replace all the calls to
dns_name_copy() with NULL as third argument with dns_name_copynf().
2019-10-01 10:43:26 +10:00
Ondřej Surý
ac26ecf540 Add semantic patch to replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf 2019-10-01 10:43:26 +10:00
Ondřej Surý
f7aef3738a Split dns_name_copy() into dns_name_copy() and dns_name_copynf()
The dns_name_copy() function followed two different semanitcs that was driven
whether the last argument was or wasn't NULL.  This commit splits the function
in two where now third argument to dns_name_copy() can't be NULL and
dns_name_copynf() doesn't have third argument.
2019-10-01 10:43:26 +10:00
Ondřej Surý
5efa29e03a The final round of adding RUNTIME_CHECK() around dns_name_copy() calls
This commit was done by hand to add the RUNTIME_CHECK() around stray
dns_name_copy() calls with NULL as third argument.  This covers the edge cases
that doesn't make sense to write a semantic patch since the usage pattern was
unique or almost unique.
2019-10-01 10:43:26 +10:00
Ondřej Surý
89b269b0d2 Add RUNTIME_CHECK() around result = dns_name_copy(..., NULL) calls
This second commit uses second semantic patch to replace the calls to
dns_name_copy() with NULL as third argument where the result was stored in a
isc_result_t variable.  As the dns_name_copy(..., NULL) cannot fail gracefully
when the third argument is NULL, it was just a bunch of dead code.

Couple of manual tweaks (removing dead labels and unused variables) were
manually applied on top of the semantic patch.
2019-10-01 10:43:26 +10:00
Ondřej Surý
35bd7e4da0 Add RUNTIME_CHECK() around plain dns_name_copy(..., NULL) calls using spatch
This commit add RUNTIME_CHECK() around all simple dns_name_copy() calls where
the third argument is NULL using the semantic patch from the previous commit.
2019-10-01 10:43:26 +10:00
Ondřej Surý
406eba0c41 Add semantic patches to correctly check dns_name_copy(..., NULL) return code
The dns_name_copy() function cannot fail gracefully when the last argument
(target) is NULL.  Add RUNTIME_CHECK()s around such calls.

The first semantic patch adds RUNTIME_CHECK() around any call that ignores the
return value and is very safe to apply.

The second semantic patch attempts to properly add RUNTIME_CHECK() to places
where the return value from `dns_name_copy()` is recorded into `result`
variable.  The result of this semantic patch needs to be reviewed by hand.

Both patches misses couple places where the code surrounding the
`dns_name_copy(..., NULL)` usage is more complicated and is better suited to be
fixed by a human being that understands the surrounding code.
2019-10-01 10:43:26 +10:00
Ondřej Surý
98886bab43 Merge branch '846-dig-idn-alabel-fallback' into 'master'
Resolve "dig cannot display ACE query if locale is not unicode"

Closes #846

See merge request isc-projects/bind9!1418
2019-09-30 05:49:01 -04:00