help: VMMaker patch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

help: VMMaker patch

K K Subbu
 
Hi,

I made a small fix (attached) in VMMaker InterpreterSimulator but
couldn't save it to VMMakerInbox. It only has Cog-related projects.

allowAccessBeyondSP is initialized in Interpreter but not in
InterpreterSimulator. When the simulator is stared on Squeak32-3.8g-6548
image, this triggers an undefined reference in
EshouldBoundAccessWithinStackFor:withFormat:

Could someone please review this patch and help me propose it to VMMaker?

Thanks and Regards .. Subbu

Sim.1.cs (686 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: help: VMMaker patch

David T. Lewis
 
Hi Subbu,

I will be happy to review it. I may not have a chance to get to it
for a day or two though.

Thanks!
Dave

On Mon, May 11, 2020 at 09:20:50PM +0530, K K Subbu wrote:

>  
> Hi,
>
> I made a small fix (attached) in VMMaker InterpreterSimulator but
> couldn't save it to VMMakerInbox. It only has Cog-related projects.
>
> allowAccessBeyondSP is initialized in Interpreter but not in
> InterpreterSimulator. When the simulator is stared on Squeak32-3.8g-6548
> image, this triggers an undefined reference in
> EshouldBoundAccessWithinStackFor:withFormat:
>
> Could someone please review this patch and help me propose it to VMMaker?
>
> Thanks and Regards .. Subbu


Reply | Threaded
Open this post in threaded view
|

Re: help: VMMaker patch

K K Subbu
In reply to this post by K K Subbu
 
Hi,

ImageFileHeader does not position the stream at the given imageOffset
before reading the header. The header may also be present 512 bytes into
the file. Attached changeset fixes this gap and also preserves
littleEndian flag in an instance variable.

I tested the fix by inspecting:
----
#('hdr6502-0be.image' 'hdr6502-0le.image'
'hdr6502-512be.image' 'hdr6502-512le.image'
'hdr6504-0be.image' 'hdr6504-0le.image'
'hdr6504-512be.image' 'hdr6504-512le.image'
'hdr6505-0be.image' 'hdr6505-0le.image'
'hdr6505-512be.image' 'hdr6505-512le.image'
'hdr68002-0be.image' 'hdr68002-0le.image'
'hdr68002-512be.image' 'hdr68002-512le.image'
'Squeak6.0alpha-19603-64bit.image') collect: [:image || f |
     f := FileStream readOnlyFileNamed: image.
     ([f binary. ImageFileHeader readFrom: f ] ensure: [ f close ])
]
----

Regards .. Subbu

Sim.2.cs (2K) Download Attachment