robertj at gmx.net
Fri Sep 15 13:43:54 EDT 2006
Bruce Wilkie wrote:
> i'm seeing a bug where setting a static field uses the class the
> field is on: -------------- MonoVTable *vtable = mono_class_vtable
> (mono_object_domain (field), field->klass); --------------
> consider, however, that the static field is coming from a base class.
> in this case, it seems that vtable should really be the vtable of the
> base class? i don't see a way to trivially understand when this
> traversal needs to happen, however.
Which traversal? Since mono_class_vtable () is called on
field's declaring class, the returned vtable will be always
However, IIRC there are some corner cases where
has to be previously invoked, otherwise the involved .cctors won't
be called (or they will be called lately, overriding the values set
with mono_field_static_set_value ()).
Could you please provide a test case for your problem?
More information about the Mono-list