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

callFunction argument validation #4626

Merged
merged 2 commits into from
Jun 9, 2022
Merged

callFunction argument validation #4626

merged 2 commits into from
Jun 9, 2022

Conversation

takameyer
Copy link
Contributor

What, How & Why?

A segmentation fault occurs when calling callFunction with invalid arguments.

This closes #4623

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 🚦 Tests
  • 🔀 Executed flexible sync tests locally if modifying flexible sync
  • 📱 Check the React Native/other sample apps work if necessary
  • 📝 Public documentation PR created or is not necessary
  • 💥 Breaking label has been applied or is not necessary

If this PR adds or changes public API's:

  • typescript definitions file is updated
  • jsdoc files updated
  • Chrome debug API is updated if API is available on React Native

@cla-bot cla-bot bot added the cla: yes label Jun 7, 2022
@@ -332,7 +332,7 @@ module.exports = {
let credentials = Realm.Credentials.anonymous();
let user = await app.logIn(credentials);

TestCase.assertEqual(await user.callFunction("sumFunc"), 0);
TestCase.assertEqual(await user.callFunction("sumFunc", 123), 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect this to throw?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I forgot to clean this up.

@takameyer takameyer marked this pull request as ready for review June 8, 2022 08:14
Copy link
Member

@kneth kneth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a changelog entry

@takameyer takameyer merged commit bf2f459 into master Jun 9, 2022
@takameyer takameyer deleted the andrew/bug-4623 branch June 9, 2022 11:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SegFault when using callFunction()
3 participants