[Issue 6014] rt_finalize Segmentation fault , dmd 2.053 on linux & freebsd

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 17 19:44:22 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6014



--- Comment #11 from changlon <changlon at gmail.com> 2011-07-17 19:39:01 PDT ---
I do not understand the mechanism of druntime , this problem has troubled me
for a long time .

According to my simple understanding, the following code does not cover up the
failure, But in fact it failed. Is I got it wrong or druntime has a bug?

------------------------------------------------------
import core.memory;
void main(){
        auto attr = cast(GC.BlkAttr) 0b1 ;
        auto test = GC.malloc(10, attr);
        GC.setAttr(test, 0);
        auto _attr = GC.getAttr(test);
        assert(attr != _attr);
}
-----------------------------------------------------

I use GC.malloc and  GC.realloc to speed up the memory alloc,  A memory block
attr has be changed before exit main function .

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list