fix enforcement of size limit in prefab struct descriptions

Closes PR 14888
This commit is contained in:
Matthew Flatt 2014-12-19 20:05:19 -07:00
parent a8ba4eca35
commit 9419bf42a1
2 changed files with 7 additions and 1 deletions

View File

@ -1106,6 +1106,12 @@
(test #t procedure? acc)
(test #t procedure? mut))
;; ----------------------------------------
;; Check that prefab struct size limit is enforced:
(err/rt-test (make-prefab-struct '(foo 2999999999999999) 1))
(err/rt-test (make-prefab-struct '(foo 5 bar 2999999999999999) 1))
;; ----------------------------------------
(report-errs)

View File

@ -5364,7 +5364,7 @@ Scheme_Struct_Type *scheme_lookup_prefab_type(Scheme_Object *key, int field_coun
{
Scheme_Struct_Type *parent = NULL;
Scheme_Object *a, *uninit_val, *mutables, *name;
int ucnt, icnt;
intptr_t ucnt, icnt;
char *immutable_array = NULL;
if (SCHEME_SYMBOLP(key))