mirror of
https://github.com/isar/libmdbx.git
synced 2025-11-07 07:18:56 +08:00
mdbx: Merge branch 'master' into devel.
Change-Id: Ic130cd181097332aa2f49019d75403e18d8cba0d
This commit is contained in:
@@ -1387,7 +1387,7 @@ MDBX_INTERNAL_FUNC int mdbx_mmap(const int flags, mdbx_mmap_t *map,
|
||||
MDBX_INTERNAL_FUNC int mdbx_munmap(mdbx_mmap_t *map) {
|
||||
VALGRIND_MAKE_MEM_NOACCESS(map->address, map->current);
|
||||
/* Unpoisoning is required for ASAN to avoid false-positive diagnostic
|
||||
* when this memory will re-used by malloc or another mmaping.
|
||||
* when this memory will re-used by malloc or another mmapping.
|
||||
* See https://github.com/erthink/libmdbx/pull/93#issuecomment-613687203 */
|
||||
ASAN_UNPOISON_MEMORY_REGION(map->address, map->limit);
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
@@ -1673,7 +1673,7 @@ retry_mapview:;
|
||||
if (unlikely(ptr == MAP_FAILED)) {
|
||||
VALGRIND_MAKE_MEM_NOACCESS(map->address, map->current);
|
||||
/* Unpoisoning is required for ASAN to avoid false-positive diagnostic
|
||||
* when this memory will re-used by malloc or another mmaping.
|
||||
* when this memory will re-used by malloc or another mmapping.
|
||||
* See https://github.com/erthink/libmdbx/pull/93#issuecomment-613687203
|
||||
*/
|
||||
ASAN_UNPOISON_MEMORY_REGION(map->address, map->limit);
|
||||
@@ -1691,7 +1691,7 @@ retry_mapview:;
|
||||
if (map->address != ptr) {
|
||||
VALGRIND_MAKE_MEM_NOACCESS(map->address, map->current);
|
||||
/* Unpoisoning is required for ASAN to avoid false-positive diagnostic
|
||||
* when this memory will re-used by malloc or another mmaping.
|
||||
* when this memory will re-used by malloc or another mmapping.
|
||||
* See https://github.com/erthink/libmdbx/pull/93#issuecomment-613687203
|
||||
*/
|
||||
ASAN_UNPOISON_MEMORY_REGION(map->address, map->limit);
|
||||
|
||||
Reference in New Issue
Block a user