Changeset 13745 for trunk/source


Ignore:
Timestamp:
May 30, 2010, 8:34:50 AM (9 years ago)
Author:
gb
Message:

nfcomp.lisp: in the pkg/no *FASDUMP-EPUSH*/ASCII case in FASL-DUMP-SYMBOL,

use $fasl-nvpkg-intern (not the -special variant) when no symbol-binding
index is involved. (Getting this wrong has caused >10000 symbols that
aren't referenced in special-binding constructs to have symbol-binding
indices, making the per-thread special bindings table unnecessarily large
and exposing problems with %FOREIGN-THREAD-INITIALIZE.

ppc-symbol.lisp, x8632-symbol.lisp, x86-symbol.lisp: define %ENSURE-TLB-INDEX,

which uses a platform-specific conditional trap to ensure that the current
thread's tlb is large enough.

l1-lisp-threads.lisp: use %ENSURE-TLB-INDEX in %FOREIGN-THREAD-INITIALIZE,

to ensure that TLB indices used in that function are in bounds.

Location:
trunk/source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/PPC/ppc-symbol.lisp

    r13067 r13745  
    178178    (srri arg_z accum (- 5 target::fixnumshift))
    179179    (blr)))
     180
     181;;; Ensure that the current thread's thread-local-binding vector
     182;;; contains room for an entry with index INDEX.
     183;;; Return the fixnum-tagged tlb vector.
     184(defppclapfunction %ensure-tlb-index ((idx arg_z))
     185  (ldr arg_y target::tcr.tlb-limit target::rcontext)
     186  (trlle arg_y idx)
     187  (ldr arg_z target::tcr.tlb-pointer target::rcontext)
     188  (blr))
  • trunk/source/level-0/X86/X8632/x8632-symbol.lisp

    r13067 r13745  
    141141    @done
    142142    (single-value-return 3)))
     143
     144;;; Ensure that the current thread's thread-local-binding vector
     145;;; contains room for an entry with index INDEX.
     146;;; Return the fixnum-tagged tlb vector.
     147(defx8632lapfunction %ensure-tlb-index ((idx arg_z))
     148  (cmp (:rcontext x8632::tcr.tlb-limit) (% idx))
     149  (jb @ok)
     150  (push (% arg_z))                      ; exception handler will pop this
     151  (ud2a)  (:byte 1)                     ; tlb_too_small()
     152  @ok
     153  (mov (:rcontext x8632::tcr.tlb-pointer) (% arg_z))
     154  (single-value-return))
     155
     156 
  • trunk/source/level-0/X86/x86-symbol.lisp

    r13067 r13745  
    164164    @done
    165165    (single-value-return)))
     166
     167;;; Ensure that the current thread's thread-local-binding vector
     168;;; contains room for an entry with index INDEX.
     169;;; Return the fixnum-tagged tlb vector.
     170(defx86lapfunction %ensure-tlb-index ((idx arg_z))
     171  (cmp (:rcontext x8632::tcr.tlb-limit) (% idx))
     172  (jb @ok)
     173  (push (% arg_z))                      ; exception handler will pop this
     174  (ud2a)  (:byte 1)                     ; tlb_too_small()
     175  @ok
     176  (mov (:rcontext x8632::tcr.tlb-pointer) (% arg_z))
     177  (single-value-return))
     178
    166179) ; #+x8664-target
     180
     181
     182
     183
  • trunk/source/level-1/l1-lisp-threads.lisp

    r13081 r13745  
    10651065             (let* ((idx (symbol-binding-index sym))
    10661066                    (byte-idx (ash idx target::fixnum-shift))
    1067                     (binding-vector (%fixnum-ref (%current-tcr) target::tcr.tlb-pointer))
     1067                    (binding-vector (%ensure-tlb-index idx))
    10681068                    (old-value (%fixnum-ref  binding-vector byte-idx)))
    10691069             (setf (%fixnum-ref binding-vector byte-idx) new-value
  • trunk/source/lib/nfcomp.lisp

    r13675 r13745  
    18621862             (fasl-out-byte (if idx
    18631863                              (if ascii $fasl-nvpkg-intern-special $fasl-vpkg-intern-special)
    1864                               (if ascii $fasl-nvpkg-intern-special $fasl-vpkg-intern)))
     1864                              (if ascii $fasl-nvpkg-intern $fasl-vpkg-intern)))
    18651865             (fasl-dump-form pkg)
    18661866             (if ascii
Note: See TracChangeset for help on using the changeset viewer.