On 09.11.2012 13:36, Sebastian Nozzi wrote:
2012/11/9 Igor Stasenko <siguctua@gmail.com>:
My recipe is: - simply find an offending compiled method - replace its first bytecode to "returnself" How do you do this?
One could potentially build a tool to do it :) (with the caveat that one would need to be intimate with the image/object format) - Open a "dead" image file. - Find offsets for start of object space and symbol table (in the image header?) - Search for startUp/startUp:/halt in Symbol table, and record their object header adresses - Subtract the object space start start from these, and you'd have the oop's of these Symbols. - Scan the image for startUp(:) oops, check if it's the selector of a CompiledMethod instance, and that halt is one of it's literals. - If so, replace the first byte in the CM's bytecodes with that of returnself. If you want to do so manually, better get your Neo-goggles on, or be Igor :P Cheers, Henry