mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 15:47:37 +01:00
msync() also may be called on unaligned address.
This commit is contained in:
parent
4454413242
commit
2709abc883
2 changed files with 3 additions and 3 deletions
|
@ -103,9 +103,9 @@ validate_mem (unw_word_t addr)
|
|||
}
|
||||
|
||||
#ifdef HAVE_MINCORE
|
||||
if (mincore ((void *) addr, 1, mvec) == -1)
|
||||
if (mincore ((void *) addr, sizeof (unw_word_t), mvec) == -1)
|
||||
#else
|
||||
if (msync ((void *) addr, 1, MS_ASYNC) == -1)
|
||||
if (msync ((void *) addr, sizeof (unw_word_t), MS_ASYNC) == -1)
|
||||
#endif
|
||||
return -1;
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ validate_mem (unw_word_t addr)
|
|||
#ifdef HAVE_MINCORE
|
||||
if (mincore ((void *) addr, sizeof (unw_word_t), mvec) == -1)
|
||||
#else
|
||||
if (msync ((void *) addr, 1, MS_ASYNC) == -1)
|
||||
if (msync ((void *) addr, sizeof (unw_word_t), MS_ASYNC) == -1)
|
||||
#endif
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue