Ticket #975 (closed defect: fixed)

Opened 2 years ago

Last modified 20 months ago

error loading a file compiled with coverage

Reported by: fare Owned by: gz
Priority: critical Milestone:
Component: Compiler Version: 1.8
Keywords: ITA Cc:

Description

We are experiencing a bug trying to compile QRes with coverage, ever since we upgraded from 1.7-15111 to 1.8-15359. Happily, the bug is reproducible with code that is freely available.

1- Use git to grab a checkout of QUUX-TIME from  http://common-lisp.net/project/qitab/

2- Create a file ccl-coverage.lisp as follows (configuring the path as necessary to point to your checkout if it's not already in your source-registry):

(require :asdf)
(pushnew #p"/home/tunes/cl/quux-time/" asdf:*central-registry*)
(require :cover)
(setq ccl:*compile-code-coverage* t)
(proclaim '(optimize (SPEED 1) (SPACE 1) (SAFETY 1) (DEBUG 2) (COMPILATION-SPEED 1)))
(asdf:load-system :quux-time)

Now you can run ccl --load ccl-coverage.lisp and you'll get the following error:

> Error: value #<CODE-NOTE [0] #x302000BE767D> is not of the expected type FIXNUM.
> While executing: %DAYS-UNTIL-YEAR-MONTH, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Skip loading "/home/tunes/bug/ccl-coverage.lisp"
> Type :? for other options.
1 > :b
*(7F50445ACFA0) : 0 (%DAYS-UNTIL-YEAR-MONTH 1900 3) 203
 (7F50445AD008) : 1 (FUNCALL #'#<Anonymous Function #x302000C1AE4F>) 445
 (7F50445AD038) : 2 (FUNCALL #'#<CCL::$FASL-LFUNCALL> #<CCL::FASLSTATE #x7F504561B74D>) 77
 (7F50445AD058) : 3 (%FASLOAD "/ita/local/var/cache/common-lisp/ccl-1.8-f95-linux-x64/home/tunes/cl/quux-time/time.lx64fsl" #(#<Compiled-function CCL::$FASL-NOOP (Non-Global)  #x3000000F749F> #<Compiled-function CCL::$FASL-S32-VECTOR (Non-Global)  #x3000000F74FF> CCL::%BAD-FASL #<Compiled-function CCL::$FASL-CLFUN (Non-Global)  #x3000000F756F> #<Compiled-function CCL::$FASL-LFUNCALL (Non-Global)  #x3000000F775F> ...)) 1277
 (7F50445AD0F0) : 4 (%LOAD #P"/ita/local/var/cache/common-lisp/ccl-1.8-f95-linux-x64/home/tunes/cl/quux-time/time.lx64fsl" NIL NIL :ERROR :DEFAULT) 3717
 (7F50445AD270) : 5 (LOAD #P"/ita/local/var/cache/common-lisp/ccl-1.8-f95-linux-x64/home/tunes/cl/quux-time/time.lx64fsl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT) 1013
 (7F50445AD308) : 6 (MAP NIL #<Compiled-function LOAD #x30000012D3EF> (#P"/ita/local/var/cache/common-lisp/ccl-1.8-f95-linux-x64/home/tunes/cl/quux-time/time.lx64fsl")) 741
 (7F50445AD378) : 7 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL #<STANDARD-METHOD ASDF:PERFORM #> . 17497840114312)) 845
 (7F50445AD3E8) : 8 (%%STANDARD-COMBINED-METHOD-DCODE (NIL (#<#>) #<STANDARD-METHOD ASDF:PERFORM #>) 17497840114312) 261
 (7F50445AD458) : 9 (%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD ASDF::PERFORM-WITH-RESTARTS #> . 17497840114383)) 1053
 (7F50445AD4D8) : 10 (FUNCALL #'#<#<STANDARD-METHOD ASDF::PERFORM-WITH-RESTARTS (ASDF:LOAD-OP ASDF:CL-SOURCE-FILE)>> #<LOAD-OP NIL #x302000972B6D> #<CL-SOURCE-FILE "quux-time" "time">) 517
 (7F50445AD538) : 11 (%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD ASDF::PERFORM-WITH-RESTARTS #> . 17497840114383)) 1053
 (7F50445AD5B8) : 12 (FUNCALL #'#<#<STANDARD-METHOD ASDF::PERFORM-WITH-RESTARTS :AROUND (T T)>> #<LOAD-OP NIL #x302000972B6D> #<CL-SOURCE-FILE "quux-time" "time">) 677
 (7F50445AD620) : 13 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF::PERFORM-WITH-RESTARTS :AROUND #> #<STANDARD-METHOD ASDF::PERFORM-WITH-RESTARTS #> #<STANDARD-METHOD ASDF::PERFORM-WITH-RESTARTS #>) 17497840114383) 765
 (7F50445AD690) : 14 (FUNCALL #'#<(:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY (ASDF::PERFORM-PLAN (LIST)))>) 125
 (7F50445AD6C8) : 15 (CALL-WITH-COMPILATION-UNIT #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY #) #x7F504561BF8F> :OVERRIDE NIL) 197
 (7F50445AD710) : 16 (FUNCALL #'#<#<STANDARD-METHOD ASDF::PERFORM-PLAN (LIST)>> ((#<# # #x302000972B6D> . #<# # #>) (#<# # #x302000972B6D> . #<# # #>) (#<# # #x302000972B6D> . #<# # #>) (#<# # #x302000972B6D> . #<# #>))) 389
 (7F50445AD778) : 17 (%%CHECK-KEYWORDS #(1 #() #<CCL:METHOD-FUNCTION ASDF::PERFORM-PLAN #>) 17497840114426) 229
 (7F50445AD7E0) : 18 (FUNCALL #'#<(:INTERNAL (ASDF:OPERATE (T T)))>) 1325
 (7F50445AD858) : 19 (CALL-WITH-SYSTEM-DEFINITIONS #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x3020009731BF>) 205
 (7F50445AD890) : 20 (FUNCALL #'#<#<STANDARD-METHOD ASDF:OPERATE (T T)>> ASDF:LOAD-OP :QUUX-TIME) 477
 (7F50445AD910) : 21 (%%STANDARD-COMBINED-METHOD-DCODE ((#<#>) NIL #<STANDARD-METHOD ASDF:OPERATE #>) 17497840114476) 261
 (7F50445AD978) : 22 (LOAD-SYSTEM :QUUX-TIME) 173
 (7F50445AD9C8) : 23 (CALL-CHECK-REGS ASDF:LOAD-SYSTEM :QUUX-TIME) 221
 (7F50445ADA00) : 24 (FUNCALL #'#<(:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM)>) 765
 (7F50445ADA90) : 25 (CALL-WITH-COMPILATION-UNIT #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY CCL::LOAD-FROM-STREAM) #x7F504561C14F> :OVERRIDE NIL) 197
 (7F50445ADAD8) : 26 (LOAD-FROM-STREAM #<BASIC-FILE-CHARACTER-INPUT-STREAM ("/home/tunes/bug/ccl-coverage.lisp"/4 ISO-8859-1) #x3020006C227D> NIL) 389
 (7F50445ADB18) : 27 (%LOAD #P"/home/tunes/bug/ccl-coverage.lisp" NIL NIL :ERROR :DEFAULT) 4781
 (7F50445ADC68) : 28 (LOAD "/home/tunes/bug/ccl-coverage.lisp" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT) 1013
 (7F50445ADD00) : 29 (FUNCALL #'#<(:INTERNAL CCL::LOAD-FILE CCL::STARTUP-CCL)> "/home/tunes/bug/ccl-coverage.lisp") 493
 (7F50445ADD48) : 30 (STARTUP-CCL ("home:ccl-init" "home:\\.ccl-init")) 1717
 (7F50445ADDB8) : 31 (FUNCALL #'#<(:INTERNAL (CCL:TOPLEVEL-FUNCTION (CCL::LISP-DEVELOPMENT-SYSTEM T)))>) 77
 (7F50445ADDD8) : 32 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 645
 (7F50445ADE70) : 33 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1) [Active] #x3020006BD95D> (#<CCL:COMPILED-LEXICAL-CLOSURE # #x3020006BD48F>)) 717
 (7F50445ADF08) : 34 (FUNCALL #'#<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS)))> #<TTY-LISTENER listener(1) [Active] #x3020006BD95D> (#<CCL:COMPILED-LEXICAL-CLOSURE # #x3020006BD48F>)) 549
 (7F50445ADF98) : 35 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 301
1 > (ccl:quit)

Xref: ITA bug 117014

Change History

comment:1 Changed 2 years ago by gz

  • Owner set to gz
  • Status changed from new to assigned

comment:2 Changed 2 years ago by gz

  • Keywords ITA added
  • Priority changed from normal to critical

comment:3 Changed 23 months ago by gz

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [15460]) avoid the code coverage temp reg when compiling for coverage. Fixes ticket:975

comment:4 Changed 20 months ago by fare

Can you backport to 1.8 ? Or is the 1.9 release imminent?

Note: See TracTickets for help on using tickets.