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

Protect make_n_ary() from being called with empty list #1627

Merged
merged 6 commits into from
Jan 28, 2024

Conversation

fbrausse
Copy link
Collaborator

@fbrausse fbrausse commented Jan 27, 2024

Addresses #1626. Basically, smt-conv's make_n_ary() doesn't support an empty argument list. I'll go through the rest of the node-flattener checking that other invocations of that function are properly guarded.

This PR:

  • replaces the public make_n_ary() API with separate functions for conjunction/disjunction that handle an empty list of arguments, and
  • adds TCs to test both, the default, and the tuple-sym-flattener (with which master aborted for this example as well).
  • adds a KNOWNBUG case, which most likely is due to Failure to detect invalid dereference for printf with %s #1628.

@fbrausse fbrausse added the smt label Jan 27, 2024
@fbrausse fbrausse changed the title Fb/fix 1626 Protect make_n_ary() from being called with empty list Jan 27, 2024
@fbrausse fbrausse linked an issue Jan 27, 2024 that may be closed by this pull request
The bug is that printf() on "%s" should scan the given string for '\0', but
currently that's not modelled. Also, the test case doesn't pass a pointer to
a string...
@fbrausse fbrausse marked this pull request as ready for review January 28, 2024 09:29
Copy link
Contributor

@rafaelsamenezes rafaelsamenezes left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@lucasccordeiro lucasccordeiro left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this PR, @fbrausse.

@lucasccordeiro lucasccordeiro merged commit 9de1ff8 into master Jan 28, 2024
11 checks passed
@lucasccordeiro lucasccordeiro deleted the fb/fix-1626 branch January 28, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assertion `!v.empty()' failed at smt_conv.h:216
3 participants