Lisp HUG Maillist Archive

Possible compiler bug in zerop/multiple-value-call (LW5.1 Win32)

Found this effect - the hard way :(   (deep deep under some macros)
 
(Grenades on plusp too - haven't tested too much for other functions).
 
Here is the problem in isolation (LW 5.1 Win32 clean start with default config):
 

CL-USER 1 > (defun test () (zerop (multiple-value-call #'identity 1)))
TEST
CL-USER 2 > (test)
NIL
CL-USER 3 > (compile 'test)
;;;*** Warning in TEST: Variable F is declared type NIL, but is bound to a value of type NIL
TEST
((NIL #<CONDITIONS::SIMPLE-STYLE-WARNING 200CFF8B>))
NIL
CL-USER 4 > (test)
Error: Exception C0000005 [flags 0] at 200DE322
     {Offset 104 inside #<Function TEST 200DE2BA>}
eax        4 ebx 200DE2BA ecx      100 edx 215A96EB
esp 215B8A24 ebp 215B8A3C esi        3 edi        4
  1 (abort) Return to level 0.
  2 Return to top loop level 0.
Type :b for backtrace, :c <option number> to proceed,  or :? for other options
CL-USER 5 : 1 >:b
Call to TEST
Call to EVAL
Call to CAPI::CAPI-TOP-LEVEL-FUNCTION
Call to CAPI::INTERACTIVE-PANE-TOP-LOOP
Call to (SUBFUNCTION MP::PROCESS-SG-FUNCTION MP::INITIALIZE-PROCESS-STACK)
 
 

Re: Possible compiler bug in zerop/multiple-value-call (LW5.1 Win32)

On Wed, Jun 11, 2008 at 12:44:30AM -0500, Matthew Lamari wrote:
> Found this effect - the hard way :(   (deep deep under some macros)
> 
> (Grenades on plusp too - haven't tested too much for other functions).
> 
> Here is the problem in isolation (LW 5.1 Win32 clean start with default
> config):
> 
> CL-USER 1 > (defun test () (zerop (multiple-value-call #'identity 1)))
> TEST
> CL-USER 2 > (test)
> NIL
> CL-USER 3 > (compile 'test)
> ;;;*** Warning in TEST: Variable F is declared type NIL, but is bound to a
> value of type NIL
> TEST
> ((NIL #<CONDITIONS::SIMPLE-STYLE-WARNING 200CFF8B>))
> NIL
> CL-USER 4 > (test)
> Error: Exception C0000005 [flags 0] at 200DE322
>      {Offset 104 inside #<Function TEST 200DE2BA>}
> eax        4 ebx 200DE2BA ecx      100 edx 215A96EB
> esp 215B8A24 ebp 215B8A3C esi        3 edi        4
>   1 (abort) Return to level 0.
>   2 Return to top loop level 0.
> Type :b for backtrace, :c <option number> to proceed,  or :? for other
> options
> CL-USER 5 : 1 >:b
> Call to TEST
> Call to EVAL
> Call to CAPI::CAPI-TOP-LEVEL-FUNCTION
> Call to CAPI::INTERACTIVE-PANE-TOP-LOOP
> Call to (SUBFUNCTION MP::PROCESS-SG-FUNCTION MP::INITIALIZE-PROCESS-STACK)

Almost identical error in LW for Linux, 5.1 (though not a clean start
or with default config).

    CL-USER 4 > (compile 'test)
    ;;;*** Warning in TEST: Variable F is declared type NIL, but is bound to a value of type NIL
    TEST
    ((NIL #<CONDITIONS::SIMPLE-STYLE-WARNING 2256407F>))
    NIL

    CL-USER 5 > (test)

    Error: Segmentation violation(11) [code 0] at 2255DB22
	 {Offset 104 inside #<Function TEST 2255DABA>}
    eax        4 ; ebx 2255DABA ; ecx      100 ; edx 221DEE17
    esp 21B5928C ; ebp 21B592A4 ; esi        3 ; edi        4
      1 (abort) Return to level 0.
      2 Return to top loop level 0.

    Type :b for backtrace, :c <option number> to proceed,  or :? for other options

    CL-USER 6 : 1 > :b
    Call to TEST
    Call to EVAL
    Call to CAPI::CAPI-TOP-LEVEL-FUNCTION
    Call to CAPI::INTERACTIVE-PANE-TOP-LOOP
    Call to (SUBFUNCTION MP::PROCESS-SG-FUNCTION MP::INITIALIZE-PROCESS-STACK)

-- L


Re: Possible compiler bug in zerop/multiple-value-call (LW5.1 Win32)

On Wed, Jun 11, 2008 at 9:20 AM, Larry Clapp <larry@theclapp.org> wrote:
>
> On Wed, Jun 11, 2008 at 12:44:30AM -0500, Matthew Lamari wrote:
>> Found this effect - the hard way :(   (deep deep under some macros)
>>
>> (Grenades on plusp too - haven't tested too much for other functions).
>>
>> Here is the problem in isolation (LW 5.1 Win32 clean start with default
>> config):
>>
>> CL-USER 1 > (defun test () (zerop (multiple-value-call #'identity 1)))
>> TEST
>> CL-USER 2 > (test)
>> NIL
>> CL-USER 3 > (compile 'test)
>> ;;;*** Warning in TEST: Variable F is declared type NIL, but is bound to a
>> value of type NIL
>> TEST
>> ((NIL #<CONDITIONS::SIMPLE-STYLE-WARNING 200CFF8B>))
>> NIL
>> CL-USER 4 > (test)
>> Error: Exception C0000005 [flags 0] at 200DE322
>>      {Offset 104 inside #<Function TEST 200DE2BA>}
>> eax        4 ebx 200DE2BA ecx      100 edx 215A96EB
>> esp 215B8A24 ebp 215B8A3C esi        3 edi        4
>>   1 (abort) Return to level 0.
>>   2 Return to top loop level 0.
>> Type :b for backtrace, :c <option number> to proceed,  or :? for other
>> options
>> CL-USER 5 : 1 >:b
>> Call to TEST
>> Call to EVAL
>> Call to CAPI::CAPI-TOP-LEVEL-FUNCTION
>> Call to CAPI::INTERACTIVE-PANE-TOP-LOOP
>> Call to (SUBFUNCTION MP::PROCESS-SG-FUNCTION MP::INITIALIZE-PROCESS-STACK)
>
> Almost identical error in LW for Linux, 5.1 (though not a clean start
> or with default config).
>
>    CL-USER 4 > (compile 'test)
>    ;;;*** Warning in TEST: Variable F is declared type NIL, but is bound to a value of type NIL
>    TEST
>    ((NIL #<CONDITIONS::SIMPLE-STYLE-WARNING 2256407F>))
>    NIL
>
>    CL-USER 5 > (test)
>
>    Error: Segmentation violation(11) [code 0] at 2255DB22
>         {Offset 104 inside #<Function TEST 2255DABA>}
>    eax        4 ; ebx 2255DABA ; ecx      100 ; edx 221DEE17
>    esp 21B5928C ; ebp 21B592A4 ; esi        3 ; edi        4
>      1 (abort) Return to level 0.
>      2 Return to top loop level 0.
>
>    Type :b for backtrace, :c <option number> to proceed,  or :? for other options
>
>    CL-USER 6 : 1 > :b
>    Call to TEST
>    Call to EVAL
>    Call to CAPI::CAPI-TOP-LEVEL-FUNCTION
>    Call to CAPI::INTERACTIVE-PANE-TOP-LOOP
>    Call to (SUBFUNCTION MP::PROCESS-SG-FUNCTION MP::INITIALIZE-PROCESS-STACK)
>
> -- L
>
>
And to round things out, on LWM 5.1 too:
CL-USER 1 > (defun test ()
              (zerop (multiple-value-call #'identity 1)))
TEST

CL-USER 2 > (test)
NIL

CL-USER 3 > (compile 'test)
;;;*** Warning in TEST: Variable F is declared type NIL, but is bound
to a value of type NIL
TEST
((NIL #<CONDITIONS::SIMPLE-STYLE-WARNING 200D6FAB>))
NIL

CL-USER 4 > (test)

Error: Bus error(10) [code 20ED69E0] at 200EC020
     {Offset 160 inside TEST}
  1 (abort) Return to level 0.
  2 Return to top loop level 0.

Type :b for backtrace, :c <option number> to proceed,  or :? for other options

//JT


Re: Possible compiler bug in zerop/multiple-value-call (LW5.1 Win32)

Unable to parse email body. Email id is 8200

Updated at: 2020-12-10 08:43 UTC