Merge branch '2166-bind-9-16-7-trap-divide-error-v9_16' into 'v9_16'
Resolve "bind 9.16.7 trap divide error" See merge request isc-projects/bind9!4152
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
||||
5506. [bug] Properly handle failed sysconf() calls, so we don't
|
||||
report invalid memory size. [GL #2166]
|
||||
|
||||
5505. [bug] Updating contents of a mixed-case RPZ could cause some
|
||||
rules to be ignored. [GL #2169]
|
||||
|
||||
|
||||
@@ -42,3 +42,7 @@ Bug Fixes
|
||||
- Updating contents of an RPZ zone which contained names spelled using
|
||||
varying letter case could cause some processing rules in that RPZ zone
|
||||
to be erroneously ignored. [GL #2169]
|
||||
|
||||
- `named` would report invalid memory size when running in an environment
|
||||
that doesn't properly report number of available memory pages or pagesize.
|
||||
[GL #2166]
|
||||
|
||||
@@ -35,7 +35,14 @@ isc_meminfo_totalphys(void) {
|
||||
#endif /* if defined(CTL_HW) && (defined(HW_PHYSMEM64) || defined(HW_MEMSIZE)) \
|
||||
* */
|
||||
#if defined(_SC_PHYS_PAGES) && defined(_SC_PAGESIZE)
|
||||
return ((size_t)(sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE)));
|
||||
long pages = sysconf(_SC_PHYS_PAGES);
|
||||
long pagesize = sysconf(_SC_PAGESIZE);
|
||||
|
||||
if (pages == -1 || pagesize == -1) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
return ((size_t)pages * pagesize);
|
||||
#endif /* if defined(_SC_PHYS_PAGES) && defined(_SC_PAGESIZE) */
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user