Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004313 [Squeak] Compiler major always 07-22-06 23:18 02-06-11 23:48
Reporter kwl View Status public  
Assigned To nicolas cellier
Priority normal Resolution fixed  
Status closed   Product Version 3.9
Summary 0004313: Compiler+Decompiler together have a serious 'bad case' bug
Description In Decompiler there is a situation which raises an error, located in #send:super:numargs.

When this erros occurs the emergency console comes up because the debugger fails because the decompiler fails because something else fails (dunno what). Unfortunately, emergency situations are almost impossible to debug, so I can't attach any further information :(

The situation can be reproduced by evaluating the following innocent looking snippet, took quite some time to find it </phew> :

| x y |
 x := y := 0.
{'a'. 'b'. 'c'} do: [:c|
    (c string halt; endsWith: 'd')
        ifTrue: [x:= 1 + x]
        ifFalse: [y:= 1 + y]]

Checked in 3.8 and 3.9, same result.
Additional Information
Attached Files  decompileCascade-bf.1.cs.gz [^] (864 bytes) 07-23-06 16:16

- Relationships

- Notes
(0006182 - 179 - 336 - 336 - 336 - 336 - 336)
bert
07-23-06 16:08

Simpler test case:

test: a
    (a foo; bar)
        ifTrue: [1]
        ifFalse: [2]

If the receiver of an ifTrue:ifFalse: is a cascade, the decompiler mistakes it for a case statement.
 
(0006183 - 22 - 22 - 22 - 22 - 22 - 22)
bert
07-23-06 16:16

Attached proposed fix.
 
(0006185 - 134 - 134 - 134 - 134 - 134 - 134)
kwl
07-23-06 23:24

The proposed fix works for the two examples. Is there a routine for checking the modified Decompiler against all source coded methods?
 
(0013867 - 120 - 132 - 132 - 132 - 132 - 132)
nicolas cellier
09-07-10 19:53

In 4.2 trunk, Decompiler still fails with Klaus example.
Consequences are not catastrophic though.
Bert example works.
 
(0013869 - 83 - 83 - 83 - 83 - 83 - 83)
nicolas cellier
09-07-10 21:49

Oops; my mistake, both issues are fixed in latest 4.2 trunk and probably in 4.1 too
 

- Issue History
Date Modified Username Field Change
07-22-06 23:18 kwl New Issue
07-23-06 16:08 bert Note Added: 0006182
07-23-06 16:16 bert File Added: decompileCascade-bf.1.cs.gz
07-23-06 16:16 bert Note Added: 0006183
07-23-06 23:24 kwl Note Added: 0006185
09-07-10 19:53 nicolas cellier Note Added: 0013867
09-07-10 21:49 nicolas cellier Status new => resolved
09-07-10 21:49 nicolas cellier Fixed in Version  => trunk
09-07-10 21:49 nicolas cellier Resolution open => fixed
09-07-10 21:49 nicolas cellier Assigned To  => nicolas cellier
09-07-10 21:49 nicolas cellier Note Added: 0013869
02-06-11 23:48 leves Status resolved => closed


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