[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] some GCL bugs revealed by ansi test suite

From: Vadim V. Zhytnikov
Subject: [Gcl-devel] some GCL bugs revealed by ansi test suite
Date: Tue, 13 Aug 2002 21:59:09 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.0.0) Gecko/20020526


I'd like to report some GCL bugs revealed during
clocc ansi compatibility tests.  The list is
very far from being complete and problem ranges
from very simple bugs to some quite general
problems which require modification in many many

First, a couple of very simple bugs:

1)  (make-array 5 :fill-pointer -1)
must signal an error for any negative value
of :fill-pointer.

2)  The built-in constant


returns symbol (another constant)


as its value but should return
numerical value (probably the same as
value of array-dimension-limit).

3) The path designator #P"aaa" (capital P)
result in error but should not be different
from #p"aaa".

Now some more serious problems. ANSI tests
clocc suite report really huge number of
errors with floating point operations.
Here is some short extract from error log:

Bugid: :NUMBER-LEGACY-2938 interpreted Form: (+ 0.52019S0 0.98203S0)
Should be: 1.50223S0
AKCL: 1.50222S0

Bugid: :NUMBER-LEGACY-2942 interpreted Form: (+ 0.026268S0 0.6137S0)
Should be: 0.63997S0
AKCL: 0.639968S0

Bugid: :NUMBER-LEGACY-2946 interpreted Form: (+ -0.338943S0 0.450523S0)
Should be: 0.11158S0
AKCL: 0.11158S0

Bugid: :NUMBER-LEGACY-2950 interpreted Form: (+ -0.032799S0 0.995186S0)
Should be: 0.96239S0
AKCL: 0.962387S0

Frankly I don't quite understand how to treat these
results. Are they really bugs? Clisp and cmucl
seems to be OK...

Another similar result which is reported as bug:
1e-37     ->  1.0000000000000001E-37
10.0e-38  ->  9.9999999999999986E-38

Next quite general GCL problem which provides large number of
non-ansi reports is the error handling system.
Presently many GCL functions signals INTERNAL-SIMPLE-ERROR
if some error occurs while ANSI requires something more
sophisticated.  Functions must signal TYPE-ERROR if operand
of wrong type is received, PROGRAM-ERROR is wrong program
structure is encountered etc.  These non-ansi-ines is already
not so easy to fix.  First CONDITIONS (clcs) package should
be modified or replaced to define all required ANSI
error conditions.  Next all relevant functions must be
modified to signal proper error types.  It seems also
that such modification to GCL can't be done with current
build system when we first build saved_gcl and next add PCL and
CONDITIONS and save new image.  With new error system PCL and
CONDITIONS must be present in core GCL from very beginning.

Finally the following code

(defvar *counters* (make-hash-table))

(defmacro how-many (obj) `(values (gethash ,obj *counters* 0)))

(defun count-it (obj) (incf (how-many obj)))

(dolist (x '(bar foo foo bar bar baz)) (count-it x))

produces error in setf.

Best wishes,


      Vadim V. Zhytnikov


reply via email to

[Prev in Thread] Current Thread [Next in Thread]