-
Notifications
You must be signed in to change notification settings - Fork 5
/
BugList.html
277 lines (226 loc) · 7.27 KB
/
BugList.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<html><head><title> EiC's Bug Report List</title></head>
<font size="2">
<body bgcolor="white">
<pre>
EiC's Bug list
Template bug report form
----------------------------------------------
REPORTER:
PLATFORM:
PROBLEM:
EXAMPLE:
POSSIBLE SOLUTION:
TESTPROGRAM:
STATUS: Not Fixed
----------------------------------------------
REPORTER: Martin Gonda (9/1/96)
PROBLEM:
Possibly fix up pre-processor, so that illegal
statements which start with a hash (#) are caught.
EXAMPLE:
#hello ...would get through without an error
POSSIBLE SOLUTION:
TESTPROGAM:
STATUS: Fixed by Ed Breen
----------------------------------------------
REPORTER: Ed Breen
PROBLEM:
A failure to correctly process:
EiC > for(i=0;i<3;i++) { int a[5]; }
EXAMPLE:
EiC 9> for(i=0;i<3;i++) { int a[5]; }
0:checkar 2 0 10:rvalint 5 0
1:pushint 20 11:incint 1
2:massign 12 1 12:stoint 5 0
3:pushint 0 13:decint 1
4:stoint 5 0 14:rvalint 5 0
5:jmpU 7 15:bump 1
6:rvalptr 1 1 16:pushint 3
7:stoptr 0 1 17:ltint
8:fmem 1 1 18:jmpTint 3
9:reducear 2 19:halt
POSSIBLE SOLUTION:
The free memory instruction and the reducear instruction,
lines 8 and 9, have been inserted too early. The resulting bytecode
sequence should be more like:
EiC 11> {for(i=0;i<3;i++) { int a[5]; }}
0:checkar 2 0 10:stoint 5 0
1:pushint 20 11:decint 1
2:massign 1 1 12:rvalint 5 0
3:pushint 0 13:bump 1
4:stoint 5 0 14:pushint 3
5:jmpU 12 15:ltint
6:rvalptr 1 1 16:jmpTint 6
7:stoptr 0 1 17:fmem 1 1
8:rvalint 5 0 18:reducear 2
9:incint 1 19:halt
The above solution forces an extra scoping level. However, this is not
sensible for every translation unit entered at the command line. But
maybe, EiC could keep track of the level of statement nesting
also. Then it could addinlocals (parser.c) at the end of each zero
level statement, in addition to the current method of when the scoping
level drops back to file scope?
if(S_LEVEL == 1 && Stmts == 0)
addinlocals(...);
TESTPROGRAM: see example
STATUS: Fixed, as outlined in possible solution.
----------------------------------------------
REPORTER: Ed Breen
PROBLEM:
Correct the get float/double section in the _Uscanf
EXAMPLE:
for ungetting characters, for example,
fmt string = %f %s
input = 100ergs.
output = 100 rgs
output should be 100 ergs.
POSSIBLE SOLUTION:
Solution requires 2 ungets not just 1.
TESTPROGRAM:
errScanf1.c
STATUS: Fixed by Ed Breen.
----------------------------------------------
REPORTER: Ed Breen
PROBLEM:
Correct the problem with builtin functions
being prototyped when an error occurs. This problem
means that the user will have to restart EiC
to recover properly.
EXAMPLE:
POSSIBLE SOLUTION:
It Has to do with the error recover stategy implemented when
the signals were added to EiC.
TESTPOGRAM:
STATUS: Fixed (hopefully)
----------------------------------------------
REPORTER: Ed Breen
PROBLEM: Does not allow redeclaration of structure specifiers:
EXAMPLE:
struct Dvector { double x, y; };
struct Dvector { double x, y; };
Error in tptr2.c near line 6: Illegal use of struct/union
Error in tptr2.c near line 8: Expected ;
POSSIBLE SOLUTION: ?
TESTPROGRAM: see example
STATUS: Fixed by Ed Breen
----------------------------------------------
REPORTER: Ed Breen
PROBLEM: Memory leak caused when redefining an array:
EXAMPLE:
int a[5];
int a[5];
item 1865 Create line 264 file cdecl.c nbytes 20
POSSIBLE SOLUTION: look at freetype.
TESTPROGRAM: see example
STATUS: Fixed, added routine freeArray to cdecl.c
----------------------------------------------
REPORTER: Ed Breen
PROBLEM: Memory leak caused by exit();
EXAMPLE:
see file t1.c; this directory
#include t1.c
:memdump
(void)
item 4436 Create line 127 file interpre.c nbytes 1200
item 4435 Create line 41 file typemod.c nbytes 16
POSSIBLE SOLUTION:
TESTPROGRAM: see example
STATUS: Not Fixed
----------------------------------------------
REPORTER: Ed Breen
PROBLEM: False diagnostic
EXAMPLE:
EiC 5> if (sizeof (char) * 8 == sizeof (double));
Warning: in ::EiC:: near line 5: Non relational operation
0:pushint 1
1:jmpFint 2
2:halt
POSSIBLE SOLUTION: Because sizeof (char) * 8 == sizeof (double)
resolves to a constant and this might be causing the
problem.
TESTPROGRAM: see example
STATUS: Fixed, corrected bug with unsigned
constant binary relational operators not
converting the result to int properly.
----------------------------------------------
REPORTER: Ed Breen
PROBLEM: Parses an incorrect declaration
EXAMPLE:
EiC 1> int (* foo[10])()[];
(void)
EiC 2> :show foo
foo -> ARY[10]* dec_Func (void ) returning ARY[0]int
(void)
... // Simplification of the problem
EiC 10> int foo()[];
(void)
EiC 11> :show foo
foo -> dec_Func (void ) returning ARY[0]int
(void)
POSSIBLE SOLUTION: Check function declaration
code.
TESTPROGRAM: see example
STATUS: Fixed, added the check_decl function in
the decl.c module. Not an optimal solution,
but it catches both the above errors and
more.
----------------------------------------------
REPORTER: Ed Breen
PROBLEM: False Ambiguous re-declaration
EXAMPLE:
let t.c contain the following two lines
typedef struct { int a, b; } ab_t;
ab_t * func(void) { ab_t * p; return p; }
EiC session
EiC 2> #include t.c
(void)
EiC 3> :rm ab_t
(void)
EiC 4> #include t.c
Error in t.c near line 30: Ambiguous re-declaration of `func'
POSSIBLE SOLUTION:
This has something to do with the memory being freed --
I could make it illegal to remove the last
occurrence of a structure. But that would make
it impossible to change an existing structure. Better
still, handle memory aliasing in a more creative
way -- a big job, but probably worth it.
TESTPROGRAM:
see above.
STATUS: Fixed by Ed Breen -- it turned out to be
quite simple.
----------------------------------------------
REPORTER: Ed Breen
PROBLEM: EiC does not cast structures properly using va_args.
EXAMPLE:
typedef struct { int a, b; } ab_t;
ab_t a = {5,5};
int p(char *fmt, ...)
{
ab_t x;
va_list ap;
va_start(ap, fmt);
x = va_arg(ap, ab_t);
va_end(ap);
return x.a;
}
// the following call returns garbage!
p("",a);
POSSIBLE SOLUTION:
The solution is to get the stack code to `drefptr' the pointer
contained at the `ap' stack position, immediately before the `refmem'
instruction. Although, this is easy to do, it upsets other existing
code such as referencing members within an array of structures and
structure assignments -- a rethink is in order.
TESTPROGRAM:
see above
STATUS: Not Fixed, but the current EiC implementation
flags the passing of a structure or union to
a variadic function as an error.
----------------------------------------------
</pre>
<ADDRESS>
<!-- ADDRESS field used for automatic automatic insertion of links -->
</ADDRESS>
</body>
</html>