[K42-discussion] destruction of global kernel objects

Donour Sizemore donour at cs.unm.edu
Tue Sep 26 05:38:56 EST 2006


Bryan S Rosenburg wrote:
> 
> 
> Donour Sizemore wrote on 09/20/2006 06:01:07 PM:
>  > Reading between the lines, it seems like you're saying that these
>  > classes shouldn't have destructors and I agree. GCC doesn't.
> 
> No.  I'm saying that if XBaseObj has to have a virtual destructor, the 
> stub-generator had better take it into account when it figures out what 
> method numbers correspond to what actual methods.  I'm guessing that the 
> reason you're seeing the destructor invoked is that some 
> protected-procedure-call client is passing a method number that it 
> thinks corresponds to method foo() in the target XObj and instead 
> corresponds to the destructor.
> 
> I assume you've done a full clean and rebuild.  Doing things that change 
> method numbers in stub-generated code SHOULD get picked up by the 
> Makefiles, but I don't trust the dependencies.  Make sure all the 
> stub-generated code is re-generated.
> 
> Assuming that's not the problem, you will have to look at the 
> intermediate files the stub-generator spits out.  One of them is just a 
> skeleton class with all the exported methods.  It's compiled only for 
> the sake of determining method numbers.  I'm not sure whether that 
> generated class inherits from XBaseObj or not.  If it doesn't, you'll 
> have to make the generated class match your XBaseObj in order to get the 
> method numbers to be correct.
> 
> - Bryan
> 

Embarrassingly, this seems to be an artifact of my build script not 
rebuilding kitchroot correctly. Thanks to Matthew Barrick for pointing 
this out.

donour




More information about the K42-discussion mailing list