joyent/node — pull request #2976 by mjor (2012-03-21 12:13:07+00:00)
Title: Add alignment checks for typed array views on top of buffers

Follow-up from the discussion at pull request [#2967](https://github.com/joyent/node/pull/2967).

I modified `src/v8_typed_arrays.cc` to check whether the "slice" adress is aligned with the type of array we're going to create, instead of just checking the byte offset (which didn't have the desired effect). Attempts to create unaligned typed array views will result in an error being thrown.