Commit Graph

2487 Commits

Author SHA1 Message Date
Ivan Krysak 4737efd763 Add a non-pass binary loader 2022-05-06 18:51:47 +02:00
Ivan Krysak 6ba8010507 Add a missing include 2022-05-06 18:51:47 +02:00
Ivan Krysak 2a6a7943f4 Fix a couple of minor typos 2022-05-06 18:51:47 +02:00
Alessandro Di Federico 3b7fc401d5 Merge branch 'feature/fix-block-end' 2022-05-06 16:04:34 +02:00
Alessandro Di Federico aa07b96d61 EFA: fix Block.End in ground truth 2022-05-06 16:04:23 +02:00
Alessandro Di Federico 1764f6120c EFA: update Block.End when appropriate
This change handles the situation in which getLastPC returns an invalid
MetaAddress. This is a new behavior introduces to handle queries on
`llvm::BasicBlock`s whose last PC is ambiguous.
2022-05-06 16:04:22 +02:00
Alessandro Di Federico 9fcdc3393a getLastNewPC: return nullptr when ambiguous 2022-05-06 16:04:22 +02:00
Alessandro Di Federico f42fd7f801 Merge branch 'feature/new-graphql-server' 2022-05-06 15:28:45 +02:00
Giacomo Vercesi 09d9950aac daemon: fix debug page in subpaths 2022-05-06 15:04:19 +02:00
Giacomo Vercesi d13e802c4f daemon: Disable debug page in production mode 2022-05-06 15:04:19 +02:00
Giacomo Vercesi 3bdf8468b1 Add extra command line options to 'revng daemon'
--production runs the server on all interfaces and with debug options
disabled
--hypercorn-args allows to pass extra options to hypercorn when running
revng daemon
2022-05-06 15:04:19 +02:00
Giacomo Vercesi 70f7337f28 Substitute Flask with Starlette
In the future we will need to use GraphQL subscriptions. This is done
via websockets and is supported in Ariadne. However this support is
limited to ASGI frameworks, which Flask isn't a part of.
Startlette is a direct depencency of Ariadne, and all of Ariadne's
features are fully integrated with Starlette, so the switch allows to
drop some Flask integration cruft and streamline the revng.daemon
package.
Starlette does not have a built-in development server, instead
Hypercorn, which is an ASGI-compliant HTTP server, is used in place of
Flask's Werkzeug/Gunicorn for both the development and production
server roles.
2022-05-06 15:04:19 +02:00
Giacomo Vercesi 2a89da8d53 revng daemon: properly shut down after tests
Fix termination of the daemon process during test, previously it was the
daemon instances were not cleaned up properly and remained running after
the tests
2022-05-06 15:03:51 +02:00
Giacomo Vercesi f02976faee revng --help: do not display absolute paths 2022-05-06 15:03:35 +02:00
Alessandro Di Federico fd350de6b4 Merge branch 'feature/adopt-cabi-prototypes' 2022-05-05 14:48:54 +02:00
Alessandro Di Federico 1370763bc4 llvm pipeline: handle - as input 2022-04-29 17:57:49 +02:00
Alessandro Di Federico cafdd7c6f9 Introduce revng model override-by-name 2022-04-29 17:57:49 +02:00
Alessandro Di Federico 9ca3447b5d revng.cli: introduce try_run 2022-04-29 17:57:49 +02:00
Alessandro Di Federico 3c2a7dd5f2 EnforceABI: in case of no prototype, use default 2022-04-29 17:57:49 +02:00
Alessandro Di Federico a4d7e78856 Stop registering Invalid model::Functions 2022-04-29 17:57:49 +02:00
Alessandro Di Federico 92d3b95fba Model: make more things optional 2022-04-29 17:57:49 +02:00
Alessandro Di Federico 291ed672b4 Introduce FunctionType::Layout::dump 2022-04-29 17:57:49 +02:00
Alessandro Di Federico 83f08249d7 Introduce Layout::Argument::StackSpan::operator+ 2022-04-29 17:57:49 +02:00
Alessandro Di Federico 305a6ba69c Isolate: use Attribute::NullPointerIsValid
This enables us to handle memory accesses at nullptr.
2022-04-29 17:57:49 +02:00
Alessandro Di Federico 9e46d4fdcc Introduce getLLVMTypeForScalar(QualifiedType) 2022-04-29 17:57:49 +02:00
Alessandro Di Federico 0e907021e3 EnforceABI: preserve metadata
This is particularly useful for preserving `FunctionTag`s.
2022-04-29 17:57:49 +02:00
Alessandro Di Federico 2e933cde6b Dynamic functions: use OriginalName
`OriginalName` is the key.
2022-04-29 17:57:49 +02:00
Alessandro Di Federico 0f3c29fa1b Split moveToNewFunctionType off changeFunctionType 2022-04-29 17:57:49 +02:00
Alessandro Di Federico a355a90c7e model::Binary::getPointerTo(model::QualifiedType) 2022-04-29 17:57:49 +02:00
Alessandro Di Federico 85e031c218 FunctionType::Layout: construct from model::Type 2022-04-29 17:57:49 +02:00
Alessandro Di Federico 4904f8cbe1 GeneratorIterator: simplify iterators 2022-04-29 17:57:49 +02:00
Massimo Fioravanti 016a9464b8 Model diff: handle UpcastablePointer correctly 2022-04-29 17:57:49 +02:00
Alessandro Di Federico e6f6010cfd Build with -fvisibility-inlines-hidden
`-fvisibility-inlines-hidden` ensures that each dynamic library uses its
own version of each `inline` function.

