Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /bugs/branches/smlnj/bugs.1601-1800
ViewVC logotype

Annotation of /bugs/branches/smlnj/bugs.1601-1800

Parent Directory Parent Directory | Revision Log Revision Log


Revision 944 - (view) (download)
Original Path: bugs/trunk/bugs.1601-1800

1 : macqueen 944 Number: 1601
2 :     Title: SML/NJ terminates with `unexpected fault, signal = 11'
3 :     Keywords: SIGSEGV, codegen
4 :     Submitter: Leif Kornstaedt <kornstae@ps.uni-sb.de>
5 :     Date: 01/24/2001
6 :     Version: Standard ML of New Jersey, Version 110.0.6, October 31, 1999
7 :     System: x86-linux
8 :     Severity: major
9 :     Problem: SML/NJ terminates with `unexpected fault, signal = 11'
10 :     Code: Alas, it's longish
11 :     See /home/sml/Dev/bugs/1601/smlnj-bug.
12 :    
13 :     Transcript:
14 :    
15 :     Standard ML of New Jersey, Version 110.0.6, October 31, 1999 [CM; autoload enabled]
16 :     - CM.make ();
17 :     [...]
18 :     [introducing new bindings into toplevel environment...]
19 :     val it = () : unit
20 :     - Main.flattenFile "test";
21 :     -- Parsing...
22 :     -- Abstraction...
23 :     84.10-84.21: warning: structure or functor `__pervasive' shadows previous one
24 :     93.10-93.21: warning: structure or functor `__pervasive' shadows previous one
25 :     114.54-114.57: warning: type `exn' shadows previous one
26 :     170.11-170.15: warning: type `unit' shadows previous one
27 :     171.9-171.12: warning: type `exn' shadows previous one
28 :     187.13-187.18: warning: type `order' shadows previous one
29 :     187.24-187.28: warning: value or constructor `LESS' shadows previous one
30 :     187.31-187.36: warning: value or constructor `EQUAL' shadows previous one
31 :     187.39-187.46: warning: value or constructor `GREATER' shadows previous one
32 :     202.9-202.13: warning: type `unit' shadows previous one
33 :     203.9-203.12: warning: type `exn' shadows previous one
34 :     219.13-219.18: warning: type `order' shadows previous one
35 :     241.13-241.16: warning: type `ref' shadows previous one
36 :     256.13-256.16: warning: type `ref' shadows previous one
37 :     277.13-277.17: warning: type `bool' shadows previous one
38 :     277.20-277.25: warning: value or constructor `false' shadows previous one
39 :     277.28-277.32: warning: value or constructor `true' shadows previous one
40 :     292.13-292.17: warning: type `bool' shadows previous one
41 :     350.21-350.24: warning: type `alt' shadows previous one
42 :     350.27-350.30: warning: value or constructor `FST' shadows previous one
43 :     350.39-350.42: warning: value or constructor `SND' shadows previous one
44 :     373.13-373.16: warning: type `alt' shadows previous one
45 :     416.16-416.22: warning: type `option' shadows previous one
46 :     416.25-416.29: warning: value or constructor `NONE' shadows previous one
47 :     416.32-416.36: warning: value or constructor `SOME' shadows previous one
48 :     438.13-438.19: warning: type `option' shadows previous one
49 :     488.16-488.20: warning: type `list' shadows previous one
50 :     488.23-488.26: warning: value or constructor `nil' shadows previous one
51 :     488.31-488.33: warning: value or constructor `::' shadows previous one
52 :     534.13-534.17: warning: type `list' shadows previous one
53 :     794.11-794.15: warning: type `char' shadows previous one
54 :     795.11-795.17: warning: type `string' shadows previous one
55 :     808.11-808.12: warning: value or constructor `<' shadows previous one
56 :     809.11-809.13: warning: value or constructor `<=' shadows previous one
57 :     810.11-810.12: warning: value or constructor `>' shadows previous one
58 :     811.11-811.13: warning: value or constructor `>=' shadows previous one
59 :     848.9-848.13: warning: type `char' shadows previous one
60 :     849.9-849.15: warning: type `string' shadows previous one
61 :     879.23-879.24: warning: value or constructor `<' shadows previous one
62 :     880.23-880.24: warning: value or constructor `>' shadows previous one
63 :     881.23-881.25: warning: value or constructor `<=' shadows previous one
64 :     882.23-882.25: warning: value or constructor `>=' shadows previous one
65 :     959.9-959.15: warning: type `string' shadows previous one
66 :     962.14-962.18: warning: structure or functor `Char' shadows previous one
67 :     988.11-988.12: warning: value or constructor `<' shadows previous one
68 :     989.11-989.12: warning: value or constructor `>' shadows previous one
69 :     990.11-990.13: warning: value or constructor `<=' shadows previous one
70 :     991.11-991.13: warning: value or constructor `>=' shadows previous one
71 :     1012.9-1012.15: warning: type `string' shadows previous one
72 :     1015.14-1015.18: warning: structure or functor `Char' shadows previous one
73 :     1044.23-1044.24: warning: value or constructor `<' shadows previous one
74 :     1045.23-1045.24: warning: value or constructor `>' shadows previous one
75 :     1046.23-1046.25: warning: value or constructor `<=' shadows previous one
76 :     1047.23-1047.25: warning: value or constructor `>=' shadows previous one
77 :     1113.14-1113.20: warning: structure or functor `String' shadows previous one
78 :     1236.11-1236.14: warning: type `int' shadows previous one
79 :     1248.8-1248.9: warning: value or constructor `~' shadows previous one
80 :     1249.11-1249.12: warning: value or constructor `+' shadows previous one
81 :     1250.11-1250.12: warning: value or constructor `-' shadows previous one
82 :     1251.11-1251.12: warning: value or constructor `*' shadows previous one
83 :     1252.11-1252.14: warning: value or constructor `div' shadows previous one
84 :     1253.11-1253.14: warning: value or constructor `mod' shadows previous one
85 :     1257.11-1257.12: warning: value or constructor `<' shadows previous one
86 :     1258.11-1258.12: warning: value or constructor `>' shadows previous one
87 :     1259.11-1259.13: warning: value or constructor `<=' shadows previous one
88 :     1260.11-1260.13: warning: value or constructor `>=' shadows previous one
89 :     1263.8-1263.11: warning: value or constructor `abs' shadows previous one
90 :     1281.9-1281.12: warning: type `int' shadows previous one
91 :     1293.8-1293.9: warning: value or constructor `~' shadows previous one
92 :     1294.11-1294.12: warning: value or constructor `+' shadows previous one
93 :     1295.11-1295.12: warning: value or constructor `-' shadows previous one
94 :     1296.11-1296.12: warning: value or constructor `*' shadows previous one
95 :     1297.11-1297.14: warning: value or constructor `div' shadows previous one
96 :     1298.11-1298.14: warning: value or constructor `mod' shadows previous one
97 :     1300.11-1300.12: warning: value or constructor `<' shadows previous one
98 :     1301.11-1301.12: warning: value or constructor `>' shadows previous one
99 :     1302.11-1302.13: warning: value or constructor `<=' shadows previous one
100 :     1303.11-1303.13: warning: value or constructor `>=' shadows previous one
101 :     1310.8-1310.11: warning: value or constructor `abs' shadows previous one
102 :     1375.16-1375.20: warning: value or constructor `sign' shadows previous one
103 :     1401.11-1401.15: warning: type `word' shadows previous one
104 :     1426.8-1426.9: warning: value or constructor `+' shadows previous one
105 :     1427.8-1427.9: warning: value or constructor `-' shadows previous one
106 :     1428.8-1428.9: warning: value or constructor `*' shadows previous one
107 :     1429.8-1429.11: warning: value or constructor `div' shadows previous one
108 :     1430.8-1430.11: warning: value or constructor `mod' shadows previous one
109 :     1455.9-1455.13: warning: type `word' shadows previous one
110 :     1472.23-1472.24: warning: value or constructor `+' shadows previous one
111 :     1473.23-1473.24: warning: value or constructor `-' shadows previous one
112 :     1474.23-1474.24: warning: value or constructor `*' shadows previous one
113 :     1475.23-1475.26: warning: value or constructor `div' shadows previous one
114 :     1476.23-1476.26: warning: value or constructor `mod' shadows previous one
115 :     1503.20-1503.26: warning: value or constructor `source' shadows previous one
116 :     1564.34-1564.38: warning: value or constructor `LESS' shadows previous one
117 :     1564.41-1564.46: warning: value or constructor `EQUAL' shadows previous one
118 :     1564.49-1564.56: warning: value or constructor `GREATER' shadows previous one
119 :     1595.34-1595.38: warning: value or constructor `LESS' shadows previous one
120 :     1595.41-1595.46: warning: value or constructor `EQUAL' shadows previous one
121 :     1595.49-1595.56: warning: value or constructor `GREATER' shadows previous one
122 :     1619.11-1619.15: warning: type `real' shadows previous one
123 :     1648.9-1648.13: warning: type `real' shadows previous one
124 :     1684.11-1684.15: warning: type `real' shadows previous one
125 :     1687.14-1687.18: warning: structure or functor `Math' shadows previous one
126 :     1687.40-1687.44: warning: type `real' shadows previous one
127 :     1700.8-1700.9: warning: value or constructor `~' shadows previous one
128 :     1701.11-1701.12: warning: value or constructor `+' shadows previous one
129 :     1702.11-1702.12: warning: value or constructor `-' shadows previous one
130 :     1703.11-1703.12: warning: value or constructor `*' shadows previous one
131 :     1704.11-1704.12: warning: value or constructor `/' shadows previous one
132 :     1709.8-1709.11: warning: value or constructor `abs' shadows previous one
133 :     1717.11-1717.12: warning: value or constructor `<' shadows previous one
134 :     1718.11-1718.12: warning: value or constructor `>' shadows previous one
135 :     1719.11-1719.13: warning: value or constructor `<=' shadows previous one
136 :     1720.11-1720.13: warning: value or constructor `>=' shadows previous one
137 :     1781.9-1781.13: warning: type `real' shadows previous one
138 :     1784.14-1784.18: warning: structure or functor `Math' shadows previous one
139 :     1788.20-1788.21: warning: value or constructor `~' shadows previous one
140 :     1789.23-1789.24: warning: value or constructor `+' shadows previous one
141 :     1790.23-1790.24: warning: value or constructor `-' shadows previous one
142 :     1791.23-1791.24: warning: value or constructor `*' shadows previous one
143 :     1792.23-1792.24: warning: value or constructor `/' shadows previous one
144 :     1795.23-1795.24: warning: value or constructor `<' shadows previous one
145 :     1796.23-1796.24: warning: value or constructor `>' shadows previous one
146 :     1797.23-1797.25: warning: value or constructor `<=' shadows previous one
147 :     1798.23-1798.25: warning: value or constructor `>=' shadows previous one
148 :     1814.8-1814.11: warning: value or constructor `abs' shadows previous one
149 :     1878.46-1878.52: warning: value or constructor `source' shadows previous one
150 :     1897.23-1897.29: warning: value or constructor `source' shadows previous one
151 :     1901.24-1901.30: warning: value or constructor `source' shadows previous one
152 :     1906.23-1906.29: warning: value or constructor `source' shadows previous one
153 :     1910.16-1910.20: warning: value or constructor `sign' shadows previous one
154 :     1926.32-1926.35: warning: value or constructor `src' shadows previous one
155 :     1927.25-1927.29: warning: value or constructor `esym' shadows previous one
156 :     1927.33-1927.37: warning: value or constructor `src1' shadows previous one
157 :     1928.33-1928.37: warning: value or constructor `src2' shadows previous one
158 :     1964.14-1964.20: warning: type `vector' shadows previous one
159 :     2005.12-2005.18: warning: type `vector' shadows previous one
160 :     2222.12-2222.17: warning: type `array' shadows previous one
161 :     2223.12-2223.18: warning: type `vector' shadows previous one
162 :     2270.12-2270.17: warning: type `array' shadows previous one
163 :     2271.12-2271.18: warning: type `vector' shadows previous one
164 :     2429.11-2429.12: warning: value or constructor `+' shadows previous one
165 :     2430.11-2430.12: warning: value or constructor `-' shadows previous one
166 :     2432.11-2432.12: warning: value or constructor `<' shadows previous one
167 :     2433.11-2433.12: warning: value or constructor `>' shadows previous one
168 :     2434.11-2434.13: warning: value or constructor `<=' shadows previous one
169 :     2435.11-2435.13: warning: value or constructor `>=' shadows previous one
170 :     2452.9-2452.10: warning: type `t' shadows previous one
171 :     -- Elaboration...
172 :     -- Translation...
173 :     -- Flattening...
174 :     -- Value Propagation...
175 :     /usr/bin/sml-cm: Fatal error -- unexpected fault, signal = 11, code = 0x40555c6e
176 :    
177 :     Comments:
178 :     [jhr, 1/24/01]
179 :     I'd like to understand what you are doing during "Value Propagation",
180 :     since that is where the problem occurs. Also, are you using unsafe
181 :     operations or compiler hooks, or is your code vanilla SML?
182 :    
183 :     [jhr, 1/24/01]
184 :     There seems to be some architecture sensitivity to this bug. Here are the
185 :     results of running `use "Bug.sml";' on various machines:
186 :    
187 :     x86-linux: core dump
188 :    
189 :     sparc-solaris: terminates with a result
190 :    
191 :     mipseb-irix: uncaught exception Lookup
192 :     raised at: backend-common/ValuePropagationPhase.sml:79.24-79.34
193 :    
194 :     alpha-dunix: uncaught exception Lookup
195 :     raised at: backend-common/ValuePropagationPhase.sml:79.24-79.34
196 :    
197 :     [Kornstaedt]
198 :     A note on what the program *should* be doing: It is the front-end and
199 :     middle-end of the language Alice, which is an extension of SML.
200 :     The function "Mail.flattenFile" runs the front-end and middle-end on
201 :     the input file given as argument, which is a part of the basis library
202 :     (interspersed with declarations needed to access primitive operations).
203 :     It *should* return an intermediate representation or raise an exception.
204 :    
205 :     If it is of any interest to you, I could produce diffs between the version
206 :     I sent you and the version that was in our CVS repository at that time
207 :     (which worked)?
208 :    
209 :     [jhr, 1/24/00]
210 :     That might be useful.
211 :    
212 :     Fix:
213 :     Test:
214 :     Owner: ?
215 :     Status: open
216 :     ----------------------------------------------------------------------
217 :     Number: 1602
218 :     Title: Nonexhaustive match failure during compilation
219 :     Keywords: modules, types
220 :     Submitter: Neophytos Michael nmichael@cs.princeton.edu
221 :     Date: 02/01/01
222 :     Version: 110.0.7
223 :     System: Sparc Solaris 5.8
224 :     Subsystem: SML compiler
225 :     Severity: minor
226 :     Problem:
227 :     The program below causes an exception from the compiler. The program
228 :     is compiled using CM. The program is incorrect since signature Absyn
229 :     is non-existent but the compiler shouldn't raise an exception like
230 :     that.
231 :    
232 :     Code:
233 :     signature SSS =
234 :     sig
235 :     structure A : Absyn
236 :     val foo : A.foo -> A.bar
237 :     end;
238 :    
239 :     structure sss : SSS =
240 :     struct
241 :     structure A = Absyn
242 :     fun foo x = x
243 :     end;
244 :    
245 :     Transcript:
246 :    
247 :     - [starting dependency analysis]
248 :     [parsing a.sml]
249 :     [dependency analysis completed]
250 :     [compiling a.sml -> CM/sparc-unix/a.sml.bin]
251 :     a.sml:3.3-4.28 Error: unbound signature: Absyn
252 :     a.sml:9.17-9.22 Error: unbound structure: Absyn
253 :    
254 :     uncaught exception nonexhaustive match failure
255 :     raised at: modules/sigmatch.sml:845.14
256 :     modules/sigmatch.sml:884.25
257 :     modules/sigmatch.sml:966.24
258 :     elaborate/elabmod.sml:1223.8
259 :     util/stats.sml:164.40
260 :     sched/recompile.sml:206.38-206.41
261 :    
262 :     Comments:
263 :     [dbm, 2/28/01]
264 :     Bug disappears if declarations are followed by ";".
265 :     Fix:
266 :     Test: bug1602.1.sml
267 :     Owner: dbm
268 :     Status: open
269 :     ----------------------------------------------------------------------
270 :     Number: 1603
271 :     Title: Unbound exception from recursive datatype replication
272 :     Keywords:
273 :     Submitter: Allen Leung <leunga@cs.nyu.edu>
274 :     Date: 11/23/00
275 :     Version: 110.32?
276 :     System: -
277 :     Severity: major
278 :     Problem:
279 :     An Unbound exception is raised while elaborating a functor declaration
280 :     containing a datatype replication declaration with a recursive datatype.
281 :     Code:
282 :     (* This causes an Unbound exception *)
283 :     signature FOO = sig type hey = string datatype foo = A | B of hey end
284 :     structure Foo = struct type hey = string datatype foo = A | B of hey end
285 :     signature BAR = sig structure Foo : FOO datatype bar = datatype Foo.foo end
286 :     functor Bar() : BAR =
287 :     struct
288 :     structure Foo = Foo
289 :     datatype bar = datatype Foo.foo
290 :     end
291 :    
292 :     (* But this is okay *)
293 :     signature FOO = sig type hey = string datatype foo = A | B of string end
294 :     structure Foo = struct type hey = string datatype foo = A | B of string end
295 :     signature BAR = sig structure Foo : FOO datatype bar = datatype Foo.foo end
296 :     functor Bar() : BAR =
297 :     struct
298 :     structure Foo = Foo
299 :     datatype bar = datatype Foo.foo
300 :     end
301 :     Transcript:
302 :     Comments:
303 :     Fix:
304 :     Test:
305 :     Owner: dbm
306 :     Status: open
307 :     ----------------------------------------------------------------------
308 :     Number: 1604
309 :     Title: suboptimal type error message
310 :     Keywords: error messages, type checking
311 :     Submitter: David B. Benson <dbenson@eecs.wsu.edu>
312 :     Date: 10/13/00
313 :     Version: 110.0.6
314 :     System: -
315 :     Severity: medium
316 :     Problem:
317 :     In the example below, I think the operator domain error message ought to read
318 :    
319 :     operator domain: ?.Substitutions.Map.Key.ord_key list list
320 :    
321 :     since the error comes from leaving off the <where> clause in the line
322 :    
323 :     structure Map : ORD_MAP (* where type Key.ord_key = string *)
324 :    
325 :     in the Substitutions : SUBSTITUTIONS signature.
326 :    
327 :     Transcript:
328 :     Standard ML of New Jersey, Version 110.0.6, October 31, 1999 ...
329 :     [snip]
330 :     [compiling ScanSubstitute.sml -> CM/x86-unix/ScanSubstitute.sml.bin]
331 :     ScanSubstitute.sml:30.9-32.41 Error: operator and operand don't agree [tycon mismatch]
332 :     operator domain: ?.Substitutions.ord_key list list
333 :     operand: string list list
334 :     in expression:
335 :     ((List.foldl (fn <pat> => <exp>)) Substitutions.Map.empty) aliases
336 :     Comments:
337 :     I can provide the entire source code, but it is spread over many directories
338 :     and subdirectories of .sml files.
339 :     Fix:
340 :     Test:
341 :     Owner: dbm
342 :     Status: open
343 :     ----------------------------------------------------------------------
344 :     Number: 1605
345 :     Title: out-of-date example of ML-lex in lexgen.{doc,tex}
346 :     Keywords: "ML-lex ", "inputc", "open_in", "IO", "output"
347 :     Submitter: Richard Bowers cszrjb@comp.leeds.ac.uk
348 :     Date: 02/07/01
349 :     Version: 110
350 :     System: -
351 :     Subsystem: ML-Lex
352 :     Severity: minor
353 :     Problem:
354 :     The example of the ML-lex prog (how to use the output) doesn't work!!
355 :     I think it is that there are calls to functions which don't exist
356 :     anymore.
357 :     Code:
358 :     1: val error = fn x => output(std_out,x ^ "\n")
359 :     2: val lexer = Mlex.makeLexer( inputc (open_in "{filename}"));
360 :     Transcript:
361 :     1: SML:9.21-9.27 Error: unbound variable or constructor: output
362 :     SML:9.28-9.35 Error: unbound variable or constructor: std_out
363 :     2: similar to above
364 :    
365 :     Comments:
366 :     Fix:
367 :     update documentation for SML '97
368 :     Test:
369 :     Owner: dbm
370 :     Status: open
371 :     ----------------------------------------------------------------------
372 :     Number: 1606
373 :     Title: absolute paths in .run-sml prevent moving installation
374 :     Keywords: scripts command
375 :     Submitter: John D. Ramsdell <ramsdell@mitre.org>
376 :     Date: Wed Feb 21 09:41:33 2001
377 :     Version: 110.0.7
378 :     System: all
379 :     Severity: minor
380 :     Problem: The use of absolute paths makes moving installations break
381 :     Comments:
382 :     The enclosed patch works with the Borne, Korn, and Born Again Shell
383 :     [jhr, 2/21/01]
384 :     The fact that one cannot move the installation is a known problem.
385 :     In addition to the path in the script, there is the problem with
386 :     the CM path. Unfortunately, your fix is not portable. I would
387 :     recommend either symbolic links or editing the script as workarounds.
388 :     Fix:
389 :     bash-2.01$ diff -u .run-sml.orig .run-sml
390 :     --- .run-sml.orig Wed Feb 21 09:23:34 2001
391 :     +++ .run-sml Wed Feb 21 09:41:33 2001
392 :     @@ -21,7 +21,8 @@
393 :     #
394 :    
395 :     # the path of the directory in which executables (like this file) are kept.
396 :     -BIN_DIR=/afs/rcf.mitre.org/project/malcode/user/ramsdell/sml/bin
397 :     +WHOLE_COMMAND=`command -v "$0"`
398 :     +BIN_DIR=`dirname "$WHOLE_COMMAND"`
399 :    
400 :     # the path of the directory in which the runtime system executables are kept.
401 :     RUN_DIR=$BIN_DIR/.run
402 :    
403 :     Test:
404 :     Owner: jhr
405 :     Status: open (or not a bug)
406 :     ----------------------------------------------------------------------
407 :     Number: 1607
408 :     Title: inaccurate transcendentals (Math.sin)
409 :     Keywords: Math, transcendentals
410 :     Submitter: Allen Leung <leunga@cs.nyu.edu>
411 :     Date: 2/22/01
412 :     Version: 110.32.1
413 :     System: x86-linux
414 :     Severity: high
415 :     Problem:
416 :     Math.sin does not return accurate result.
417 :     Transcript:
418 :     Math.sin Math.pi;
419 :     val it = 1.22460635382E~16 : real
420 :     Comments:
421 :     I think this has something to do with the recent change of
422 :     generating inlined x86 transcendental instructions,
423 :     and the funky 64-bit/80-bit precision mismatch in the architecture.
424 :     Fix:
425 :     Test: bug1607.1.sml
426 :     Owner: ?
427 :     Status: open
428 :     ----------------------------------------------------------------------
429 :     Number: 1608
430 :     Title: where clauses in sig causes compiler bug: unexpected DATATYPE 354
431 :     Keywords: signature, where
432 :     Submitter: Allen Leung leunga@cs.nyu.edu
433 :     Date: 02/28/01
434 :     Version: 110.32.1
435 :     System: Any/All Any Unix
436 :     Subsystem: SML compiler
437 :     Severity: minor
438 :     Problem:
439 :     Code such as
440 :    
441 :     signature FOO = sig ... end where ...
442 :    
443 :     triggers a compiler bug:
444 :    
445 :     Error: Compiler bug: Instantiate: unexpected DATATYPE 354
446 :    
447 :     uncaught exception Error
448 :     raised at: ../compiler/MiscUtil/util/errormsg.sml:54.14-54.19
449 :     ../compiler/Semant/modules/instantiate.sml:1476.8
450 :     ../compiler/Semant/modules/instantiate.sml:1577.6
451 :    
452 :     Code:
453 :    
454 :     signature CELLS_BASIS =
455 :     sig
456 :     type cellkindInfo
457 :     type cellkindDesc
458 :     datatype cellkind = GP | FP | CC | MEM | CTRL
459 :     | MISC_KIND of cellkindInfo ref
460 :     datatype cell =
461 :     CELL of {id : int, col : cellColor ref, desc : cellkindDesc }
462 :     and cellColor =
463 :     MACHINE of int | PSEUDO | ALIASED of cell | SPILLED
464 :     structure HashTable : MONO_HASH_TABLE where type Key.hash_key = cell
465 :     structure ColorTable : MONO_HASH_TABLE where type Key.hash_key = cell
466 :    
467 :     end
468 :    
469 :     structure CellsInternal =
470 :     struct
471 :    
472 :     datatype cellkindInfo = INFO of {name:string, nickname:string}
473 :     datatype cellkind = GP | FP | CC | MEM | CTRL
474 :     | MISC_KIND of cellkindInfo ref (* client defined *)
475 :     datatype cellkindDesc =
476 :     DESC of
477 :     {kind : cellkind,
478 :     counter : int ref,
479 :     low : int,
480 :     high : int,
481 :     toString : int -> string,
482 :     toStringWithSize : int * int -> string,
483 :     defaultValues : (int * int) list,
484 :     physicalRegs : cell Array.array ref,
485 :     zeroReg : int option
486 :     }
487 :     and cell = CELL of {id : int, col : cellColor ref, desc : cellkindDesc }
488 :     and cellColor = MACHINE of int | PSEUDO | ALIASED of cell | SPILLED
489 :     end
490 :    
491 :     structure CellsBasis : CELLS_BASIS =
492 :     struct
493 :    
494 :     structure I = CellsInternal
495 :    
496 :     datatype cellkind = datatype I.cellkind
497 :     datatype cellkindInfo = datatype I.cellkindInfo
498 :     datatype cellkindDesc = datatype I.cellkindDesc
499 :     datatype cell = datatype I.cell
500 :     datatype cellColor = datatype I.cellColor
501 :    
502 :     fun error msg = (print msg; raise Match)
503 :    
504 :     fun hashCell _ = error "hashCell"
505 :     fun hashColor _ = error "hashColor"
506 :     fun sameCell _ = error "sameCell"
507 :     fun sameColor _ = error "sameColor"
508 :    
509 :     structure HashTable =
510 :     HashTableFn(type hash_key = cell
511 :     val hashVal = hashCell
512 :     val sameKey = sameCell)
513 :    
514 :     structure ColorTable =
515 :     HashTableFn(type hash_key = cell
516 :     val hashVal = hashColor
517 :     val sameKey = sameColor)
518 :    
519 :     end
520 :    
521 :     signature CELLS_COMMON =
522 :     sig
523 :     include CELLS_BASIS
524 :     end
525 :     where type cellkind = CellsBasis.cellkind
526 :     and type cellkindDesc = CellsBasis.cellkindDesc
527 :     and type cellkindInfo = CellsBasis.cellkindInfo
528 :     and type cell = CellsBasis.cell
529 :     and HashTable = CellsBasis.HashTable
530 :     and ColorTable = CellsBasis.ColorTable
531 :    
532 :     Transcript:
533 :     leunga@react-ilp.cs.nyu.edu:~/SML/src/MLRISC++{12}> sml
534 :     Standard ML of New Jersey v110.32.1 [FLINT v1.5], January 4, 2001
535 :     - use "BUG.sml";
536 :     [opening BUG.sml]
537 :     [autoloading]
538 :     [autoloading done]
539 :     Error: Compiler bug: Instantiate: unexpected DATATYPE 354
540 :    
541 :     uncaught exception Error
542 :     raised at: ../compiler/MiscUtil/util/errormsg.sml:54.14-54.19
543 :     ../compiler/Semant/modules/instantiate.sml:1476.8
544 :     ../compiler/Semant/modules/instantiate.sml:1577.6
545 :     ../compiler/MiscUtil/util/stats.sml:190.40
546 :     ../compiler/Semant/elaborate/elabmod.sml:1369.33
547 :     ../compiler/MiscUtil/util/stats.sml:190.40
548 :     ../compiler/TopLevel/interact/evalloop.sml:60.55
549 :     ../compiler/TopLevel/interact/evalloop.sml:251.25-251.28
550 :     ../compiler/TopLevel/interact/evalloop.sml:60.55
551 :     ../compiler/TopLevel/main/compile.sml:231.13-231.58
552 :     ../compiler/MiscUtil/util/stats.sml:190.40
553 :     ../compiler/TopLevel/interact/evalloop.sml:60.55
554 :     -
555 :     Comments:
556 :     The same code works in 110.0.6, 110.26 etc.
557 :    
558 :     [dbm, 2/28/01]
559 :     This seems to be a reoccurence of bug 1414.
560 :    
561 :     Fix:
562 :     Test: bug1608.1.sml
563 :     Owner: dbm
564 :     Status: open
565 :     ----------------------------------------------------------------------
566 :     Number: 1609
567 :     Title: CM_PATH and PATH variables only set for user doing the install
568 :     Keywords:
569 :     Submitter: Richard Duran duranr@utep.edu
570 :     Date: 03/07/01
571 :     Version: 110.0.6
572 :     System: x86 Windows NT 4.0 SP 6a
573 :     Subsystem: Installation
574 :     Severity: minor
575 :     Problem:
576 :     When I installed the software as distributed with the
577 :     High Assurance Transformation System (HATS v.1.3.8) from
578 :     Sandia Nat'l Labs, I noticed that the CM_PATH and PATH
579 :     variables were set to the installing users local
580 :     environment, rather than the global system enviroment
581 :     (and I did the installation as Administrator). As a
582 :     result the software didn't work.
583 :    
584 :     I was able to get around this by creating CM_PATH as
585 :     a system variable, appending C:/sml/bin to the PATH system
586 :     variable, and deleting the CM_PATH and PATH user variables
587 :     that were created by the installation (I probably didn't
588 :     need to do this last step, but I figured it was cleaner to
589 :     do so).
590 :    
591 :     If this has been corrected, you may want to contact
592 :     Victor Winter (vlwinte@sandia.gov) about it.
593 :    
594 :     Fix:
595 :     Fixed setup.rul in windows/configwin/win32 to set environment variables
596 :     at the system level rather than user level.
597 :     Test:
598 :     Owner: dbm
599 :     Status: fixed in 110.0.7
600 :     ----------------------------------------------------------------------
601 :     Number: 1610
602 :     Title: parsing OR-patterns with char literals
603 :     Keywords: parsing, OR-patterns, char literals
604 :     Submitter: Dave MacQueen
605 :     Date: 5/7/2001
606 :     Version: 110.0.7
607 :     System: -
608 :     Severity: medium
609 :     Problem:
610 :     In an OR pattern with character literals, the trailing literals have
611 :     to be separated from the "|" by spaces (on the right). This is not
612 :     necessary for int literals.
613 :     Transcript:
614 :     - fun f (SOME[(#"t" | #"f")]) = true | f _ = false;
615 :     val f = fn : char list option -> bool
616 :     - fun f (SOME[(#"t"| #"f")]) = true | f _ = false;
617 :     val f = fn : char list option -> bool
618 :     - fun f (SOME[(1|2)]) = true | f _ = false;
619 :     val f = fn : int list option -> bool
620 :     - fun f (SOME[(#"t"|#"f")]) = true | f _ = false;
621 :     stdIn:46.5-46.47 Error: non-constructor applied to argument in pattern
622 :     -
623 :     Comments:
624 :     Fix:
625 :     Test: bug1610.1.sml
626 :     Owner: dbm, jhr
627 :     Status: open
628 :     ----------------------------------------------------------------------
629 :     Number: 1611
630 :     Title: top-level Empty not equal to List.Empty
631 :     Keywords: exceptions, Empty, List, top-level
632 :     Submitter: Lal George <george@research.bell-labs.com>
633 :     Date: 5/9/01
634 :     Version: 110.20 and later
635 :     System: -
636 :     Severity: major
637 :     Problem:
638 :     The top level binding of exception Empty is different
639 :     from List.Empty
640 :     Transcript:
641 :     - hd [] handle Empty => 1;
642 :     val it = 1 : int
643 :     - hd [] handle List.Empty => 1;
644 :    
645 :     uncaught exception Empty
646 :     raised at: smlnj/init/pervasive.sml:191.19-191.24
647 :     stdIn:2.28
648 :     ../compiler/TopLevel/interact/evalloop.sml:60.55
649 :     ../compiler/TopLevel/main/compile.sml:231.13-231.58
650 :     ../compiler/MiscUtil/util/stats.sml:190.40
651 :     ../compiler/TopLevel/interact/evalloop.sml:60.55
652 :     -
653 :     Comments:
654 :     Fix:
655 :     In src/system/Basis/Implementation/list.sml, the declaration of
656 :     Empty should be
657 :    
658 :     exception Empty = Empty
659 :    
660 :     so that it is equated with the Empty defined in Pervasives
661 :     (file src/system/init/pervasives.sml).
662 :     Test: bug1611.1.sml
663 :     Owner: dbm
664 :     Status: fixed in 110.33
665 :     ----------------------------------------------------------------------
666 :     Number: 1612
667 :     Title: poor code generation for nested loops
668 :     Keywords: FLINT, optimization, code generation, performance
669 :     Submitter: John Reppy jhr@research.bell-labs.com
670 :     Date: 06/12/01
671 :     Version: 110.33
672 :     System: Any/All Any Unix
673 :     Subsystem: SML compiler
674 :     Severity: medium
675 :     Problem:
676 :     Code generation for nested loops creates inefficient code.
677 :    
678 :     Code:
679 :     structure A = struct
680 :    
681 :     fun applyF (f : (int * int) -> unit, n : int) = let
682 :     fun lp_i i = if (i < n)
683 :     then let
684 :     fun lp_j j = if (j < n)
685 :     then (f(i, j); lp_j(j+1))
686 :     else ()
687 :     in
688 :     lp_j 0; lp_i(i+1)
689 :     end
690 :     else ()
691 :     in
692 :     lp_i 0
693 :     end
694 :    
695 :     end;
696 :    
697 :     structure Main =
698 :     struct
699 :    
700 :     fun main () = A.applyF(fn _ => (), 10000)
701 :    
702 :     end
703 :    
704 :     Transcript:
705 :    
706 :     Comments:
707 :    
708 :     Fix:
709 :    
710 :     Test:
711 :     Owner: Zhong
712 :     Status: open
713 :     ----------------------------------------------------------------------
714 :     Number: 1613
715 :     Title: Fatal error -- unexpected fault (on x86-linux, sparc-solaris)
716 :     Keywords: codegen/parser?
717 :     Submitter: Stefan Sorensen <sts@daimi.au.dk>
718 :     Date: 06/14/2001
719 :     Version: 110.0.7
720 :     System: sparc-solaris2.7, x86-linux
721 :     Severity: major
722 :     Problem:
723 :    
724 :     The code included below generates an unexpected fault (SIGSEGV) on
725 :     some architectures / os revisions - A RedHat 7.1 system (kernel
726 :     2.4.3, glibc 2.2.3) and a sparc-solaris 2.7 system raises the fault
727 :     - a RedHat 6.2 (kernel 2.2.17, glibc 2.1.3) didn't (but does with a
728 :     larger example). mipbeb-irix and hppa-hpux gave no errors at all.
729 :    
730 :     If a whitespace is added in line 17 of foo.sml, the fault no longer
731 :     occurs (parser bug?).
732 :    
733 :     Code:
734 :     ------ start foo.sml ------
735 :     datatype ''a ms =
736 :     !! of ''a ms
737 :     | empty;
738 :    
739 :     datatype type1 = A1;
740 :     type type2 = int;
741 :     datatype type3 = C1 | C2 | C3 | C4;
742 :     datatype type4 = D1 | D2 | D3 | D4;
743 :     datatype type5 = E1 | E2;
744 :    
745 :     type type6={
746 :     A66:(type1 ms) ref,
747 :     A68:(type1 ms) ref,
748 :     A70:(type2 ms) ref,
749 :     A72:(type2 ms) ref,
750 :     A74:(type2 ms) ref,
751 :     A76:(type1 ms) ref,
752 :     A80:(type2 ms) ref,
753 :     A82:(type2 ms) ref,
754 :     A83:(type1 ms) ref,
755 :     A84:(type1 ms) ref,
756 :     A86:(type2 ms) ref,
757 :     A88:(type2 ms)ref,
758 :     A90:(type2 ms)ref,
759 :     A92:(type2 ms)ref,
760 :     A94:(type2 ms)ref,
761 :     A96:(type2 ms)ref,
762 :     A98:(type1 ms)ref,
763 :     A100:(type1 ms)ref,
764 :     A101:(type1 ms)ref,
765 :     A103:(type2 ms)ref,
766 :     A105:(type2 ms)ref,
767 :     A107:(type2 ms)ref,
768 :     A109:(type2 ms)ref,
769 :     A111:(type1 ms)ref,
770 :     A113:(type2 ms)ref,
771 :     A115:(type2 ms)ref,
772 :     A117:(type1 ms)ref,
773 :     A118:(type1 ms)ref,
774 :     A120:(type4 ms)ref,
775 :     A122:(type5 ms)ref,
776 :     A124:(type3 ms)ref,
777 :     A126:(type2 ms)ref,
778 :     A129:(type1 ms)ref,
779 :     A130:(type2 ms)ref,
780 :     A131:(type1 ms)ref,
781 :     A133:(type2 ms)ref,
782 :     A135:(type2 ms)ref,
783 :     A136:(type2 ms)ref,
784 :     A137:(type2 ms)ref,
785 :     A138:(type2 ms)ref,
786 :     A139:(type2 ms)ref,
787 :     A140:(type1 ms)ref,
788 :     A141:(type1 ms)ref,
789 :     A143:(type2 ms)ref,
790 :     A144:(type2 ms)ref,
791 :     A145:(type2 ms)ref,
792 :     A146:(type2 ms)ref,
793 :     A147:(type2 ms)ref,
794 :     A148:(type2 ms)ref,
795 :     A150:(type2 ms)ref,
796 :     A151:(type2 ms)ref,
797 :     A152:(type2 ms)ref,
798 :     A153:(type2 ms)ref,
799 :     A154:(type2 ms)ref,
800 :     A155:(type2 ms)ref,
801 :     A156:(type2 ms)ref,
802 :     A157:(type2 ms)ref,
803 :     A159:(type2 ms)ref,
804 :     A161:(type2 ms)ref,
805 :     A163:(type2 ms)ref,
806 :     A165:(type2 ms)ref,
807 :     A167:(type2 ms)ref,
808 :     A168:(type2 ms)ref,
809 :     A169:(type2 ms)ref,
810 :     A170:(type2 ms)ref,
811 :     A172:(type2 ms)ref,
812 :     A174:(type2 ms)ref,
813 :     A176:(type2 ms)ref,
814 :     A178:(type2 ms)ref,
815 :     A179:(type2 ms)ref,
816 :     A180:(type2 ms)ref,
817 :     A181:(type2 ms)ref,
818 :     A182:(type2 ms)ref,
819 :     A184:(type1 ms)ref,
820 :     A185:(type1 ms)ref,
821 :     A186:(type1 ms)ref,
822 :     A188:(type1 ms)ref,
823 :     A189:(type2 ms)ref,
824 :     A190:(type1 ms)ref,
825 :     A192:(type3 ms)ref,
826 :     A194:(type3 ms)ref,
827 :     A196:(type5 ms)ref,
828 :     A198:(type2 ms)ref,
829 :     A201:(type3 ms)ref,
830 :     A203:(type3 ms)ref,
831 :     A204:(type5 ms)ref,
832 :     A205:(type2 ms)ref,
833 :     A207:(type2 ms)ref,
834 :     A208:(type2 ms)ref,
835 :     A209:(type2 ms)ref,
836 :     A211:(type3 ms)ref,
837 :     A213:(type3 ms)ref,
838 :     A214:(type5 ms)ref,
839 :     A215:(type2 ms)ref,
840 :     A217:(type1 ms)ref,
841 :     A218:(type2 ms)ref,
842 :     A219:(type1 ms)ref,
843 :     A220:(type2 ms)ref,
844 :     A222:(type1 ms)ref,
845 :     A223:(type2 ms)ref,
846 :     A224:(type1 ms)ref,
847 :     A225:(type2 ms)ref,
848 :     A227:(type1 ms)ref,
849 :     A228:(type2 ms)ref,
850 :     A229:(type1 ms)ref,
851 :     A230:(type2 ms)ref,
852 :     A232:(type1 ms)ref,
853 :     A233:(type2 ms)ref,
854 :     A234:(type1 ms)ref,
855 :     A235:(type2 ms)ref,
856 :     A237:(type2 ms)ref,
857 :     A239:(type2 ms)ref,
858 :     A240:(type2 ms)ref,
859 :     A242:(type2 ms)ref,
860 :     A243:(type2 ms)ref,
861 :     A246:(type1 ms)ref,
862 :     A247:(type2 ms)ref,
863 :     A248:(type1 ms)ref,
864 :     A249:(type2 ms)ref,
865 :     A251:(type1 ms)ref,
866 :     A252:(type2 ms)ref,
867 :     A253:(type1 ms)ref,
868 :     A254:(type2 ms)ref,
869 :     A256:(type3 ms)ref,
870 :     A258:(type5 ms)ref,
871 :     A260:(type3 ms)ref,
872 :     A262:(type2 ms)ref,
873 :     A265:(type3 ms)ref,
874 :     A267:(type5 ms)ref,
875 :     A268:(type3 ms)ref,
876 :     A269:(type2 ms)ref,
877 :     A271:(type3 ms)ref,
878 :     A273:(type5 ms)ref,
879 :     A274:(type3 ms)ref,
880 :     A275:(type2 ms)ref,
881 :     A277:(type2 ms)ref,
882 :     A278:(type2 ms)ref,
883 :     A279:(type2 ms)ref,
884 :     A281:(type1 ms)ref,
885 :     A282:(type2 ms)ref,
886 :     A283:(type1 ms)ref,
887 :     A284:(type2 ms)ref,
888 :     A286:(type1 ms)ref,
889 :     A287:(type2 ms)ref,
890 :     A288:(type1 ms)ref,
891 :     A289:(type2 ms)ref,
892 :     A291:(type1 ms)ref,
893 :     A292:(type2 ms)ref,
894 :     A293:(type1 ms)ref,
895 :     A294:(type2 ms)ref,
896 :     A296:(type1 ms)ref,
897 :     A297:(type2 ms)ref,
898 :     A298:(type1 ms)ref,
899 :     A299:(type2 ms)ref,
900 :     A301:(type2 ms)ref,
901 :     A302:(type2 ms)ref,
902 :     A303:(type2 ms)ref,
903 :     A304:(type2 ms)ref,
904 :     A305:(type2 ms)ref,
905 :     A307:(type1 ms)ref,
906 :     A308:(type2 ms)ref,
907 :     A309:(type1 ms)ref,
908 :     A310:(type2 ms)ref,
909 :     A312:(type1 ms)ref,
910 :     A313:(type2 ms)ref,
911 :     A314:(type1 ms)ref,
912 :     A315:(type2 ms)ref,
913 :     A317:(type2 ms)ref,
914 :     A318:(type1 ms)ref,
915 :     A319:(type2 ms)ref,
916 :     A320:(type1 ms)ref,
917 :     A322:(type2 ms)ref,
918 :     A323:(type1 ms)ref,
919 :     A324:(type2 ms)ref,
920 :     A325:(type2 ms)ref,
921 :     A326:(type1 ms)ref,
922 :     A328:(type3 ms)ref,
923 :     A329:(type5 ms)ref,
924 :     A331:(type3 ms)ref,
925 :     A332:(type2 ms)ref,
926 :     A334:(type1 ms)ref,
927 :     A335:(type2 ms)ref,
928 :     A336:(type1 ms)ref,
929 :     A337:(type2 ms)ref,
930 :     A338:(type2 ms)ref,
931 :     A340:(type1 ms)ref,
932 :     A341:(type2 ms)ref,
933 :     A342:(type1 ms)ref,
934 :     A343:(type2 ms)ref,
935 :     A345:(type2 ms)ref,
936 :     A346:(type2 ms)ref,
937 :     A347:(type2 ms)ref,
938 :     A348:(type2 ms)ref,
939 :     A349:(type2 ms)ref,
940 :     A351:(type1 ms)ref,
941 :     A352:(type1 ms)ref,
942 :     A353:(type1 ms)ref,
943 :     A355:(type1 ms)ref,
944 :     A357:(type2 ms)ref,
945 :     A359:(type2 ms)ref,
946 :     A361:(type2 ms)ref,
947 :     A363:(type2 ms)ref,
948 :     A365:(type2 ms)ref,
949 :     A367:(type2 ms)ref,
950 :     A370:(type1 ms)ref,
951 :     A371:(type2 ms)ref,
952 :     A372:(type1 ms)ref,
953 :     A374:(type1 ms)ref,
954 :     A375:(type2 ms)ref,
955 :     A376:(type1 ms)ref,
956 :     A378:(type1 ms)ref,
957 :     A379:(type2 ms)ref,
958 :     A380:(type1 ms)ref,
959 :     A382:(type1 ms)ref,
960 :     A383:(type2 ms)ref,
961 :     A384:(type2 ms)ref,
962 :     A385:(type1 ms)ref,
963 :     A387:(type2 ms)ref,
964 :     A388:(type2 ms)ref,
965 :     A389:(type2 ms)ref,
966 :     A390:(type2 ms)ref,
967 :     A392:(type2 ms)ref,
968 :     A393:(type2 ms)ref,
969 :     A394:(type2 ms)ref,
970 :     A396:(type1 ms)ref,
971 :     A397:(type2 ms)ref,
972 :     A398:(type1 ms)ref,
973 :     A399:(type2 ms)ref,
974 :     A401:(type1 ms)ref,
975 :     A402:(type1 ms)ref,
976 :     A403:(type1 ms)ref,
977 :     A404:(type1 ms)ref,
978 :     A406:(type1 ms)ref,
979 :     A408:(type3 ms)ref,
980 :     A411:(type1 ms)ref,
981 :     A413:(type3 ms)ref,
982 :     A416:(type1 ms)ref,
983 :     A418:(type5 ms)ref
984 :     };
985 :    
986 :     fun foo ()={
987 :     A66=ref empty
988 :     ,A68=ref empty
989 :     ,A70=ref empty
990 :     ,A72=ref empty
991 :     ,A74=ref empty
992 :     ,A76=ref empty
993 :     ,A80=ref empty
994 :     ,A82=ref empty
995 :     ,A83=ref empty
996 :     ,A84=ref empty
997 :     ,A86=ref empty
998 :     ,A88=ref empty
999 :     ,A90=ref empty
1000 :     ,A92=ref empty
1001 :     ,A94=ref empty
1002 :     ,A96=ref empty
1003 :     ,A98=ref empty
1004 :     ,A100=ref empty
1005 :     ,A101=ref empty
1006 :     ,A103=ref empty
1007 :     ,A105=ref empty
1008 :     ,A107=ref empty
1009 :     ,A109=ref empty
1010 :     ,A111=ref empty
1011 :     ,A113=ref empty
1012 :     ,A115=ref empty
1013 :     ,A117=ref empty
1014 :     ,A118=ref empty
1015 :     ,A120=ref empty
1016 :     ,A122=ref empty
1017 :     ,A124=ref empty
1018 :     ,A126=ref empty
1019 :     ,A129=ref empty
1020 :     ,A130=ref empty
1021 :     ,A131=ref empty
1022 :     ,A133=ref empty
1023 :     ,A135=ref empty
1024 :     ,A136=ref empty
1025 :     ,A137=ref empty
1026 :     ,A138=ref empty
1027 :     ,A139=ref empty
1028 :     ,A140=ref empty
1029 :     ,A141=ref empty
1030 :     ,A143=ref empty
1031 :     ,A144=ref empty
1032 :     ,A145=ref empty
1033 :     ,A146=ref empty
1034 :     ,A147=ref empty
1035 :     ,A148=ref empty
1036 :     ,A150=ref empty
1037 :     ,A151=ref empty
1038 :     ,A152=ref empty
1039 :     ,A153=ref empty
1040 :     ,A154=ref empty
1041 :     ,A155=ref empty
1042 :     ,A156=ref empty
1043 :     ,A157=ref empty
1044 :     ,A159=ref empty
1045 :     ,A161=ref empty
1046 :     ,A163=ref empty
1047 :     ,A165=ref empty
1048 :     ,A167=ref empty
1049 :     ,A168=ref empty
1050 :     ,A169=ref empty
1051 :     ,A170=ref empty
1052 :     ,A172=ref empty
1053 :     ,A174=ref empty
1054 :     ,A176=ref empty
1055 :     ,A178=ref empty
1056 :     ,A179=ref empty
1057 :     ,A180=ref empty
1058 :     ,A181=ref empty
1059 :     ,A182=ref empty
1060 :     ,A184=ref empty
1061 :     ,A185=ref empty
1062 :     ,A186=ref empty
1063 :     ,A188=ref empty
1064 :     ,A189=ref empty
1065 :     ,A190=ref empty
1066 :     ,A192=ref empty
1067 :     ,A194=ref empty
1068 :     ,A196=ref empty
1069 :     ,A198=ref empty
1070 :     ,A201=ref empty
1071 :     ,A203=ref empty
1072 :     ,A204=ref empty
1073 :     ,A205=ref empty
1074 :     ,A207=ref empty
1075 :     ,A208=ref empty
1076 :     ,A209=ref empty
1077 :     ,A211=ref empty
1078 :     ,A213=ref empty
1079 :     ,A214=ref empty
1080 :     ,A215=ref empty
1081 :     ,A217=ref empty
1082 :     ,A218=ref empty
1083 :     ,A219=ref empty
1084 :     ,A220=ref empty
1085 :     ,A222=ref empty
1086 :     ,A223=ref empty
1087 :     ,A224=ref empty
1088 :     ,A225=ref empty
1089 :     ,A227=ref empty
1090 :     ,A228=ref empty
1091 :     ,A229=ref empty
1092 :     ,A230=ref empty
1093 :     ,A232=ref empty
1094 :     ,A233=ref empty
1095 :     ,A234=ref empty
1096 :     ,A235=ref empty
1097 :     ,A237=ref empty
1098 :     ,A239=ref empty
1099 :     ,A240=ref empty
1100 :     ,A242=ref empty
1101 :     ,A243=ref empty
1102 :     ,A246=ref empty
1103 :     ,A247=ref empty
1104 :     ,A248=ref empty
1105 :     ,A249=ref empty
1106 :     ,A251=ref empty
1107 :     ,A252=ref empty
1108 :     ,A253=ref empty
1109 :     ,A254=ref empty
1110 :     ,A256=ref empty
1111 :     ,A258=ref empty
1112 :     ,A260=ref empty
1113 :     ,A262=ref empty
1114 :     ,A265=ref empty
1115 :     ,A267=ref empty
1116 :     ,A268=ref empty
1117 :     ,A269=ref empty
1118 :     ,A271=ref empty
1119 :     ,A273=ref empty
1120 :     ,A274=ref empty
1121 :     ,A275=ref empty
1122 :     ,A277=ref empty
1123 :     ,A278=ref empty
1124 :     ,A279=ref empty
1125 :     ,A281=ref empty
1126 :     ,A282=ref empty
1127 :     ,A283=ref empty
1128 :     ,A284=ref empty
1129 :     ,A286=ref empty
1130 :     ,A287=ref empty
1131 :     ,A288=ref empty
1132 :     ,A289=ref empty
1133 :     ,A291=ref empty
1134 :     ,A292=ref empty
1135 :     ,A293=ref empty
1136 :     ,A294=ref empty
1137 :     ,A296=ref empty
1138 :     ,A297=ref empty
1139 :     ,A298=ref empty
1140 :     ,A299=ref empty
1141 :     ,A301=ref empty
1142 :     ,A302=ref empty
1143 :     ,A303=ref empty
1144 :     ,A304=ref empty
1145 :     ,A305=ref empty
1146 :     ,A307=ref empty
1147 :     ,A308=ref empty
1148 :     ,A309=ref empty
1149 :     ,A310=ref empty
1150 :     ,A312=ref empty
1151 :     ,A313=ref empty
1152 :     ,A314=ref empty
1153 :     ,A315=ref empty
1154 :     ,A317=ref empty
1155 :     ,A318=ref empty
1156 :     ,A319=ref empty
1157 :     ,A320=ref empty
1158 :     ,A322=ref empty
1159 :     ,A323=ref empty
1160 :     ,A324=ref empty
1161 :     ,A325=ref empty
1162 :     ,A326=ref empty
1163 :     ,A328=ref empty
1164 :     ,A329=ref empty
1165 :     ,A331=ref empty
1166 :     ,A332=ref empty
1167 :     ,A334=ref empty
1168 :     ,A335=ref empty
1169 :     ,A336=ref empty
1170 :     ,A337=ref empty
1171 :     ,A338=ref empty
1172 :     ,A340=ref empty
1173 :     ,A341=ref empty
1174 :     ,A342=ref empty
1175 :     ,A343=ref empty
1176 :     ,A345=ref empty
1177 :     ,A346=ref empty
1178 :     ,A347=ref empty
1179 :     ,A348=ref empty
1180 :     ,A349=ref empty
1181 :     ,A351=ref empty
1182 :     ,A352=ref empty
1183 :     ,A353=ref empty
1184 :     ,A355=ref empty
1185 :     ,A357=ref empty
1186 :     ,A359=ref empty
1187 :     ,A361=ref empty
1188 :     ,A363=ref empty
1189 :     ,A365=ref empty
1190 :     ,A367=ref empty
1191 :     ,A370=ref empty
1192 :     ,A371=ref empty
1193 :     ,A372=ref empty
1194 :     ,A374=ref empty
1195 :     ,A375=ref empty
1196 :     ,A376=ref empty
1197 :     ,A378=ref empty
1198 :     ,A379=ref empty
1199 :     ,A380=ref empty
1200 :     ,A382=ref empty
1201 :     ,A383=ref empty
1202 :     ,A384=ref empty
1203 :     ,A385=ref empty
1204 :     ,A387=ref empty
1205 :     ,A388=ref empty
1206 :     ,A389=ref empty
1207 :     ,A390=ref empty
1208 :     ,A392=ref empty
1209 :     ,A393=ref empty
1210 :     ,A394=ref empty
1211 :     ,A396=ref empty
1212 :     ,A397=ref empty
1213 :     ,A398=ref empty
1214 :     ,A399=ref empty
1215 :     ,A401=ref empty
1216 :     ,A402=ref empty
1217 :     ,A403=ref empty
1218 :     ,A404=ref empty
1219 :     ,A406=ref empty
1220 :     ,A408=ref empty
1221 :     ,A411=ref empty
1222 :     ,A413=ref empty
1223 :     ,A416=ref empty
1224 :     ,A418=ref empty
1225 :     }:type6;
1226 :     fun bar 0 = foo() | bar n = (foo(); bar (n-1));
1227 :     --- end foo.sml ---
1228 :    
1229 :     Transcript:
1230 :    
1231 :     $ sml < bar.sml
1232 :     Standard ML of New Jersey, Version 110.0.7, September 28, 2000 [CM; autoload enabled]
1233 :     - use "foo.sml";
1234 :     [opening foo.sml]
1235 :     datatype 'a ms = !! of 'a ms | empty
1236 :     datatype type1 = A1
1237 :     type type2 = int
1238 :     datatype type3 = C1 | C2 | C3 | C4
1239 :     datatype type4 = D1 | D2 | D3 | D4
1240 :     datatype type5 = E1 | E2
1241 :     GC #0.0.0.0.1.15: (0 ms)
1242 :     type type6 =
1243 :     {A100:type1 ms ref, A101:type1 ms ref, A103:type2 ms ref, A105:type2 ms ref,
1244 :     A107:type2 ms ref, A109:type2 ms ref, A111:type1 ms ref, A113:type2 ms ref,
1245 :     A115:type2 ms ref, A117:type1 ms ref, A118:type1 ms ref, A120:type4 ms ref,
1246 :     A122:type5 ms ref, A124:type3 ms ref, A126:type2 ms ref, A129:type1 ms ref,
1247 :     A130:type2 ms ref, A131:type1 ms ref, A133:type2 ms ref, A135:type2 ms ref,
1248 :     A136:type2 ms ref, A137:type2 ms ref, A138:type2 ms ref, A139:type2 ms ref,
1249 :     A140:type1 ms ref, A141:type1 ms ref, A143:type2 ms ref, A144:type2 ms ref,
1250 :     A145:type2 ms ref, A146:type2 ms ref, A147:type2 ms ref, A148:type2 ms ref,
1251 :     A150:type2 ms ref, A151:type2 ms ref, A152:type2 ms ref, A153:type2 ms ref,
1252 :     A154:type2 ms ref, A155:type2 ms ref, A156:type2 ms ref, A157:type2 ms ref,
1253 :     A159:type2 ms ref, A161:type2 ms ref, A163:type2 ms ref, A165:type2 ms ref,
1254 :     A167:type2 ms ref, A168:type2 ms ref, A169:type2 ms ref, A170:type2 ms ref,
1255 :     A172:type2 ms ref, A174:type2 ms ref, A176:type2 ms ref, A178:type2 ms ref,
1256 :     A179:type2 ms ref, A180:type2 ms ref, A181:type2 ms ref, A182:type2 ms ref,
1257 :     A184:type1 ms ref, A185:type1 ms ref, A186:type1 ms ref, A188:type1 ms ref,
1258 :     A189:type2 ms ref, A190:type1 ms ref, A192:type3 ms ref, A194:type3 ms ref,
1259 :     A196:type5 ms ref, A198:type2 ms ref, A201:type3 ms ref, A203:type3 ms ref,
1260 :     A204:type5 ms ref, A205:type2 ms ref, A207:type2 ms ref, A208:type2 ms ref,
1261 :     A209:type2 ms ref, A211:type3 ms ref, A213:type3 ms ref, A214:type5 ms ref,
1262 :     A215:type2 ms ref, A217:type1 ms ref, A218:type2 ms ref, A219:type1 ms ref,
1263 :     A220:type2 ms ref, A222:type1 ms ref, A223:type2 ms ref, A224:type1 ms ref,
1264 :     A225:type2 ms ref, A227:type1 ms ref, A228:type2 ms ref, A229:type1 ms ref,
1265 :     A230:type2 ms ref, A232:type1 ms ref, A233:type2 ms ref, A234:type1 ms ref,
1266 :     A235:type2 ms ref, A237:type2 ms ref, A239:type2 ms ref, A240:type2 ms ref,
1267 :     A242:type2 ms ref, A243:type2 ms ref, A246:type1 ms ref, A247:type2 ms ref,
1268 :     A248:type1 ms ref, A249:type2 ms ref, A251:type1 ms ref, A252:type2 ms ref,
1269 :     GC #0.0.0.1.2.36: (0 ms)
1270 :     A253:type1 ms ref, A254:type2 ms ref, A256:type3 ms ref, A258:type5 ms ref,
1271 :     A260:type3 ms ref, A262:type2 ms ref, A265:type3 ms ref, A267:type5 ms ref,
1272 :     A268:type3 ms ref, A269:type2 ms ref, A271:type3 ms ref, A273:type5 ms ref,
1273 :     A274:type3 ms ref, A275:type2 ms ref, A277:type2 ms ref, A278:type2 ms ref,
1274 :     A279:type2 ms ref, A281:type1 ms ref, A282:type2 ms ref, A283:type1 ms ref,
1275 :     A284:type2 ms ref, A286:type1 ms ref, A287:type2 ms ref, A288:type1 ms ref,
1276 :     A289:type2 ms ref, A291:type1 ms ref, A292:type2 ms ref, A293:type1 ms ref,
1277 :     A294:type2 ms ref, A296:type1 ms ref, A297:type2 ms ref, A298:type1 ms ref,
1278 :     A299:type2 ms ref, A301:type2 ms ref, A302:type2 ms ref, A303:type2 ms ref,
1279 :     A304:type2 ms ref, A305:type2 ms ref, A307:type1 ms ref, A308:type2 ms ref,
1280 :     A309:type1 ms ref, A310:type2 ms ref, A312:type1 ms ref, A313:type2 ms ref,
1281 :     A314:type1 ms ref, A315:type2 ms ref, A317:type2 ms ref, A318:type1 ms ref,
1282 :     A319:type2 ms ref, A320:type1 ms ref, A322:type2 ms ref, A323:type1 ms ref,
1283 :     A324:type2 ms ref, A325:type2 ms ref, A326:type1 ms ref, A328:type3 ms ref,
1284 :     A329:type5 ms ref, A331:type3 ms ref, A332:type2 ms ref, A334:type1 ms ref,
1285 :     A335:type2 ms ref, A336:type1 ms ref, A337:type2 ms ref, A338:type2 ms ref,
1286 :     A340:type1 ms ref, A341:type2 ms ref, A342:type1 ms ref, A343:type2 ms ref,
1287 :     A345:type2 ms ref, A346:type2 ms ref, A347:type2 ms ref, A348:type2 ms ref,
1288 :     A349:type2 ms ref, A351:type1 ms ref, A352:type1 ms ref, A353:type1 ms ref,
1289 :     A355:type1 ms ref, A357:type2 ms ref, A359:type2 ms ref, A361:type2 ms ref,
1290 :     A363:type2 ms ref, A365:type2 ms ref, A367:type2 ms ref, A370:type1 ms ref,
1291 :     A371:type2 ms ref, A372:type1 ms ref, A374:type1 ms ref, A375:type2 ms ref,
1292 :     A376:type1 ms ref, A378:type1 ms ref, A379:type2 ms ref, A380:type1 ms ref,
1293 :     A382:type1 ms ref, A383:type2 ms ref, A384:type2 ms ref, A385:type1 ms ref,
1294 :     A387:type2 ms ref, A388:type2 ms ref, A389:type2 ms ref, A390:type2 ms ref,
1295 :     A392:type2 ms ref, A393:type2 ms ref, A394:type2 ms ref, A396:type1 ms ref,
1296 :     A397:type2 ms ref, A398:type1 ms ref, A399:type2 ms ref, A401:type1 ms ref,
1297 :     A402:type1 ms ref, A403:type1 ms ref, A404:type1 ms ref, A406:type1 ms ref,
1298 :     A408:type3 ms ref, A411:type1 ms ref, A413:type3 ms ref, A416:type1 ms ref,
1299 :     A418:type5 ms ref, A66:type1 ms ref, A68:type1 ms ref, A70:type2 ms ref,
1300 :     A72:type2 ms ref, A74:type2 ms ref, A76:type1 ms ref, A80:type2 ms ref,
1301 :     A82:type2 ms ref, A83:type1 ms ref, A84:type1 ms ref, A86:type2 ms ref,
1302 :     A88:type2 ms ref, A90:type2 ms ref, A92:type2 ms ref, A94:type2 ms ref,
1303 :     A96:type2 ms ref, A98:type1 ms ref}
1304 :     GC #0.0.0.1.3.84: (10 ms)
1305 :     GC #0.0.0.1.4.108: (0 ms)
1306 :     GC #0.0.0.1.5.174: (0 ms)
1307 :     GC #0.0.0.1.6.314: (0 ms)
1308 :     GC #0.0.0.1.7.442: (0 ms)
1309 :     GC #0.0.0.2.8.451: (10 ms)
1310 :     val foo = fn : unit -> type6
1311 :     GC #0.0.0.2.9.484: (0 ms)
1312 :     val bar = fn : int -> type6
1313 :     val it = () : unit
1314 :     - bar 100000;
1315 :     /usr/bin/sml: Fatal error -- unexpected fault, signal = 11, code = 0x403c8e78
1316 :    
1317 :     Comments:
1318 :    
1319 :     The contents of foo.sml must be exactly as given and is must be
1320 :     invoked with 'use'.
1321 :    
1322 :     Fix:
1323 :     Test: bug1613.1.sml (foo.sml)
1324 :     Owner: ?
1325 :     Status: open
1326 :     ----------------------------------------------------------------------
1327 :     Number: 1614
1328 :     Title: signal handling bug on x86
1329 :     Keywords: signals, continuations, x86
1330 :     Submitter: Matthias Blume blume@research.bell-labs.com
1331 :     Date: 06/25/01
1332 :     Version: 110.33(+)
1333 :     System: x86 Linux
1334 :     Subsystem: SML compiler
1335 :     Severity: major
1336 :     Problem:
1337 :     Installing a (trivial) timer interrupt handler (e.g.,
1338 :     Signals.HANDLER #3) and setting up the interval timer
1339 :     causes segmentation faults on x86. (At least I was unable
1340 :     to reproduce this problem on the Sparc. Don't know about
1341 :     other architectures.)
1342 :    
1343 :     The version of the compiler that was tested is 110.33 + patches.
1344 :     (Without these patches, signal handling is broken on _all_
1345 :     architectures due to record-sizing problem in the runtime.)
1346 :    
1347 :     Code:
1348 :     structure Idle = struct
1349 :     fun idleloop () = let
1350 :     fun idle (x) =
1351 :     if x < 0 then () else let val y = x - 1 in idle y; idle y end
1352 :     in
1353 :     idle (10);
1354 :     idleloop ()
1355 :     end
1356 :     end;
1357 :    
1358 :     structure Test = struct
1359 :     local
1360 :     open SMLofNJ
1361 :     open Cont
1362 :     open IntervalTimer
1363 :     open Signals
1364 :     in
1365 :     fun doit () =
1366 :     (setHandler (sigALRM, HANDLER (fn (_, _, k) => k));
1367 :     setIntTimer (SOME (Time.fromMilliseconds 2000));
1368 :     Idle.idleloop ())
1369 :     end
1370 :     end;
1371 :    
1372 :     val _ = Test.doit ();
1373 :    
1374 :     Transcript:
1375 :     $ sml idle.sml test.sml
1376 :     Standard ML of New Jersey v110.33 [FLINT v1.5], May 23, 2001
1377 :     [opening idle.sml]
1378 :     structure Idle : sig val idleloop : unit -> 'a end
1379 :     [opening test.sml]
1380 :     [autoloading]
1381 :     [autoloading done]
1382 :     structure Test : sig val doit : unit -> 'a end
1383 :     - Test.doit ();
1384 :     stdIn:1.1-1.13 Warning: type vars not generalized because of
1385 :     value restriction are instantiated to dummy types (X1,X2,...)
1386 :     /home/blume/bin/sml: Fatal error -- unexpected fault, signal = 11, code = 0x804ca6a
1387 :     $
1388 :    
1389 :     Comments:
1390 :    
1391 :     Fix:
1392 :     [Matthias, 6/26/01] There was a missing line in restoreregs
1393 :     that caused "pc" not to be loaded correctly (actually,
1394 :     not to be loaded at all).
1395 :    
1396 :     Test:
1397 :     Owner: Lal, jhr, Matthias
1398 :     Status: fixed in 110.33+
1399 :     ----------------------------------------------------------------------

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0