1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-22 23:47:39 +01:00

msync() also may be called on unaligned address.

This commit is contained in:
Konstantin Belousov 2010-04-21 15:33:37 +03:00
parent 4454413242
commit 2709abc883
2 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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;