Anonymous | Login | 01-26-2021 03:27 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0007430 | [Squeak] Squeak 64 bit | crash | always | 12-17-09 00:52 | 04-18-10 21:59 | ||||
Reporter | johnmci | View Status | public | ||||||
Assigned To | lewis | ||||||||
Priority | urgent | Resolution | fixed | ||||||
Status | closed | Product Version | trunk | ||||||
Summary | 0007430: CompiledMethod>> initialPC calculation is wrong for 64bit images | ||||||||
Description |
Needs to consider Smalltalk wordsize (cached value) versus the hard coded 4, because on a 64bit image it's 8. |
||||||||
Additional Information | |||||||||
Attached Files |
![]() ![]() ![]() |
||||||||
|
![]() |
|
(0013436 - 404 - 424 - 424 - 424 - 424 - 424) lewis 12-17-09 13:16 |
For reference, I uploaded CompiledMethod-initialPC.st, which contains the version of this method from the original "dist 3" 64-bit image. This uses "Smalltalk wordSize", which is correct (but slow). Presumably this version of the method was added to the 32-bit image prior to tracing the 64-bit image. See discussion on Squeak/Pharo lists concerning the best way to do this without impacting performance. |
(0013437 - 545 - 612 - 612 - 612 - 612 - 612) lewis 12-18-09 05:49 |
Laval Jannik posted fixes on vm-dev and pharo lists. The attached Smalltalk-wordSize-dtl-M7430.1.cs is a variation on Laval's proposal. This uses "Smalltalk wordSize" (not "SystemDictionary wordSize"), and clears the cached value immediately prior to a snapshot. Cache Smalltalk wordSize in class var in SystemDictionary. Clear the cached value prior to an image snapshot, and initialize it on image restart. Update CompiledMethod>>initialPC to use #wordSize. This is the method as implemented in the original 64-bit image (author di)." |
(0013438 - 629 - 652 - 652 - 652 - 652 - 652) johnmci 12-18-09 06:24 |
I don't think we need the Smalltalk clearWordSize in snapshot: save andQuit: quit embedded: embeddedFlag. Based on the discussion of what is going on, all existing images start out as 32bit images so they need the WordSize on SystemDictionary, which will get set to 4, and of course the change to CompiledMethod>> initialPC But as pointed out when the SystemTracer2 converts it to a 64bit image we then change the value to 8 as part of the bootstrapping. Now there is no need to nill or swap back to 4, because 8 is the only correct answer for a 64bit image so there is no need to nil and reload 8 back into the class var. |
(0013439 - 374 - 380 - 423 - 423 - 423 - 423) lewis 12-18-09 23:18 |
Agreed, setting WordSize should be done only by system trace as per Bert's suggestion. Corrected change set attached (Smalltalk-wordSize-dtl-M7430.2.cs), which caches #wordSize but does not affect snapshot/resume. Need to confirm that this matches changes for Pharo by Laval Jannik <jannik.laval@inria.fr>, or just use Laval's changes directly (I don't have the change set). |
(0013455 - 435 - 469 - 469 - 469 - 469 - 469) lewis 01-05-10 02:54 edited on: 01-05-10 02:55 |
Smalltalk-wordSize-dtl-M7430.2.cs has been added to Squeak trunk. I also updated the method comment for #wordSize to explain: "Answer the size in bytes of an object pointer or word in the object memory. The value does not change for a given image, but may be modified by a SystemTracer when converting the image to another format. The value is cached in WordSize to avoid the performance overhead of repeatedly consulting the VM." |
(0013484 - 31 - 31 - 31 - 31 - 31 - 31) lewis 01-16-10 18:55 |
Fixed in Squeak trunk and Pharo |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
73 total queries executed. 43 unique queries executed. |