Age | Commit message (Collapse) | Author |
|
This fixes tests in PUGIXML_NO_XPATH mode on SPARC64 (#48).
SPARC does not allow unaligned accesses - e.g. you can't read an unaligned int.
Normally pugixml does not perform unaligned integer/pointer accesses, but page
heap can allocate blocks that are not aligned so that we can detect a single-
byte read/write overrun.
Additionally, the hardcoded page size we're currently using is really system
specific - on SPARC the page size can be 8 Kb instead of 4 Kb so mprotect can
fail.
|
|
|
|
Address sanitizer can detect underflows so we don't really need the custom
allocator.
Additionally, custom allocator can return memory that is not pointer-aligned;
this causes undefined behavior sanitizer to complain.
|
|
|
|
Switch to malloc and manually aligning the pointer to the page boundary.
mmap is much slower than malloc; this change makes tests ~4x faster.
|
|
Rename PAGE_SIZE to page_size to avoid define conflict with Android SDK.
Minor fixes in several tests.
|
|
Align allocations to right end of page boundary to catch buffer overruns,
instead of unmapping on deallocations mark the page as no-access to guarantee
a page fault on use-after-free.
|
|
This should never happen but can improve debugging experience for
work-in-progress changes since that avoids memcpy() into negative memory
space (debugger can't backtrace from failed memcpy since it does not set
up the stack frame).
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1070 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: https://pugixml.googlecode.com/svn/trunk@1030 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@834 99668b35-9821-0410-8761-19e4c4f06640
|
|
-Wold-style-cast), fixed the code accordingly
git-svn-id: http://pugixml.googlecode.com/svn/trunk@800 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@711 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@623 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@607 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@602 99668b35-9821-0410-8761-19e4c4f06640
|
|
git-svn-id: http://pugixml.googlecode.com/svn/trunk@383 99668b35-9821-0410-8761-19e4c4f06640
|