Ondřej Surý
fe738c7432
Exclude isc_mem_isovermem from ThreadSanitizer
...
The .is_overmem member of isc_mem_t structure is intentionally accessed
unlocked as 100% accuracy isn't necessary here.
Without the attribute, following TSAN warning would show up:
WARNING: ThreadSanitizer: data race
Write of size 1 at 0x000000000001 by thread T1 (mutexes: write M1, write M2):
#0 isc___mem_put lib/isc/mem.c:1119:19
#1 isc__mem_put lib/isc/mem.c:2439:2
#2 dns_rdataslab_fromrdataset lib/dns/rdataslab.c:327:2
#3 addrdataset lib/dns/rbtdb.c:6761:11
#4 dns_db_addrdataset lib/dns/db.c:719:10
#5 cache_name lib/dns/resolver.c:6538:13
#6 cache_message lib/dns/resolver.c:6628:14
#7 resquery_response lib/dns/resolver.c:7883:13
#8 dispatch lib/isc/task.c:1152:7
#9 run lib/isc/task.c:1344:2
Previous read of size 1 at 0x000000000001 by thread T2 (mutexes: write M3):
#0 isc_mem_isovermem lib/isc/mem.c:1553:15
#1 addrdataset lib/dns/rbtdb.c:6866:25
#2 dns_db_addrdataset lib/dns/db.c:719:10
#3 addoptout lib/dns/ncache.c:281:10
#4 dns_ncache_add lib/dns/ncache.c:101:10
#5 ncache_adderesult lib/dns/resolver.c:6668:12
#6 ncache_message lib/dns/resolver.c:6845:11
#7 rctx_ncache lib/dns/resolver.c:9174:11
#8 resquery_response lib/dns/resolver.c:7894:2
#9 dispatch lib/isc/task.c:1152:7
#10 run lib/isc/task.c:1344:2
Location is heap block of size 328 at 0x000000000020 allocated by thread T3:
#0 malloc <null>
#1 default_memalloc lib/isc/mem.c:713:8
#2 mem_create lib/isc/mem.c:763:8
#3 isc_mem_create lib/isc/mem.c:2425:2
#4 configure_view bin/named/server.c:4494:4
#5 load_configuration bin/named/server.c:9062:3
#6 run_server bin/named/server.c:9771:2
#7 dispatch lib/isc/task.c:1152:7
#8 run lib/isc/task.c:1344:2
[...]
SUMMARY: ThreadSanitizer: data race lib/isc/mem.c:1119:19 in isc___mem_put
(cherry picked from commit 0110d1ab17 )
2020-09-17 17:39:03 +02:00
Evan Hunt
400171aee8
update all copyright headers to eliminate the typo
2020-09-14 17:00:40 -07:00
Matthijs Mekking and Ondřej Surý
ea477e114b
mem.c: delay assignment until after REQUIRE
2020-02-08 06:32:42 -08:00
Matthijs Mekking and Ondřej Surý
c8959c0e3a
Check for basic blocks not NULL
2020-02-08 06:32:42 -08:00
Mark Andrews
07e5969fe0
suppress cppcheck warning: leakNoVarFunctionCall
2019-10-02 09:25:00 +10:00
Mark Andrews
73c1a7e03b
fix cppcheck warnings: unreadVariable
2019-10-02 09:25:00 +10:00
Ondřej Surý
0c6c59a289
Use isc__strerror instead of strerror_r in v9_11 branch
2018-12-21 09:26:50 +01:00
Ondřej Surý and Ondřej Surý
7d9e19b5eb
Abort on allocation failure only if the memory functions are used internally in BIND 9
...
(cherry picked from commit c22241ae9009391c1d28085c5cf0009a6caef09c)
2018-12-21 03:03:24 -05:00
Ondřej Surý and Ondřej Surý
c73912278b
Abort on memory allocation failure
...
(cherry picked from commit 8de2451756 )
2018-12-21 03:03:24 -05:00
Ondřej Surý
2f8b28efad
Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached
...
(cherry picked from commit 23fff6c569 )
(cherry picked from commit 4568669807 )
2018-11-08 22:42:52 +07:00
Mark Andrews and Evan Hunt
a21b1b86dc
mempool didn't work for sizes less than sizeof(void*)
...
(cherry picked from commit 5dd1beec8e )
2018-08-14 09:12:41 -07:00
Ondřej Surý
1084b40b44
Replace custom isc_boolean_t with C standard bool type
...
(cherry picked from commit 994e656977 )
(cherry picked from commit 884929400c )
2018-08-10 15:20:57 +02:00
Ondřej Surý
aaa76dc654
Replace custom isc_u?intNN_t types with C99 u?intNN_t types
...
(cherry picked from commit cb6a185c69 )
(cherry picked from commit d61e6a3111 )
2018-08-10 15:20:57 +02:00
Ondřej Surý
bfc6a25f2d
Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants
...
(cherry picked from commit 64fe6bbaf2 )
(cherry picked from commit c863a076ae )
2018-08-10 15:20:57 +02:00
Evan Hunt
8b205089b7
update file headers to remove copyright years
2018-03-14 16:40:20 -07:00
Tinderbox User
dc2a85bed7
update copyright notice / whitespace
2018-01-04 23:46:19 +00:00
Mark Andrews
3b8a3c43a0
unconditionally typedef summarystat_t for coverity
...
(cherry picked from commit a0e66ef6dd )
2018-01-05 10:11:21 +11:00
Tinderbox User
a1cf2291a9
update copyright notice / whitespace
2017-12-06 23:46:07 +00:00
Mukund Sivaraman
16f43564c6
Backport performance work to 9.11 ( #45637 )
2017-12-06 10:35:21 +05:30
Mark Andrews
ad1317338a
4748. [cleanup] Sprintf to snprintf coversions. [RT #46132 ]
...
(cherry picked from commit a009d03a1a )
2017-10-03 14:55:33 +11:00
Mark Andrews
5a93d3be4e
more str{n}{cat,cpy} corrections rt45981_stage2
...
(cherry picked from commit cb629cdeda )
2017-09-14 18:33:02 +10:00
Tinderbox User
6fb9b25791
update copyright notice / whitespace
2017-07-21 23:46:43 +00:00
Mark Andrews
bfde61d519
4654. [cleanup] Don't use C++ keywords delete, new and namespace.
...
[RT #45538 ]
(cherry picked from commit 4bf32aa587 )
2017-07-21 12:28:58 +10:00
Mark Andrews
0c27b3fe77
4401. [misc] Change LICENSE to MPL 2.0.
2016-06-27 14:56:38 +10:00
Witold Krecicki
7a00d69909
4376. [experimental] Added support for Catalog Zones, a new method for
...
provisioning secondary servers in which a list of
zones to be served is stored in a DNS zone and can
be propagated to slaves via AXFR/IXFR. [RT #41581 ]
4375. [func] Add support for automatic reallocation of isc_buffer
to isc_buffer_put* functions. [RT #42394 ]
2016-05-26 21:23:19 +02:00
Tinderbox User
220ba6da87
update copyright notice / whitespace
2016-03-04 23:45:23 +00:00
Evan Hunt and Mukund Sivaraman
d4ed29b019
[rt41656] line length
...
(cherry picked from commit 6957e9451cc7bf89d44716dfe4266281867e00e5)
2016-03-04 13:01:54 +05:30
Mukund Sivaraman
9da98335c1
Code cleanups ( #41656 )
2016-03-04 12:18:17 +05:30
Evan Hunt
fc5f1971a1
[master] fix build error with ISC_MEM_TRACKLINES=0
2015-07-09 14:23:29 -07:00
Mukund Sivaraman
fba894c98b
Some cleanups in isc mem code ( #38896 )
2015-03-27 23:12:11 +05:30
Mukund Sivaraman
24f2cc7d06
Fix a possible race in updating stats counters ( #38826 )
...
and do some other isc mem cleanups.
2015-03-09 10:30:47 +05:30
Mukund Sivaraman
5a505fc4c2
Add facility to run system test nameds under Valgrind ( #38546 )
2015-02-25 09:06:45 +05:30
Evan Hunt
84ee90b52d
[master] fix 'total use' accounting
...
4046. [bug] Accounting of "total use" in memory context
statistics was not correct. [RT #38370 ]
2015-01-22 09:44:24 -08:00
Tinderbox User
c110d61b17
update copyright notice / whitespace
2015-01-20 23:45:26 +00:00
Evan Hunt
11463c0ac2
[master] clean up gcc -Wshadow warnings
...
4039. [cleanup] Cleaned up warnings from gcc -Wshadow. [RT #37381 ]
2015-01-20 13:29:18 -08:00
Mark Andrews
50a7454174
3868. [bug] isc_mem_setwater incorrectly cleared hi_called
...
potentially leaving over memory cleaner running.
[RT #35270 ]
2014-06-02 16:31:42 +10:00
Evan Hunt
b454c03196
[master] use ANSI prototypes, clean up some casts
2014-03-04 10:42:25 -08:00
Tinderbox User
431a83fb29
update copyright notice
2014-01-09 23:46:35 +00:00
Evan Hunt
e851ea8260
[master] replace memcpy() with memmove().
...
3698. [cleanup] Replaced all uses of memcpy() with memmove().
[RT #35120 ]
2014-01-08 16:39:05 -08:00
Mark Andrews
c3c8823fed
3681. [port] Update the Windows build system to support feature
...
selection and WIN64 builds. This is a work in
progress. [RT #34160 ]
2013-12-04 12:47:23 +11:00
Mark Andrews
45b727f651
silence coverity warnings
2013-04-11 17:07:50 +10:00
Tinderbox User
12253af346
update copyright notice
2013-04-10 23:46:01 +00:00
Evan Hunt
b99bfa184b
[master] unify internal and export libraries
...
3550. [func] Unified the internal and export versions of the
BIND libraries, allowing external clients to use
the same libraries as BIND. [RT #33131 ]
2013-04-10 13:49:57 -07:00
Tinderbox User
22dd28c5bc
update copyright notice
2013-03-13 23:46:08 +00:00
Evan Hunt
feb067b25a
[master] add JSON statistics channel
...
3524. [func] Added an alternate statistics channel in JSON format,
when the server is built with the json-c library:
http://[address]:[port]/json . [RT #32630 ]
2013-03-13 14:24:50 -07:00
Mark Andrews
07cab7ffa8
improve isc_mempool_put memory model
2012-11-02 16:02:15 +11:00
Mark Andrews
ffd17aca38
move memory accounting to before free of memory to avoid "using" a pointer after it is freed
2012-11-02 15:57:56 +11:00
Mark Andrews
d9baadbb0c
add coverity[+free : arg-1] directive
2012-11-02 11:16:32 +11:00
Tinderbox User
fcd7c22fdf
update copyright notice
2012-10-31 23:45:49 +00:00
Mark Andrews
bbf31e6b62
More coverity fixes:
...
3410. [bug] Addressed Coverity warnings. [RT #31626 ]
Squashed commit of the following:
commit 6fec07bbb69ead784063052f2099674f8b52c6b3
Author: Mark Andrews <marka@isc.org >
Date: Tue Oct 30 18:14:35 2012 +1100
use strl{cat,cpy}
commit 19a5d3766f3dbc8a2944b21640a8226a89aae7ba
Author: Mark Andrews <marka@isc.org >
Date: Tue Oct 30 14:38:55 2012 +1100
address unchecked xmlTextWriter* calls
2012-11-01 10:22:11 +11:00