ObjFW  Check-in [3b3729a316]

Overview
Comment:runtime: Don't use static selectors

Static selectors are initialized by a global constructor that might run
too late: If a class has a +[load] that triggers an +[initialize], this
could result in trying to call +[initialize] with the selector in
class.m still being uninitialized. When this happens, it results in a
weird looking crash in an entirely unrelated method. This is because
when uninitialized, the selector name has not been replaced with a
selector UID yet, meaning the pointer to the selector name is treated as
the selector UID. As the dispatch only considers the low 16 bits of the
selector UID for performance reasons, it will just take the low 16 bits
of the pointer to the selector name as the UID without any complaints.
This can then result in calling a random method on that class which then
crashes.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3b3729a316710420baf0fc9c7b032a94225c91da7209214e62edf86d3c25a212
User & Date: js on 2019-06-25 20:09:55
Other Links: manifest | tags
Context
2019-06-25
20:53
Add OFASN1DERRepresentation protocol check-in: cbaae715ce user: js tags: trunk
20:09
runtime: Don't use static selectors check-in: 3b3729a316 user: js tags: trunk
2019-06-23
22:53
Add -[OFASN1BitString DEREncodedValue] check-in: ea6e0818b0 user: js tags: trunk
Changes