Skip to content

goto-gcc hybrid binaries on OS X #3867

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 4 commits into from
Apr 30, 2019

Conversation

tautschnig
Copy link
Collaborator

Depends on #3702, #3866, only the last three commits are specifically for this feature. They finally provide a test for the code touched in #3702.

  • 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).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

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: 48629e2).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98026294

Copy link
Contributor

@chrisr-diffblue chrisr-diffblue left a comment

Choose a reason for hiding this comment

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

I'm not an expert on Mach-O (only read the lowlevelbits.org summary, plus some background knowledge of other object formats, such as ELF, COFF, etc). Mach-O parsing functionality looks OK to me. I might question the user experience a bit though. For instance, what happens if a user on, say, a linux host attempts to analyse Mach-O object files? As far as I can tell they'll get told that the files are not goto-programs - where in reality the situation is that reading Mach-O object files is only supported on APPLE platforms. It would be a nicer if there was an explicit message to that affect.

Copy link
Contributor

@smowton smowton left a comment

Choose a reason for hiding this comment

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

On grounds the @chrisr-diffblue knows his onions, happy to proxy approve :)

@tautschnig tautschnig changed the title goto-gcc hybrid binaries on OS X [depends-on: #3702, #3866] goto-gcc hybrid binaries on OS X [depends-on: #3702] Jan 21, 2019
@tautschnig tautschnig changed the title goto-gcc hybrid binaries on OS X [depends-on: #3702] goto-gcc hybrid binaries on OS X Jan 22, 2019
@tautschnig
Copy link
Collaborator Author

Rebase done, I'll try to implement @chrisr-diffblue's suggestion as soon as possible.

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

@tautschnig
Copy link
Collaborator Author

@chrisr-diffblue @smowton @kroening I have added a commit that should enable detection, and yield a warning if we are on a platform where we cannot fully parse the file. Should be ready for (re-)review.

@tautschnig tautschnig removed their assignment Jan 22, 2019
@chrisr-diffblue
Copy link
Contributor

LGTM - thanks for the improved user experience.

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

The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.

@tautschnig tautschnig added the Needs TG approval 🦉 Only merge with explicit approval from test-gen maintainers label Feb 21, 2019
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: 7893de0).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102433712
Status will be re-evaluated on next push.
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).

  • the compatibility was already broken by an earlier merge.

@tautschnig tautschnig changed the title goto-gcc hybrid binaries on OS X goto-gcc hybrid binaries on OS X [depends-on: #4341] Mar 7, 2019
@tautschnig tautschnig added dependent - do not merge and removed Needs TG approval 🦉 Only merge with explicit approval from test-gen maintainers labels Mar 7, 2019
@tautschnig tautschnig assigned tautschnig and unassigned kroening Mar 7, 2019
tautschnig added a commit that referenced this pull request Mar 7, 2019
Pass a message handler to is_goto_binary [blocks: #3867]
@tautschnig tautschnig force-pushed the osx-hybrid-binaries branch from 7893de0 to d16fdcb Compare March 7, 2019 14:13
@tautschnig tautschnig assigned kroening and unassigned tautschnig Mar 7, 2019
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: d16fdcb).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/103556283
Status will be re-evaluated on next push.
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).

  • the compatibility was already broken by an earlier merge.

@tautschnig tautschnig changed the title goto-gcc hybrid binaries on OS X [depends-on: #4341] goto-gcc hybrid binaries on OS X Mar 14, 2019
@tautschnig tautschnig force-pushed the osx-hybrid-binaries branch from d16fdcb to 76600d0 Compare March 14, 2019 22:02
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: 76600d0).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/104510954
Status will be re-evaluated on next push.
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).

  • the compatibility was already broken by an earlier merge.

@tautschnig tautschnig force-pushed the osx-hybrid-binaries branch from 76600d0 to e615d37 Compare April 30, 2019 13:56
@tautschnig tautschnig assigned tautschnig and unassigned kroening Apr 30, 2019
lipo/fat binaries only work properly for executables as it isn't possible to
build archives of fat binaries containing goto-cc sections (ranlib complains
about invalid object files); conversely, adding additional sections isn't
possible with executables, but fat binaries work fine.
A basic Mach-O header parser, only functional on OS X.
The test requires building platform-specific code, and thus additional rules
were added to the Makefile.
Hard-code the magic values as extracted from OS X header files, but
check them when actually building on OS X.
@tautschnig tautschnig force-pushed the osx-hybrid-binaries branch from e615d37 to c7e8bcc Compare April 30, 2019 22:27
@tautschnig tautschnig merged commit 104a704 into diffblue:develop Apr 30, 2019
@tautschnig tautschnig deleted the osx-hybrid-binaries branch April 30, 2019 23:26
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.

6 participants