This reduces the number of exported symbols and resolves issues related
to picking a version of a weak symbol that has already been deleted upon
`dlclose`.

The downside of this flag is that the address of `inline` functions can
be different across different libraries. This commit drops certain
assertions that were relying on this behavior.
2022-04-29 16:40:24 +02:00
Alessandro Di Federico 13bf5a7171 Merge branch 'feature/resourcefinder-use-self-maps' 2022-04-28 22:19:01 +02:00
Giacomo Vercesi 168eab6cc5 Use /proc/self/maps to determine root
Use the path of the mapped librevngSupport.so to determine the root
directory.
2022-04-28 22:18:08 +02:00
Giacomo Vercesi 91067a8886 getCurrentExecutableFullPath: assert on error
`getCurrentExecutableFullPath` now aborts if it cannot determine the
real path instead of returning an empty string.
2022-04-28 22:10:14 +02:00
Giacomo Vercesi d109a68bc4 Remove BUILD_PATH
It has not been relevant for a long time.
2022-04-28 22:10:02 +02:00
Alessandro Di Federico fe9b125aa4 Merge branch 'feature/revng-check-conventions-fix' 2022-04-28 09:47:49 +02:00
Giacomo Vercesi 23362444b8 check-conventions: improve file list generation
Improves the generation of the file list by using git diff-files and
parsing the output directly.

Also:

* The list now only includes files that exist in the working directory
  (so no existence checks are needed).
* Added `--cached` option to check staged files only.
* Fix some missing local variable declarations.
2022-04-28 09:46:10 +02:00
Giacomo Vercesi 7c64831835 revng-check-conventions: install configurations
Fix bug in revng-check-conventions that caused config files to not
be present in the install directory and to not be looked for if run
from there.
2022-04-28 09:45:52 +02:00
Alessandro Di Federico e0dac4e27d Merge branch 'feature/string-map-container-usability' 2022-04-28 08:32:40 +02:00
Pietro Fezzardi e9470d031d Add std::map-like methods to StringMapContainer 2022-04-27 17:40:21 +02:00
Pietro Fezzardi de0398754d Add makeStringMapContainerFactory 2022-04-27 17:09:28 +02:00
Pietro Fezzardi da44302bba Fix StringMapContainer::remove on isAll target
Before this commit, the container did not properly remove everything
when removing a wildcard * target.
2022-04-27 17:08:13 +02:00
Alessandro Di Federico 72d0c5776f Merge branch 'feature/python-api-graphql' 2022-04-26 16:08:07 +02:00
Giacomo Vercesi b9794b84bb revng.daemon: introduce tests
Add end-to-end tests checking that every GraphQL endpoint is properly
working and returning the expected result
2022-04-26 15:59:35 +02:00
Giacomo Vercesi 4f7908753e Introduce the revng-daemon command 2022-04-26 15:59:35 +02:00
Giacomo Vercesi 172faebacf Introduce the revng.daemon GraphQL API
This commit introduces the `revng.daemon` Python module, a Flask-powered
web application that exposes the functionality from `revng.api` across a
GraphQL API
2022-04-26 15:59:35 +02:00
Giacomo Vercesi 7231ee607a Introduce PipelineC wrapper for Python
Add the revng.api module: a wrapper around the PipelineC API.
2022-04-26 15:59:35 +02:00
Giacomo Vercesi 4445a841b2 revng-pipeline: introduce artifacts
Add a new key to a Step, named Artifacts. If present, it indicates that
the step has a "default" Kind and Container that can be easily retrieved
without explicitly specifying either when producing an artifact.
2022-04-26 15:59:35 +02:00