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