www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Assertion failure: '!v->csym' on line 388 in file 'glue.c'

reply Sean Kelly <sean f4.ca> writes:
I think I reported this before, but I have a reasonable test case this 
time.  It has something to do with declaring an asm block volatile 
(redundant, I know, but I'd prefer it be explicit).


C:\code\d\bugs>type 140_1.d
template atomicStore( T )
{
     void atomicStore( inout T val, T newval )
     {
         volatile asm
         {
             mov EAX, val;
             mov EBX, newval;
             lock;
             xchg [EAX], EBX;
         }
     }
}

void main()
{
     int  i;
     uint u;

     atomicStore!(int)( i, 1 );
     atomicStore!(uint)( u, 2 );
}
C:\code\d\bugs>dmd 140_1.d
Assertion failure: '!v->csym' on line 388 in file 'glue.c'

abnormal program termination

C:\code\d\bugs>
Dec 02 2005
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sean Kelly schrieb am 2005-12-03:
 I think I reported this before, but I have a reasonable test case this 
 time.  It has something to do with declaring an asm block volatile 
 (redundant, I know, but I'd prefer it be explicit).


 C:\code\d\bugs>type 140_1.d
 template atomicStore( T )
 {
      void atomicStore( inout T val, T newval )
      {
          volatile asm
          {
              mov EAX, val;
              mov EBX, newval;
              lock;
              xchg [EAX], EBX;
          }
      }
 }

 void main()
 {
      int  i;
      uint u;

      atomicStore!(int)( i, 1 );
      atomicStore!(uint)( u, 2 );
 }
 C:\code\d\bugs>dmd 140_1.d
 Assertion failure: '!v->csym' on line 388 in file 'glue.c'

 abnormal program termination

Added to DStress as http://dstress.kuehne.cn/run/b/bug_glue_387_F.d http://dstress.kuehne.cn/run/b/bug_glue_387_G.d http://dstress.kuehne.cn/run/b/bug_glue_387_H.d (yes, it is 387 instead of 388 for historic reasons) Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDklrI3w+/yD4P9tIRAmR7AJ4gFKkarH9j6VvUsFS+wgwpCWp61wCfamy1 0qYnMX4SUJkJFxz26LAoNSY= =B3KR -----END PGP SIGNATURE-----
Dec 03 2005