Hello,

Sorry for the last mail. It got all screwed by as my internet mailer was adding HTML 
tags.

Coming back to the point, I was looking at the runtime invoke code generated for 
Assembly.DoAssemblyLoad(). (which comes from mono_domain_fire_assembly_load). Now 
while the code is being compiled using 
mono_method_compile-->mono_codegen()-->mono_arch_local_regalloc() I found that the 
follwing instructions were looked up in the **ppcg4 array.

372: load_membase
312: compare_imm
59 : beq
..
..
..
56 : br
551: start_handler
     ^^^^^^^^^^^^^

Now in the "cpu-g4.h" the value assigned to "start_handler" is "NULL" which makes the 
code inside the mono_arch_local_regalloc ..

while(ins) {
   spec = ins_spec[ins->opcode];
   ..
   if (spec[MONO_INST_SRC1]) {
   ..
}

.. to crash as spec becomes NULL and the if block tried to access a NULL pointer. 
After hacking the code to work around this exception, I later found the when the 
emitted code is run through mono_ldftn() the MonoMethod *method is corrupted and it 
crashes again.

Is there still some problem with the ppc emitter or I am missing something in here.

any pointers would be appreciated.

regards,
gary
 

Reply via email to