Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002151 [Squeak] Compiler crash always 11-03-05 11:48 07-14-06 21:18
Reporter kwl View Status public  
Assigned To MarcusDenker
Priority normal Resolution fixed  
Status closed   Product Version 3.9
Summary 0002151: Max number of literals checked in MethodNode instead of CompiledMethod
Description The maximum number of literals (currently 255) is checked in MethodNode>>#generate: instead of CompiledMethod>>#newBytes:trailerBytes:nArgs:nTemps:nStack:nLits:primitive:

This can result in corrupted method header and VM crash when CompiledMethod is not generated from MethodNode (for example when instrumenting methods without recompiling them).
Additional Information Same situation in 3.8 and 3.7 (didn't check older releases).
Attached Files  cmNumLitCheck-md.1.cs [^] (2,596 bytes) 02-25-06 17:52

- Relationships

- Notes
(0004088 - 18 - 18 - 18 - 18 - 18 - 18)
MarcusDenker
02-25-06 17:53

changeset attached
 
(0004175 - 4 - 4 - 4 - 4 - 4 - 4)
MarcusDenker
02-27-06 23:47

7004
 
(0005372 - 611 - 665 - 665 - 665 - 665 - 665)
kwl
06-25-06 10:13

The maximum number of temps (nTemps, incl. nArgs) is checked for not exceeding 64 in
newBytes:trailerBytes:nArgs:nTemps:nStack:nLits:primitive:
newBytes:trailerBytes:nArgs:nTemps:nStack:nLits:primitive:flag:

But the number of bits allocated for encoding nTemps in a CompiledMethod header are 6 and so the check must be for nTemps not exceeding 63.

This is not easy to find since the class comment does not speak about nTemps includes nArgs or not. So I have also checked senders of #newMethod:header: and Interpreter>>#tempCountOf: and this one does bitAnd: 16r3F.

I'm sorry this wasn't seen earlier.
 
(0005907 - 4 - 4 - 4 - 4 - 4 - 4)
MarcusDenker
07-14-06 21:18

7045
 

- Issue History
Date Modified Username Field Change
11-03-05 11:48 kwl New Issue
02-25-06 17:52 MarcusDenker File Added: cmNumLitCheck-md.1.cs
02-25-06 17:53 MarcusDenker Status new => resolved
02-25-06 17:53 MarcusDenker Resolution open => fixed
02-25-06 17:53 MarcusDenker Assigned To  => MarcusDenker
02-25-06 17:53 MarcusDenker Note Added: 0004088
02-27-06 23:47 MarcusDenker Status resolved => closed
02-27-06 23:47 MarcusDenker Note Added: 0004175
02-27-06 23:47 MarcusDenker Fixed in Version  => 3.9
06-25-06 10:13 kwl Status closed => feedback
06-25-06 10:13 kwl Resolution fixed => reopened
06-25-06 10:13 kwl Note Added: 0005372
07-14-06 21:18 MarcusDenker Status feedback => closed
07-14-06 21:18 MarcusDenker Note Added: 0005907
07-14-06 21:18 MarcusDenker Resolution reopened => fixed


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
55 total queries executed.
37 unique queries executed.
Powered by Mantis Bugtracker