cs: reject overlarge _array type

x
This commit is contained in:
Matthew Flatt 2019-01-19 15:07:43 -07:00
parent c55c922e44
commit e93088dd2c

View File

@ -579,6 +579,9 @@
(array ,count ,(car reps))))))))]
[size (* count (ctype-sizeof type))]
[alignment (ctype-alignof type)])
(unless (fixnum? size)
(raise-arguments-error who "arithmetic overflow for overlarge array type"
"size" size))
(create-compound-ctype 'array
'array
(vector type count)