ObjFW  Check-in [335ba77462]

Overview
Comment:Fix missing initialization of size.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 335ba774622ad9a2c17a1ada38365927b3b7b583acdebcfca38b5833c4241b23
User & Date: js on 2012-07-15 00:38:10
Other Links: manifest | tags
Context
2012-07-15
00:45
Fix a bug in free_class. check-in: 1633ea5d2a user: js tags: trunk
00:38
Fix missing initialization of size. check-in: 335ba77462 user: js tags: trunk
2012-07-14
22:21
Fall back to of_tlskey if __thread is unavailable. check-in: 95b1b31aa5 user: js tags: trunk
Changes

Modified src/runtime/autorelease.m from [790a0b73c2] to [0fa16a5970].

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)