Hi!
There is this bug open I was taking a look yesterday:
The condense sources compacts the changes and source files, and adds a new method trailer to a compiled method with it's new source pointer. In order to do that, it does a #becomeForward: to the method.
CompiledMethod>>setSourcePointer: srcPointer
"We can't change the trailer of existing method, since
it could have completely different format. Therefore we need to
generate a copy with new trailer, containing an scrPointer, and then
#become it"
| trailer copy |
trailer := CompiledMethodTrailer new sourcePointer: srcPointer.
copy := self copyWithTrailerBytes: trailer.
>>> self becomeForward: copy.
^ copy
So far, with simple methods, so good.
However, there are cases, in which becoming the compiled method, breaks processes, sometimes getting a crash in the VM. For example:
(Delay class>>#handleTimerEvent) setSourcePosition: 200 inFile: 1
(ProcessorScheduler class>>#idleProcess) setSourcePosition: 200 inFile: 1
My assumption is that the #becomeForward: of compiled methods do not get well with the stack mapping in the vm... But just guessing.
Any idea?
Guille