From cmucl-devel at common-lisp.net Sat Jan 12 05:35:22 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Sat, 12 Jan 2013 05:35:22 -0000 Subject: [cmucl-ticket] [cmucl] #69: Error parsing ext-formats:unidata.bin Message-ID: <052.75f359414fadd93e7da433b5c67bd800@common-lisp.net> #69: Error parsing ext-formats:unidata.bin --------------------+------------------------------------------------------- Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: Core | Version: 2013-01 Keywords: | --------------------+------------------------------------------------------- Consider the following: {{{ (setf (logical-pathname-translations "foo") '(("**;*.*.*" "/tmp/**/*.*"))) (let ((*default-pathname-defaults* #p"foo:")) (pathname "/tmp/bar.lisp")) }}} This causes an error: {{{ Unable to display error condition: File-error in function LISP::FIND-LOGICAL-HOST: Logical host not yet defined: "EXT-FORMATS" [Condition of type LISP::NAMESTRING-PARSE-ERROR] }}} This happens because CMUCL wants to look up some unicode property and needs to load the unicode database from ext-formats:unidata.bin. Because we use a namestring, this gets merged with {{{*default-pathname- defaults*}}} and is incorrectly parsed as a logical pathname namestring. -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation. From cmucl-devel at common-lisp.net Sat Jan 12 05:41:57 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Sat, 12 Jan 2013 05:41:57 -0000 Subject: [cmucl-ticket] [cmucl] #70: Source location error with a logical pathname default Message-ID: <052.ac7a5ceaf14fec3a81ae542c7eef3d15@common-lisp.net> #70: Source location error with a logical pathname default --------------------+------------------------------------------------------- Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: Core | Version: 2013-01 Keywords: | --------------------+------------------------------------------------------- When ticket:69 is fixed, the same code will then generated the following error: {{{ Parse error in namestring: Illegal character for logical pathname: #\/ /tmp/bar.lisp ^ [Condition of type LISP::NAMESTRING-PARSE-ERROR] Restarts: 0: [ABORT] Return to Top-Level. Debug (type H for help) (LISP::LOGICAL-CHUNKIFY "/tmp/foo.lisp" 0 13) Source: Error finding source: Parse error in namestring: Illegal character for logical pathname: #\/ target:code/pathname.lisp ^ 0] }}} The first error message is ok. The error about finding the source happens again because the source information is stored as a namestring which the debugger uses to open the source file. However, it's merged with the logical pathname in {{{*default-pathname-defaults*}}}, causing another error because the search-list namestring is treated as a logical pathname namestring. -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation. From cmucl-devel at common-lisp.net Thu Jan 17 04:20:48 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Thu, 17 Jan 2013 04:20:48 -0000 Subject: [cmucl-ticket] [cmucl] #69: Error parsing ext-formats:unidata.bin In-Reply-To: <052.75f359414fadd93e7da433b5c67bd800@common-lisp.net> References: <052.75f359414fadd93e7da433b5c67bd800@common-lisp.net> Message-ID: <061.a269675c7d6f0e70b0e2ccdac77ddebb@common-lisp.net> #69: Error parsing ext-formats:unidata.bin ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: closed Priority: major | Milestone: Component: Core | Version: 2013-01 Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by toy.raymond@?): * status: new => closed * resolution: => fixed Comment: commit ce037e96582861f0f78c071a0900803a3628f893 Author: Raymond Toy Date: Wed Jan 16 20:20:41 2013 -0800 Fix ticket:69 Change *unidata-path* to be a pathname object instead of a namestring. -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation. From cmucl-devel at common-lisp.net Thu Jan 24 04:20:34 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Thu, 24 Jan 2013 04:20:34 -0000 Subject: [cmucl-ticket] [cmucl] #70: Source location error with a logical pathname default In-Reply-To: <052.ac7a5ceaf14fec3a81ae542c7eef3d15@common-lisp.net> References: <052.ac7a5ceaf14fec3a81ae542c7eef3d15@common-lisp.net> Message-ID: <061.515341e5d98dc97f52fd423c612df57a@common-lisp.net> #70: Source location error with a logical pathname default ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: closed Priority: major | Milestone: Component: Core | Version: 2013-01 Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by toy.raymond@?): * status: new => closed * resolution: => fixed Comment: commit ab191d0f0c6c3744688042d14f754c3e35a4a793 Author: Raymond Toy Date: Wed Jan 23 20:20:18 2013 -0800 Fix ticket:70 by binding *d-p-d* to #p"". This allows logical pathnames (which always have a host to parse against) and search-lists (which don't have an explicit pathname to parse against) to be parsed correctly. See the comment for some possible issues. -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation. From cmucl-devel at common-lisp.net Thu Jan 24 04:35:39 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Thu, 24 Jan 2013 04:35:39 -0000 Subject: [cmucl-ticket] [cmucl] #65: Different results for EXPT between compiled and interpreted code (was: Different results for {{{expt}}} between compiled and interpreted code) In-Reply-To: <052.d58047a7b87f93144a77ee5dcdc9f6af@common-lisp.net> References: <052.d58047a7b87f93144a77ee5dcdc9f6af@common-lisp.net> Message-ID: <061.588b8f4057ac50cd8c854e618a79661c@common-lisp.net> #65: Different results for EXPT between compiled and interpreted code --------------------+------------------------------------------------------- Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: Core | Version: 2012-12 Keywords: | --------------------+------------------------------------------------------- Description changed by rtoy: Old description: > Consider > {{{ > (defun sqr (x) > (declare (type (complex double-float) x)) > (expt x 2)) > }}} > > Compare the results: > {{{ > * (sqr #c(0d0 1d0)) > #C(-1d0 0d0) > > * (expt #c(0d0 1d0)) > #C(-1.0d0 1.2246467991473532d-16) > }}} > > The difference is caused by a deftransform for {{{expt}}} that converts > {{{(expt x 2)}}} to {{{(* x x)}}}. > > Perhaps the {{{expt}}} should be modified to do the same transformation > when the power is one of the special values in the deftransform? (The > deftransform handles 2, 3, 4, and 1/2.) New description: Consider {{{ (defun sqr (x) (declare (type (complex double-float) x)) (expt x 2)) }}} Compare the results: {{{ * (sqr #c(0d0 1d0)) #C(-1d0 0d0) * (expt #c(0d0 1d0) 2) #C(-1.0d0 1.2246467991473532d-16) }}} The difference is caused by a deftransform for {{{expt}}} that converts {{{(expt x 2)}}} to {{{(* x x)}}}. Perhaps the {{{expt}}} should be modified to do the same transformation when the power is one of the special values in the deftransform? (The deftransform handles 2, 3, 4, and 1/2 and their negatives.) -- -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation. From cmucl-devel at common-lisp.net Thu Jan 24 05:22:31 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Thu, 24 Jan 2013 05:22:31 -0000 Subject: [cmucl-ticket] [cmucl] #65: Different results for EXPT between compiled and interpreted code In-Reply-To: <052.d58047a7b87f93144a77ee5dcdc9f6af@common-lisp.net> References: <052.d58047a7b87f93144a77ee5dcdc9f6af@common-lisp.net> Message-ID: <061.777209a03270d229f752866c07941dc9@common-lisp.net> #65: Different results for EXPT between compiled and interpreted code ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: closed Priority: major | Milestone: Component: Core | Version: 2012-12 Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by toy.raymond@?): * status: new => closed * resolution: => fixed Comment: commit 93656b6aa0ef4e939a84dfb62a6f088f58d3ff62 Author: Raymond Toy Date: Wed Jan 23 21:22:24 2013 -0800 Fix ticket:65. Implement the deftransform in the expt function. -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation. From cmucl-devel at common-lisp.net Fri Jan 25 04:22:56 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Fri, 25 Jan 2013 04:22:56 -0000 Subject: [cmucl-ticket] [cmucl] #71: NOT-MORE-CONTAGIOUS broken for double-double-floats Message-ID: <052.a48c5ec0fac9f8465304670ff9512432@common-lisp.net> #71: NOT-MORE-CONTAGIOUS broken for double-double-floats --------------------+------------------------------------------------------- Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: Core | Version: 2013-01 Keywords: | --------------------+------------------------------------------------------- Here is an example of the brokenness: {{{ (defun foo (x) (declare (type double-float x)) (expt x 2w0)) (compile 'foo) (foo 2d0) Invalid number of arguments: 1 [Condition of type KERNEL:SIMPLE-PROGRAM-ERROR] }}} This is a bug in {{{NOT-MORE-CONTAGIOUS}}} returning the wrong value. The power should cause result of {{{EXPT}}} to be a double-double-float, but the the deftransform just converts the call to a multiplication of two double-floats. This mismatch of the actual type and the derived type confuses the compiler and causes the weird error. -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation. From cmucl-devel at common-lisp.net Fri Jan 25 04:28:19 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Fri, 25 Jan 2013 04:28:19 -0000 Subject: [cmucl-ticket] [cmucl] #71: NOT-MORE-CONTAGIOUS broken for double-double-floats In-Reply-To: <052.a48c5ec0fac9f8465304670ff9512432@common-lisp.net> References: <052.a48c5ec0fac9f8465304670ff9512432@common-lisp.net> Message-ID: <061.8104f40eb545a10cef14010c8c490efa@common-lisp.net> #71: NOT-MORE-CONTAGIOUS broken for double-double-floats ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: closed Priority: major | Milestone: Component: Core | Version: 2013-01 Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by toy.raymond@?): * status: new => closed * resolution: => fixed Comment: commit b2ee65dabba1742203e28f538eeee59da126093c Author: Raymond Toy Date: Thu Jan 24 20:28:09 2013 -0800 Fix ticket:71 The reader conditionals in {{{NOT-MORE-CONTAGIOUS}}} were incorrrectly handling the case when the second type was a double-float. It was always returning T in that case, but this is wrong if the first type is a double-double-float. -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation. From cmucl-devel at common-lisp.net Fri Jan 25 04:42:35 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Fri, 25 Jan 2013 04:42:35 -0000 Subject: [cmucl-ticket] [cmucl] #65: Different results for EXPT between compiled and interpreted code In-Reply-To: <052.d58047a7b87f93144a77ee5dcdc9f6af@common-lisp.net> References: <052.d58047a7b87f93144a77ee5dcdc9f6af@common-lisp.net> Message-ID: <061.66404c014f834384e6a284958d7e9242@common-lisp.net> #65: Different results for EXPT between compiled and interpreted code ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: reopened Priority: major | Milestone: Component: Core | Version: 2012-12 Resolution: | Keywords: ---------------------+------------------------------------------------------ Changes (by rtoy): * status: closed => reopened * resolution: fixed => Comment: Some cases were missed in the previous patch. Here is a test that should cover all the cases. {{{ (defun test-expt-xfrm () (let (failures) (dolist (base '(2 2f0 2d0 2w0 #c(0 1) #c(0f0 1) #c(0d0 1) #c(0w0 1))) (dolist (power '(2 3 1/2 -2 -3 -1/2 5)) (dolist (power-type '(rational single-float double-float double- double-float (complex single-float) (complex double- float) (complex double-double-float))) (let* ((pp (coerce power power-type)) (interp (expt base pp)) (compiled (funcall (compile nil `(lambda (b) (declare (type ,(type- of base) b)) (expt b ,pp))) base))) (unless (= interp compiled) (push (list base pp interp compiled) failures) (format t "~S^~S =~% ~S~% ~S~%" base pp interp compiled)))))) failures)) }}} This should return {{{NIL}}} if everything is working correctly. -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation. From cmucl-devel at common-lisp.net Fri Jan 25 04:55:55 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Fri, 25 Jan 2013 04:55:55 -0000 Subject: [cmucl-ticket] [cmucl] #65: Different results for EXPT between compiled and interpreted code In-Reply-To: <052.d58047a7b87f93144a77ee5dcdc9f6af@common-lisp.net> References: <052.d58047a7b87f93144a77ee5dcdc9f6af@common-lisp.net> Message-ID: <061.b2c6afbe66d581605c7797a929738e41@common-lisp.net> #65: Different results for EXPT between compiled and interpreted code ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: closed Priority: major | Milestone: Component: Core | Version: 2012-12 Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by toy.raymond@?): * status: reopened => closed * resolution: => fixed Comment: commit 719e87b7d103d3201c031412de576653a42daff7 Author: Raymond Toy Date: Thu Jan 24 20:55:45 2013 -0800 Fix ticket:65 some more. Apply the expt transform in more places. The test script in the ticket now passes. -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation. From cmucl-devel at common-lisp.net Wed Jan 30 02:25:58 2013 From: cmucl-devel at common-lisp.net (cmucl) Date: Wed, 30 Jan 2013 02:25:58 -0000 Subject: [cmucl-ticket] [cmucl] #72: SIGFPE with no exceptions currently enabled? Message-ID: <052.2985d241f3c485c78d649e30074164d7@common-lisp.net> #72: SIGFPE with no exceptions currently enabled? --------------------+------------------------------------------------------- Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: Core | Version: 2013-01 Keywords: | --------------------+------------------------------------------------------- While I've seen this SIGFPE issue before, I never tracked it down. Here is a repeatable case (from Carl): {{{ (defun test (x y) (declare (optimize (speed 3) (safety 0)) (type (signed-byte 32) x y)) (the (signed-byte 32) (truncate x y))) }}} Although the code lies to the compiler (the asserted return type of {{{truncate}}} is incorrect), the point is that {{{(test #x-80000000 -1)}}} causes the SIGFPE exception. I believe {{{sigfpe-handler}}} was only expecting to handle FP exceptions. In this example, the division causes an overflow which generates the SIGFPE. -- Ticket URL: cmucl Cmucl is a high-performance, free Common Lisp implementation.