On Mon, Aug 24, 2020 at 5:59 AM Ryan Schmidt <ryandes...@macports.org> wrote: > > ... > > Logical CPU: 2 > > Error Code: 0x00000007 (invalid protections for user data read) > > Trap Number: 14 > > ==========cut================= > > > > do you see the problem? I don't :| > > Fixed! > > https://github.com/macports/macports-ports/commit/d28bf24c7f754c2b49ff36eb57eb6aec4e687e5f
I see the fix came from https://github.com/ronaldoussoren/pyobjc/pull/301/files. I don't think that fix is correct. I think the use is going to give you more trouble over time. You can't cast a const object to non-const and write to it. The non-const cast is undefined behavior because the object is const. (You can only cast a non-const object back to non-const). I think a more correct (?) fix would be to track the const-ness of the actual object. That is: static BOOL is_default_descr(struct _PyObjC_ArgDescr* descr) needs a way to look at _PyObjC_ArgDescr descr, and determine if it is a non-const object. I think there are (at least) two ways to do it. First, add a new field to _PyObjC_ArgDescr. Second, and a new parameter to is_default_descr. I don't know which is best. Jeff