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

Classname as Selector crashes #2166

Merged
merged 1 commit into from
Jun 5, 2016
Merged

Classname as Selector crashes #2166

merged 1 commit into from
Jun 5, 2016

Conversation

baconpaul
Copy link
Contributor

This fixes #669

1 Object: 2

If you use a registered classname as a selector it would think it was a method, but resolve the object as the symbol and not check. Then if it actually looked it up you got segfaulted.

So this checks and puts you in the same error path that you get with

1 FooBazNotObject: 2

or

1 fooBazNotAMethod: 2

…eaning

1 Object: 2

crashes. This resolves that by checking.
@baconpaul
Copy link
Contributor Author

Oh also (and apologies for not have found this in the doc): I have small test cases I used to make sure this worked of course. Is there a way I can add those to standard regtest suite for SC? It wasn't clear to me from the developer doc.

Hope you can tolerate the newbie question!

@crucialfelix
Copy link
Member

Yes please post the test case. What a silly bug you've found !

You can add it to the test suite, but after the fix is in so that Travis
doesn't segfault all the time.

Thanks

On Sunday, June 5, 2016, baconpaul notifications@github.com wrote:

Oh also (and apologies for not have found this in the doc): I have small
test cases I used to make sure this worked of course. Is there a way I can
add those to standard regtest suite for SC? It wasn't clear to me from the
developer doc.

Hope you can tolerate the newbie question!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#2166 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AANWchYzuABX-k2TAQxv0PjQbWbvpxNIks5qIxRwgaJpZM4IuaM9
.

@baconpaul
Copy link
Contributor Author

Great. I'm really sorry, where do I commit it and how do I get it introduced into the suite? I can do that as another pull request when this one is merged. Happy to just read a doc but I can't find it, and the test suite directory in my fork looks tiny.

Oh and I didn't find the bug; I just fixed it. Someone else deserves credit for filing a bug report with a clear repo! I picked up a couple this weekend that looked tractable so I could learn the code some and set up my dev environment.

Thanks

@telephon
Copy link
Member

telephon commented Jun 5, 2016

re the test suite: it is here https://github.com/supercollider-quarks/CommonTests
just poke around there, it's fairly easy to just modify some existing tests to fit the needs.

@baconpaul
Copy link
Contributor Author

Got it. Once this is merged I'll send a pull request for the updated Methods test. Thanks very much!

@telephon telephon merged commit ce29279 into supercollider:master Jun 5, 2016
@baconpaul
Copy link
Contributor Author

Thanks for merging! Here's the test pull request to match. supercollider-quarks/CommonTests#6

@baconpaul baconpaul deleted the BUG669 branch June 5, 2016 23:02
@crucialfelix crucialfelix added this to the 3.8 milestone Jun 7, 2016
@crucialfelix crucialfelix added bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" labels Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants