Skip to content
Commit fd9f7b90 authored by zhanglimin's avatar zhanglimin Committed by wanglei
Browse files

[lsan][test] Obtaining page size using sysconf(_SC_PAGESIZE)

The effectiveness of the mprotect function depends on whether
the first argument is aligned to a page boundary. If mprotect
doesn't work, the kernel will not generate a SIGSEGV signal for
the process when the calling process tries to access memory in
a manner that violates the protection. If so, this test fails.

The problem for this test is that it uses a fixed 4 kB page size
and is aligned. This fails when the page size is not 4 kB. For
example, this fails on LoongArch which uses a 16 kB pagesize.

Reviewed By: SixWeining, xen0n, MaskRay, vitalybuka

Differential Revision: https://reviews.llvm.org/D148407
parent dc2b8ae9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment