Skip to content

Commit 188044c

Browse files
author
Charlie Gracie
committed
Fix occasional crash in GC
- VMString and VMSymbol have no gc'able fields - the char field actually points at char data - this data may look like it is in the heap and cause a crash
1 parent 64092a8 commit 188044c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/vmobjects/VMString.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pVMString VMString_new(const char* restrict chars) {
5454
*/
5555
void _VMString_init(void* _self, ...) {
5656
pVMString self = (pVMString)_self;
57-
SUPER(VMObject, self, init, 1);
57+
SUPER(VMObject, self, init, 0);
5858

5959
va_list args;
6060
va_start(args, _self);

src/vmobjects/VMSymbol.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pVMSymbol VMSymbol_new(const char* restrict string) {
5656
*/
5757
void _VMSymbol_init(void* _self, ...) {
5858
pVMSymbol self = (pVMSymbol)_self;
59-
SUPER(VMObject, self, init, 1);
59+
SUPER(VMObject, self, init, 0);
6060

6161
va_list args;
6262
va_start(args, _self);

0 commit comments

Comments
 (0)