www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - segfault: assert(ModuleInfo);

reply Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

# import std.moduleinit;
#
# void main(){
# 	ModuleInfo o;
#	assert(o===null); // OK
#       assert(o); // segment fault
# }

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCXOLY3w+/yD4P9tIRAoxpAJ48+8E7KGMsZNfIKCu5sJ1q2BDZRgCdGrhp
6H+rvBTQCg1uO43xih6fXzk=
=ylJl
-----END PGP SIGNATURE-----
Apr 13 2005
parent reply "Walter" <newshound digitalmars.com> writes:
"Thomas Kuehne" <thomas-dloop kuehne.thisisspam.cn> wrote in message
news:of4vi2-hb3.ln1 lnews.kuehne.cn...
 # import std.moduleinit;
 #
 # void main(){
 # ModuleInfo o;
 # assert(o===null); // OK
 #       assert(o); // segment fault
 # }
It should seg fault. What's the error?
Apr 29 2005
parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Walter schrieb am Fri, 29 Apr 2005 16:51:56 -0700:
 "Thomas Kuehne" <thomas-dloop kuehne.thisisspam.cn> wrote in message
 news:of4vi2-hb3.ln1 lnews.kuehne.cn...
 # import std.moduleinit;
 #
 # void main(){
 # ModuleInfo o;
 # assert(o===null); // OK
 #       assert(o); // segment fault
 # }
It should seg fault. What's the error?
Sorry for the botched test code. # import std.moduleinit; # # int main(){ # foreach(ModuleInfo m; std.moduleinit._moduleinfo_array){ # if(m!==null){ # assert(m); # } # } # return 0; # } /* line 10 */ Program received signal SIGSEGV, Segmentation fault. (gdb) bt #0 0x0804ab3a in _D9invariant12_d_invariantFC6ObjectZv () #1 0x0804ab26 in _Dmain () at a.d:10 #2 0x0804abc7 in main () Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCdIzO3w+/yD4P9tIRAl07AKCB/Cx5/xuxNCDDjedH64VY4LnrSACgnBaf 7D3eaKb37nE7DntRmZy9Zqg= =32o8 -----END PGP SIGNATURE-----
May 01 2005