Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSIndexSet.alloc().initWithIndex_ segfaults #625

Closed
Sbte opened this issue Sep 25, 2024 · 6 comments
Closed

NSIndexSet.alloc().initWithIndex_ segfaults #625

Sbte opened this issue Sep 25, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@Sbte
Copy link

Sbte commented Sep 25, 2024

Describe the bug

The following code segfaults:

from Foundation import NSIndexSet
s = NSIndexSet.alloc().initWithIndex_(0)

This is used in array_property so using array_property also causes segfaults.

Note that NSIndexSet.indexSetWithIndex_(0) works fine.

Platform information

  • Python version
    3.12.6
  • How was python installed (python.org, anaconda, homebrew, ...)
    homebrew
  • macOS version
    14.7, but also happens on 13.6.6
@Sbte Sbte added the bug Something isn't working label Sep 25, 2024
@rndblnch
Copy link
Contributor

this looks very similar to the old #271

@rndblnch
Copy link
Contributor

the fix for #271 is specific to NSData, it can be found in this commit: bf601d4

@ronaldoussoren
Copy link
Owner

Thanks.

I'm currently travelling and will look into this when I'm back home.

@ronaldoussoren
Copy link
Owner

@rndblnch: #271 is relevant, I'm tweaking that workaround to be more general. Thanks for the tip, that made finding a workaround a lot easier.

ronaldoussoren added a commit that referenced this issue Oct 27, 2024
ronaldoussoren added a commit that referenced this issue Oct 27, 2024
ronaldoussoren added a commit that referenced this issue Oct 27, 2024
@rndblnch
Copy link
Contributor

@rndblnch: #271 is relevant, I'm tweaking that workaround to be more general. Thanks for the tip, that made finding a workaround a lot easier.

glad it helped, it's pure chance that I saw this one while reporting something else, and it rang a bell.
after some digging I found the bug I reported 5 years ago …
thanks again for your work.

@Sbte
Copy link
Author

Sbte commented Oct 31, 2024

That indeed seems to have fixed the issue, also when using array_property. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants