| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This reverts commit d85044f6b201eae0a9e453b89c0433608e0778f0.
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 6770663f764db76dbb7138ccb3aea0527d194151.
If the program enters the garbage collector with the closure
lock held, it will confuse the garbage collector and will
result in an infinite loop in evacuate().
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When servicing a stack overflows, only throw an exception to the given
thread if the user explicitly set a max stack size, using +RTS -K.
Otherwise just service it normally and grow the stack.
In case we actually run out of *heap* (stack chuncks are allocated on
the heap), then we need to bail by calling the stackOverflow() hook and
exit immediately.
Authored-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have various problems with reallocating the array of Capabilities,
due to threads in waitForReturnCapability that are already holding a
pointer to a Capability.
Rather than add more locking to make this safer, I decided it would be
easier to ensure that we never move the Capabilities at all. The
capabilities array is now an array of pointers to Capabaility. There
are extra indirections, but it rarely matters - we don't often access
Capabilities via the array, normally we already have a pointer to
one. I ran the parallel benchmarks and didn't see any difference.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Linux can give back EPERM from an mmap call when a user program attempts
to map pages near `mmap_min_addr`, which is a kernel security measure to
prevent people from mapping pages at address 0. We may do this when we
hint to mmap what address to map the pages to.
However, it's theoretically possible we're not actually out of memory -
we could have continuously mapped pages at some other place far away
from `mmap_min_addr` and succeeded instead. So as an added precaution,
if mmap for a given addr gives us EPERM, we'll also attempt to map
*again*, but without the address hint. Maybe the kernel can do the right
thing.
However, while testing #7500, the amount of free address space we could
have otherwise used only turns out to be about 139MB. Which isn't really
a lot. So, given that, we *also* otherwise treat EPERM as an out of
memory error.
This fixes #7500.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| |
| |
| | |
This reverts commit 48865521de6638240819b3979edbb3d33401dc8e.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| |
| |
| | |
This reverts commit 1ce65edbff90fc8103062a1f94258ecc0c682309.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| |
| |
| | |
This reverts commit 1247dff7b852d45dc5006ae8be33ac991cc76c74.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| | |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| | |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| |
| |
| | |
Fixes Trac #5188.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The iOS simulator is essentially an iOS target but for an x86 machine
instead. It doesn't support the native code generator either, though.
Authored-by: Stephen Blackheath <...@blacksapphire.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| | |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| | |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| |
| |
| | |
symbol_extras is only part of ObjectCode on certain platforms.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
| |
| |
| | |
I'd still prefer if a native english speaker would check them.
|
| |
| |
| |
| |
| | |
The linker is usable even when GHCi is dynamically linked. These
tests make the linker_unload test fail.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The next major GC after an unloadObj() will do a traversal of the heap
to determine whether the object code can be removed from memory or
not. We'll keep doing these until it is safe to remove the object
code.
In my experiments with GHCi, the objects get unloaded immediately,
which is a good sign: we're not accidentally holding on to any
references anywhere in the GHC data structures.
Changes relative to the patch earlier posted on the ticket:
- fix two memory leaks discovered with Valgrind, after
testing with tests/rts/linker_unload.c
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The readMVar implementation had only partially implemented
a micro-optimization which allows us to avoid adding an MVar
to the mutable list if the MVar was not changed. However,
this was not applied to the release method on the fast path,
resulting in dirty MVars which were not added to the mutable list.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
|
|
|
|
| |
This patch also tweaks lockClosure to be INLINE_HEADER, so C-- clients
don't accidentally use them and updates some other code which locks closures
to do the capability check.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
|
|
|
|
|
| |
We add the invariant to the MVar blocked threads queue that
threads blocked on an atomic read are always at the front of
the queue. This invariant is easy to maintain, since takers
are only ever added to the end of the queue.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
|
|
|
|
|
|
| |
gcc thought that fourthFloating could be used without being defined.
In actual fact it couldn't, but I've refactored the code so that it
can now see this.
|
|
|
|
|
|
|
|
|
|
|
| |
Establish the reachability of threads before weak pointers. Hence a
deadlocked thread can keep a weak pointer alive and prevent it from
being finalized early. However, an reference from the finalizer of a
weak pointer will no longer prevent a thread from being considered
deadlocked (#551). To keep the thread alive in that situation you
need to use a StablePtr.
See comments on #7970 and in the code for more details.
|
| |
|
|
|
|
|
|
|
| |
Again, the range of gc_type is actually 1-3, which is technically
outside the range of rtsBool.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
|
|
|
|
|
| |
rtsBool is defined to only have two inhabitants, which are true (1) and
false (0)
But the wakeup flag is set to 4 possible values, outside the range of
rtsBool. This leads Clang to warn about tautological comparisons.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
|
| |
It's unsupported.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
|
|
|
|
| |
Now with less Mac-breakage.
With this change, I can get a working stage1/stage2 compiler using
Clang 3.4svn, which can be used to link working executables!
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|