Skip to content

Fix segmentation fault when failing to lookup parameter names [depends-on: #4434] #4390

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

Closed
wants to merge 1 commit into from

Conversation

tautschnig
Copy link
Collaborator

Users should not be able to trigger segmentation faults.

Only the second commit is new, the first one is #4374. It is likely possible to also trigger the same problem with other tests and we might thus be able to get rid of the dependency on that PR. It was just that test where I bumped into this problem.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@smowton
Copy link
Contributor

smowton commented Mar 15, 2019

I'd say we generally mishandle the case where multiple class files are given on the command-line. I'd been meaning to allow language frontends to specify whether they are singletons (as Java effectively is), and if so notify the existing singleton of the extra arg rather than make a whole new instance of java_bytecode_languaget. Is this crash only achievable with multiple instances of the frontend?

@tautschnig tautschnig changed the title Fix segmentation fault when failing to lookup parameter names [depends-on: #4374] Fix segmentation fault when failing to lookup parameter names Mar 26, 2019
@tautschnig
Copy link
Collaborator Author

Is this crash only achievable with multiple instances of the frontend?

Yes, at least in my (limited) testing I was only able to trigger this by passing multiple class files on the command line.

I am not very certain that the "fix" is right, but seg faulting certainly is wrong.

Users should not be able to trigger segmentation faults.
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

✔️
Passed Diffblue compatibility checks (cbmc commit: 59b277f).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/105815861

@tautschnig tautschnig changed the title Fix segmentation fault when failing to lookup parameter names Fix segmentation fault when failing to lookup parameter names [depends-on: #4434] Mar 26, 2019
@tautschnig
Copy link
Collaborator Author

Superseded by #4434 and #4437.

@tautschnig tautschnig closed this Mar 26, 2019
@tautschnig tautschnig deleted the java-segv branch March 26, 2019 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants