summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts/all.T
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2018-09-17 22:06:05 +0100
committerTamar Christina <tamar@zhox.com>2018-09-17 22:30:51 +0100
commit5840734379da5d494a368d0b8a6edf1b1216a7f4 (patch)
tree212d129ab357655f4361b04a0e1a27c82c586461 /testsuite/tests/rts/all.T
parente655aac18c5b240f27fcaf26317ad87be5ce8b96 (diff)
downloadhaskell-5840734379da5d494a368d0b8a6edf1b1216a7f4.tar.gz
Updated PE linker, section alignment and cleanup.
Summary: This patch is to address a couple of short comings of the PE linker. The first thing it does is properly honor section alignments, so SSE code will work reliably. While doing this I've also changed how it reads and stores ObjectFile information. Previously the entire object file was read in and treated as one blob, including headers, symbol tables etc. Now the ObjectFile is read in but stored in chunks, tables go into a temporary info struct and code/data into a new private heap. This allows me to free all meta data once we're done relocating. Which means we can reclaim this memory. As I've mentioned above I've also moved from using VirtualAlloc to HeapAlloc. The reason is VirtualAlloc is meant to be used for more low level memory allocation, it's very fast because it can only allocate whole blocks, (64k) by default, and the memory must be paged (4k) aligned. So when you ask for e.g. 30k of memory, you're given a whole block where 34k will be wasted memory. Nothing else can ever access that untill you free the 30k. One downside of HeapAlloc is that you're not in control of how the heap grows, and heap memory is always committed. So it's harder to tell how much we're actually using now. Another big upside of splitting off the ObjectCode tables to info structs is that I can adjust them, so that later addressings can just use array subscripts to index into them. This simplifies the code a lot and a lot of complicated casts and indexing can be removed. Leaving less and more simple code. This patch doesn't fix the memprotection but it doesn't regress it either. It does however make the next changes smaller and fixes the alignments. Test Plan: ./validate , new test T13617 Reviewers: bgamari, erikd, simonmar, hvr, angerman Reviewed By: angerman Subscribers: nickkuk, carter, RyanGlScott, rwbarton, thomie GHC Trac Issues: #13617 Differential Revision: https://phabricator.haskell.org/D3915
Diffstat (limited to 'testsuite/tests/rts/all.T')
-rw-r--r--testsuite/tests/rts/all.T3
1 files changed, 3 insertions, 0 deletions
diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T
index 6e1d90d795..eb06dcc0c0 100644
--- a/testsuite/tests/rts/all.T
+++ b/testsuite/tests/rts/all.T
@@ -391,6 +391,9 @@ test('T12497', [ unless(opsys('mingw32'), skip)
],
run_command, ['$MAKE -s --no-print-directory T12497'])
+test('T13617', [ unless(opsys('mingw32'), skip)],
+ run_command, ['$MAKE -s --no-print-directory T13617'])
+
# This test sometimes produces out of sequence samples in the profasm way, but
# not reliably, so we just skip it. See ticket #15065.
# Test is being skipped on darwin due to it's flakiness.