Skip to content

Cleanup throws in irep (de)serialization #2960

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

Conversation

hannes-steffenhagen-diffblue
Copy link
Contributor

No description provided.

@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue changed the title Invariant clean irep serialization Cleanup throws in irep (de)serialization Sep 14, 2018
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: c8d7718).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/84845938

@@ -95,8 +96,7 @@ void irep_serializationt::read_irep(

if(in.get()!=0)
{
std::cerr << "irep not terminated\n";
throw 0;
throw deserialization_exceptiont("irep not terminated");
Copy link
Member

Choose a reason for hiding this comment

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

Where is this caught?

Copy link
Contributor Author

@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue Sep 18, 2018

Choose a reason for hiding this comment

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

Good catch (no pun intended) I'd forgotten about that (I originally introduced something like a cprover_exception_baset and caught that, but then decided against it as I didn't find it saved that much effort compared to not having it...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@peterschrammel This is now sorted with #2996

@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue force-pushed the invariant_clean-irep_serialization branch 2 times, most recently from b04c67c to 54d5487 Compare September 18, 2018 10:22
@@ -33,4 +33,23 @@ class invalid_user_input_exceptiont
std::string what() const noexcept;
};

class system_exceptiont
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add comments: when should this be used, i.e., what is (or isn't) a "system" exception.

@@ -52,4 +52,13 @@ class system_exceptiont
}
};

class deserialization_exceptiont
Copy link
Collaborator

Choose a reason for hiding this comment

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

See other PR: this should likely derive from some common invalid-input exception base class.

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.

This PR failed Diffblue compatibility checks (cbmc commit: b04c67c).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85131105
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • the cbmc commit has disappeared in the mean time (e.g. in a force-push)
  • the author is not in the list of contributors (e.g. first-time contributors).

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: 54d5487).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85132310

@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue force-pushed the invariant_clean-irep_serialization branch from 54d5487 to 9373209 Compare September 21, 2018 13:09
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: 9373209).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/85576436

@tautschnig tautschnig merged commit db3784f into diffblue:develop Sep 24, 2018
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.

4 participants