Documentation bugs

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Mar 9 13:56:09 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jari-Matti Mäkelä schrieb am 2006-03-08:

[snip]

> 4. One other question - what are the hard limits of DMD? For example,
> how many objects of a class can be instantiated at most? We have made a
> suffix tree -algorithm that generates a huge amount of objects. I think
> the compiler introduces some limits, since the algorithm segfaults only
> after about >300 identical successful runs - the amount of successful
> identical runs before segfault decreases when the tree depth increases.
> It segfaults on the following code:
>
> class Node {
>   Node[char] children;
>   char[] label;
>
>   void fn(char[] s) {
>     assert(s !is null);
>     assert(s.length > 0);
>     assert(s[0] in children);
>     auto a = children[s[0]];
>     assert(a !is null);
>     char[] l = a.label;  // segfault exactly here
>     assert(l != null);
>     ...
>   }
> }
>
> The segfault shouldn't be possible since all objects all guaranteed to
> be properly allocated from the heap. We don't use any explicit memory
> management. I can post the whole source if needs be.

Are you sure you aren't hitting the memory limit of your system?

If so, it's a bug reported about one year ago:
(no exection is thrown if the system is out of memory)
http://dstress.kuehne.cn/run/OutOfMemory_03.d

Thomas


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

iD8DBQFEELEX3w+/yD4P9tIRAng8AKCjx9Kf/WPjydCDTUKFWOfDIf6yWgCguFIu
3TCxRGfxa7bw/dN3kfl8KKE=
=j/IH
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list