ObjFW  Diff

Differences From Artifact [790a0b73c2]:

  • File src/runtime/autorelease.m — part of check-in [95b1b31aa5] at 2012-07-14 22:21:24 on branch trunk — Fall back to of_tlskey if __thread is unavailable. (user: js size: 2948)

To Artifact [0fa16a5970]:

  • File src/runtime/autorelease.m — part of check-in [335ba77462] at 2012-07-15 00:38:10 on branch trunk — Fix missing initialization of size. (user: js size: 2970)

101
102
103
104
105
106
107

108
109
110
111
112
113
114
		if (!of_tlskey_set(objectsKey, objects))
			ERROR("Failed to set TLS key!")
		if (!of_tlskey_set(sizeKey, (void*)(uintptr_t)of_pagesize))
			ERROR("Failed to set TLS key!")
#endif

		top = objects;

	}

	if ((uintptr_t)top >= (uintptr_t)objects + size) {
		ptrdiff_t diff = top - objects;

		size += of_pagesize;
		if ((objects = realloc(objects, size)) == NULL)







>







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
		if (!of_tlskey_set(objectsKey, objects))
			ERROR("Failed to set TLS key!")
		if (!of_tlskey_set(sizeKey, (void*)(uintptr_t)of_pagesize))
			ERROR("Failed to set TLS key!")
#endif

		top = objects;
		size = of_pagesize;
	}

	if ((uintptr_t)top >= (uintptr_t)objects + size) {
		ptrdiff_t diff = top - objects;

		size += of_pagesize;
		if ((objects = realloc(objects, size)) == NULL)