[Issue 6014] rt_finalize Segmentation fault ,	dmd 2.053 on linux & freebsd
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Aug  8 19:46:13 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=6014
--- Comment #12 from changlon <changlon at gmail.com> 2011-08-08 19:46:06 PDT ---
I think the bug is not because class cast .
in the code i have Token and ASTNode,  The Token is struct and ASTNode is
class. if I apply them both on heap then it working fine,  if I only apply 
ASTNode on heap the problem is still there ,  If I apply only Token on heap the
test is work fine .
I storage the pointer of Token struct on a global pointer, and print it before
exit main function,  find it is diffent ,  that mean the Pool.data has been
moved ,  and after exit main I got a  Segmentation .
I simply do nothing but just change the struct Token to class Token,  they
still apply on pool but not heap,  The problem is not exists anymore.
So,  I guess this is not a cast(class) issue,  It is a struct issue, and
related with druntime GC .
the Segmentation is very rare, If i change a lite things on example.jade, the
Segmentation will not exists .
If i apply stuct Token on heap the performance will be very bad,  It will cause
100 times than not apply on heap .
After several months of debug and test,  I finally resolved this problem . 
Thanks a lot for Steven Schveighoffer help .
my problem is not exists by switch stuck Token to class Token,  But I believe
there is also a hidden an druntime GC bug,  So I will not close this bug .
-- 
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