1.0.43.67: COERCE: don't trust vector dimensions in unsafe code
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 18 Oct 2010 11:42:47 +0000 (11:42 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 18 Oct 2010 11:42:47 +0000 (11:42 +0000)
commit7619132f587e6d30935a38cd19da7d0d80dbc7a3
tree879128cf56ff546cc5a71f0583173a3b6192865d
parenta80fa095365b2d9c5991faf6d134ae67c37c69e6
1.0.43.67: COERCE: don't trust vector dimensions in unsafe code

 Fixes bug 655872.

 Our deftransform for COERCE takes advantage of ANSI's allowance
 to generate faster code, and open codes

  (COERCE X '(SIMPLE-VECTOR 5))

 in a way that doesn't verify the length of the simple-vector.

 1. Previously we did that for SAFETY < 3, but that doesn't really
    fit with our general policy, so enable it only for SAFETY = 0.

 2. Make the corresponding DERIVE-TYPE optimizer aware of this, so
    that it can drop the dimensions from the type when necessary.
NEWS
src/compiler/srctran.lisp
src/compiler/typetran.lisp
tests/compiler.pure.lisp
version.lisp-expr