[Mono-list] Some C# problems
Paolo Molaro
lupus@ximian.com
Tue, 6 Aug 2002 11:33:37 +0200
On 08/06/02 Kenneth Christiaansen wrote:
> I am having some problems with the attached code. This is the first I play
> with C# so it might include sillynesses. It compiles fine, but I get the
> following failures while running the code:
The bug is fixed in cvs, thanks for the test case!
For the curious: the bug is a few months old (March probably).
To avoid a cyclic dependency when initializing the structures that
represent types (System.Enum uses enumerations, but enumerations derive
from System.Enum), we compute the instance size of an enumeration in two
different places. The instance size is the size of the reference
representation of the enum value and needs to include the size of
MonoObject (the vtable pointer and the sync block): one of the two
codepath didn't take that into account and this resulted in the
multi-dim array access code stomping on the array representation instead
of the array data, thus the SEGV...
$ mono tictac.exe
Welcome to Tic Tac Toe
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
lupus
--
-----------------------------------------------------------------
lupus@debian.org debian/rules
lupus@ximian.com Monkeys do it better