Raymond Toy pushed to branch issue-243-weak-pointer-to-static-array at cmucl / cmucl
Commits:
-
79ea44b8
by Raymond Toy at 2024-02-01T16:47:51-08:00
1 changed file:
Changes:
... | ... | @@ -5441,8 +5441,14 @@ scan_weak_pointers(void) |
5441 | 5441 | lispobj *header = (lispobj *) PTR(value);
|
5442 | 5442 | |
5443 | 5443 | if (maybe_static_array_p(*header)) {
|
5444 | - if ((HeaderValue(*header) & 1) == 1) {
|
|
5445 | - printf(" vectors_to_free[%d] = %p\n", k, (lispobj *) value);
|
|
5444 | + if (HeaderValue(*header) == 1) {
|
|
5445 | + /*
|
|
5446 | + * We have a static array with the mark
|
|
5447 | + * cleared which means it's not used.
|
|
5448 | + */
|
|
5449 | + printf(" vectors_to_free[%d] = %p %08lx\n",
|
|
5450 | + k, (lispobj *) value, *header);
|
|
5451 | + |
|
5446 | 5452 | /*
|
5447 | 5453 | * Only add it if we don't already have it.
|
5448 | 5454 | */
|
... | ... | @@ -5461,12 +5467,13 @@ scan_weak_pointers(void) |
5461 | 5467 | vectors_to_free[k] = value;
|
5462 | 5468 | ++k;
|
5463 | 5469 | }
|
5470 | + |
|
5471 | + /*
|
|
5472 | + * Now we can break the weak pointer to the static vector.
|
|
5473 | + */
|
|
5474 | + wp->value = NIL;
|
|
5475 | + wp->broken = T;
|
|
5464 | 5476 | }
|
5465 | - /*
|
|
5466 | - * Now we can break the weak pointer to the static vector.
|
|
5467 | - */
|
|
5468 | - wp->value = NIL;
|
|
5469 | - wp->broken = T;
|
|
5470 | 5477 | }
|
5471 | 5478 | }
|
5472 | 5479 | }
|