From: Eric M. <eri...@fr...> - 2011-01-24 15:47:18
|
Hi, ,---- | * (lambda (a b) | (declare (type integer a)) | (declare (type (integer -1 -1) b)) | (IF (/= a b) | (reduce #'(lambda (foo bar) (setf b -1)) (list 5)))) | CORRUPTION WARNING in SBCL pid 3823(tid 140737353959168): | Memory fault at 0 (pc=0x1001332547, sp=0x7ffff6d8ec50) | The integrity of this image is possibly compromised. | Continuing with fingers crossed. | | debugger invoked on a SB-SYS:MEMORY-FAULT-ERROR in thread #<THREAD | "initial thread" RUNNING | {1002940FF1}>: | Unhandled memory fault at #x0. | | 0] backtrace | 0: (SB-SYS:MEMORY-FAULT-ERROR) | 1: ("foreign function: call_into_lisp") | 2: ("foreign function: post_signal_tramp") | 3: (SB-C::CONSET-MEMBER #<unavailable argument> #<unavailable argument>) | 4: (SB-C::CONSET-ADJOIN #<unavailable argument> #<unavailable argument>) | 5: (SB-C::FIND-OR-CREATE-CONSTRAINT | EQL | #<SB-C::LAMBDA-VAR | :%SOURCE-NAME A | :TYPE #<SB-KERNEL:NUMERIC-TYPE INTEGER> | :WHERE-FROM :DECLARED {1002F50901}> | #<SB-C::LAMBDA-VAR | :%SOURCE-NAME B | :TYPE #<SB-KERNEL:NUMERIC-TYPE (INTEGER -1 -1)> | :WHERE-FROM :DECLARED {1002F509C1}> | NIL) | 6: (SB-C::ADD-EQL-VAR-VAR-CONSTRAINT | #<SB-C::LAMBDA-VAR | :%SOURCE-NAME A | :TYPE #<SB-KERNEL:NUMERIC-TYPE INTEGER> | :WHERE-FROM :DECLARED {1002F50901}> | #<SB-C::LAMBDA-VAR | :%SOURCE-NAME B | :TYPE #<SB-KERNEL:NUMERIC-TYPE (INTEGER -1 -1)> | :WHERE-FROM :DECLARED {1002F509C1}> | #S(SB-C::CONSET :VECTOR #*01 :MIN 0 :MAX 2) | #S(SB-C::CONSET :VECTOR #*00 :MIN 0 :MAX 0)) | 7: (SB-C::ADD-TEST-CONSTRAINT | EQL | #<SB-C::LAMBDA-VAR | :%SOURCE-NAME A | :TYPE #<SB-KERNEL:NUMERIC-TYPE INTEGER> | :WHERE-FROM :DECLARED {1002F50901}> | #<SB-C::LAMBDA-VAR | :%SOURCE-NAME B | :TYPE #<SB-KERNEL:NUMERIC-TYPE (INTEGER -1 -1)> `---- SBCL 1.0.45.13 on Linux/AMD64. Found by pfdietz's random-testing framework. -- Eric Marsden |
From: Alastair B. <ala...@gm...> - 2011-01-24 17:04:44
|
Confirmed on 1.0.45.10, linux/ppc. Not confirmed on 1.0.28, linux/ppc, so it's definitely a regression. I'm starting a bisection for it, but it could take a while. -- Alastair Bridgewater On Mon, Jan 24, 2011 at 10:46 AM, Eric Marsden <eri...@fr...> wrote: > Hi, > > ,---- > | * (lambda (a b) > | (declare (type integer a)) > | (declare (type (integer -1 -1) b)) > | (IF (/= a b) > | (reduce #'(lambda (foo bar) (setf b -1)) (list 5)))) > | CORRUPTION WARNING in SBCL pid 3823(tid 140737353959168): > | Memory fault at 0 (pc=0x1001332547, sp=0x7ffff6d8ec50) > | The integrity of this image is possibly compromised. > | Continuing with fingers crossed. > | > | debugger invoked on a SB-SYS:MEMORY-FAULT-ERROR in thread #<THREAD > | "initial thread" RUNNING > | {1002940FF1}>: > | Unhandled memory fault at #x0. > | > | 0] backtrace > | 0: (SB-SYS:MEMORY-FAULT-ERROR) > | 1: ("foreign function: call_into_lisp") > | 2: ("foreign function: post_signal_tramp") > | 3: (SB-C::CONSET-MEMBER #<unavailable argument> #<unavailable argument>) > | 4: (SB-C::CONSET-ADJOIN #<unavailable argument> #<unavailable argument>) > | 5: (SB-C::FIND-OR-CREATE-CONSTRAINT > | EQL > | #<SB-C::LAMBDA-VAR > | :%SOURCE-NAME A > | :TYPE #<SB-KERNEL:NUMERIC-TYPE INTEGER> > | :WHERE-FROM :DECLARED {1002F50901}> > | #<SB-C::LAMBDA-VAR > | :%SOURCE-NAME B > | :TYPE #<SB-KERNEL:NUMERIC-TYPE (INTEGER -1 -1)> > | :WHERE-FROM :DECLARED {1002F509C1}> > | NIL) > | 6: (SB-C::ADD-EQL-VAR-VAR-CONSTRAINT > | #<SB-C::LAMBDA-VAR > | :%SOURCE-NAME A > | :TYPE #<SB-KERNEL:NUMERIC-TYPE INTEGER> > | :WHERE-FROM :DECLARED {1002F50901}> > | #<SB-C::LAMBDA-VAR > | :%SOURCE-NAME B > | :TYPE #<SB-KERNEL:NUMERIC-TYPE (INTEGER -1 -1)> > | :WHERE-FROM :DECLARED {1002F509C1}> > | #S(SB-C::CONSET :VECTOR #*01 :MIN 0 :MAX 2) > | #S(SB-C::CONSET :VECTOR #*00 :MIN 0 :MAX 0)) > | 7: (SB-C::ADD-TEST-CONSTRAINT > | EQL > | #<SB-C::LAMBDA-VAR > | :%SOURCE-NAME A > | :TYPE #<SB-KERNEL:NUMERIC-TYPE INTEGER> > | :WHERE-FROM :DECLARED {1002F50901}> > | #<SB-C::LAMBDA-VAR > | :%SOURCE-NAME B > | :TYPE #<SB-KERNEL:NUMERIC-TYPE (INTEGER -1 -1)> > `---- > > SBCL 1.0.45.13 on Linux/AMD64. Found by pfdietz's random-testing framework. > > -- > Eric Marsden > > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > Sbcl-devel mailing list > Sbc...@li... > https://lists.sourceforge.net/lists/listinfo/sbcl-devel > |
From: Zach B. <xa...@xa...> - 2011-01-24 19:02:28
|
Alastair Bridgewater <ala...@gm...> writes: > Confirmed on 1.0.45.10, linux/ppc. Not confirmed on 1.0.28, linux/ppc, > so it's definitely a regression. > > I'm starting a bisection for it, but it could take a while. I bisected also and wound up on f2218c68ed978533fc46830ac81f4517fefe5a2a http://git.boinkor.net/gitweb/sbcl.git/commit/f2218c68ed978533fc46830ac81f4517fefe5a2a Zach |
From: Paul K. <pk...@gm...> - 2011-01-24 20:14:05
|
On 2011-01-24, at 1:32 PM, Zach Beane wrote: > Alastair Bridgewater <ala...@gm...> writes: > >> Confirmed on 1.0.45.10, linux/ppc. Not confirmed on 1.0.28, linux/ppc, >> so it's definitely a regression. >> >> I'm starting a bisection for it, but it could take a while. > > I bisected also and wound up on f2218c68ed978533fc46830ac81f4517fefe5a2a > > http://git.boinkor.net/gitweb/sbcl.git/commit/f2218c68ed978533fc46830ac81f4517fefe5a2a A tentative patch follows. Turns out our constraint propagation wasn't ready for our now stronger constant-propagation: it implicitly assumed that a constant lvar couldn't have its value defined by a closed over variable that's SETFed. As the test case shows, that's now possible, if the SETFs are setting the variable to the same *constant* value, yielding a variable with a singleton type. The patch below is more robust by testing that assumption. As nyef points out, this is also a missed optimization opportunity: if the SETFs are useless, they could simply be eliminated! diff --git a/src/compiler/constraint.lisp b/src/compiler/constraint.lisp index a32c5a9..1bf0b02 100644 --- a/src/compiler/constraint.lisp +++ b/src/compiler/constraint.lisp @@ -492,9 +492,12 @@ (add 'eql var1 var2 nil)) ((constant-lvar-p arg2) (add 'eql var1 - (let ((use (principal-lvar-use arg2))) - (if (ref-p use) - (ref-leaf use) + (let ((use (principal-lvar-use arg2)) + leaf) + (if (and (ref-p use) + (lambda-var-p (setf leaf (ref-leaf use))) + (lambda-var-constraints leaf)) + leaf (find-constant (lvar-value arg2)))) nil)) (t |