Skip to content

fix: added null check & type checking #1985

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

Merged
merged 3 commits into from
Jun 22, 2023

Conversation

arteevraina
Copy link
Collaborator

@arteevraina arteevraina commented Jun 21, 2023

  • Checks if *x is nullptr.

Refer: #1599

@certik
Copy link
Contributor

certik commented Jun 21, 2023

Can you check that this PR now reports an error for that issue instead of a segfault?

@arteevraina
Copy link
Collaborator Author

Can you check that this PR now reports an error for that issue instead of a segfault?

Yes, It gives an error message now instead of segfault for #1599

(lp) arteevraina@Arteevs-MacBook-Air lpython % src/bin/lpython src/a.py                                         
code generation error: Internal error: x is nullptr


Note: if any of the above error or warning messages are not clear or are lacking
context please report it to us (we consider that a bug that must be fixed).

@arteevraina arteevraina marked this pull request as ready for review June 21, 2023 15:23
@certik
Copy link
Contributor

certik commented Jun 21, 2023

Very good, let's see if the tests pass.

@certik certik merged commit 62e5ead into lcompilers:main Jun 22, 2023
@certik
Copy link
Contributor

certik commented Jun 22, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants