Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1019 from CyberShadow/pull-20141113-005155
Browse files Browse the repository at this point in the history
fix Issue 13725 - onInvalidMemoryOperationError et al should not be inlined
  • Loading branch information
MartinNowak committed Nov 14, 2014
2 parents e57f951 + c498391 commit 86d49cf
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/gc/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import cstdlib = core.stdc.stdlib : calloc, free, malloc, realloc;
import core.stdc.string : memcpy, memset, memmove;
import core.bitop;
import core.sync.mutex;
import core.exception : onOutOfMemoryError, onInvalidMemoryOperationError;
import core.thread;
static import core.memory;
private alias BlkAttr = core.memory.GC.BlkAttr;
Expand Down Expand Up @@ -125,10 +124,18 @@ private

private
{
// to allow compilation of this module without access to the rt package,
// make these functions available from rt.lifetime
extern (C) void rt_finalize2(void* p, bool det, bool resetMemory) nothrow;
extern (C) int rt_hasFinalizerInSegment(void* p, in void[] segment) nothrow;
extern (C)
{
// to allow compilation of this module without access to the rt package,
// make these functions available from rt.lifetime
void rt_finalize2(void* p, bool det, bool resetMemory) nothrow;
int rt_hasFinalizerInSegment(void* p, in void[] segment) nothrow;

// Declared as an extern instead of importing core.exception
// to avoid inlining - see issue 13725.
void onInvalidMemoryOperationError() nothrow;
void onOutOfMemoryError() nothrow;
}

enum
{
Expand Down

0 comments on commit 86d49cf

Please sign in to comment.