Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 516

Show
Ignore:
Timestamp:
01/17/11 05:52:12 (14 years ago)
Author:
walter
Message:

bugzilla 5320 gcstub/gc.d: SEGV because of missing returns

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/gcstub/gc.d

    r515 r516  
    296296extern (C) void gc_addRoot( void* p ) 
    297297{ 
    298298    if( proxy is null ) 
    299299    { 
    300300        void** r = cast(void**) realloc( roots, 
    301301                                         (nroots+1) * roots[0].sizeof ); 
    302302        if( r is null ) 
    303303            onOutOfMemoryError(); 
    304304        r[nroots++] = p; 
    305305        roots = r; 
    306         assert(0);      // fix 
     306        return; 
    307307    } 
    308308    return proxy.gc_addRoot( p ); 
    309309} 
    310310 
    311311extern (C) void gc_addRange( void* p, size_t sz ) 
    312312{ 
    313313    //printf("gcstub::gc_addRange() proxy = %p\n", proxy); 
    314314    if( proxy is null ) 
    315315    { 
    316316        Range* r = cast(Range*) realloc( ranges, 
    317317                                         (nranges+1) * ranges[0].sizeof ); 
    318318        if( r is null ) 
    319319            onOutOfMemoryError(); 
    320320        r[nranges].pos = p; 
    321321        r[nranges].len = sz; 
    322322        ranges = r; 
    323323        ++nranges; 
    324         assert(0);      // fix 
     324        return; 
    325325    } 
    326326    return proxy.gc_addRange( p, sz ); 
    327327} 
    328328 
    329329extern (C) void gc_removeRoot( void *p ) 
    330330{ 
    331331    if( proxy is null ) 
    332332    { 
    333333        for( size_t i = 0; i < nroots; ++i ) 
    334334        {