axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] RE: patch to daase (probe-file)


From: Page, Bill
Subject: [Axiom-developer] RE: patch to daase (probe-file)
Date: Thu, 28 Sep 2006 12:29:40 -0400

Greg, 

Thanks for looking at this patch.

On Thursday, September 28, 2006 11:45 AM you wrote:
> 
> Bill Page wrote:
> 
> [...]
> 
> > This patch corrects some incorrect usage of 'probe-file' in the 
> > Axiom database code. !! Very important !!
> 
> diff -rN -u old-axiom--windows--1-1/src/interp/daase.lisp.pamphlet
> new-axiom--windows--1-1/src/interp/daase.lisp.pamphlet
> --- old-axiom--windows--1-1/src/interp/daase.lisp.pamphlet Wed Sep20 21:32:48 
> 2006
> +++ new-axiom--windows--1-1/src/interp/daase.lisp.pamphlet Wed Sep20 21:33:06 
> 2006
> ... 
> >    (dolist (dir dirlist)
> >           (localdatabase nil 
> >                          (list (list '|dir| 
> > -                                    (namestring (probe-file 
> > +                                    (namestring (truename 
> >                                                   (format 
> nil "./~a" 
> >                                                           dir)))))
> >                          'make-database))
> 
> Not applied. Is it necessary (I do not have time to look at it)?
> It seems to me if 'dir' is a directory. Bill, or any other, do
> you know how we can trigger this bug (in the interpreter for
> example)?
> 

Since gcl-2.6.7 'probe-file' in gcl returns Nil if it's argument
is a directory so any place that it was used in the Axiom Lisp
code for it's side-effect of expanding a directory name to it's
truename would be in error.

These patches had not be previously applied to the Windows
version of the Axiom source because it was still bases on
gcl-2.6.5.

'make-databases' is not used in the Axiom interpreter. It is
only used during the build from source. It is a function with
two parameters:

interp/daase.lisp.pamphlet:

  (defun make-databases (ext dirlist) ...

and the affected code is:

  (localdatabase nil
     (list (list '|dir| (namestring (truename "./")) ))
     'make-database)
  (dolist (dir dirlist)
          (localdatabase nil
                         (list (list '|dir|
                                     (namestring (probe-file
                                                  (format nil "./~a"
                                                          dir)))))
                         'make-database))

...

But in etc/Makefile.pamphlet, which is the only place where
make=databases is called, we see:

  echo ')lisp (make-databases "" nil)' | ${INTERPSYS} )

so the net effect is that the above bug is not manifest in the
current build but this patch is desirable for possible future
application and consistency.

Regards,
Bill Page.




reply via email to

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