Commit Graph

5690 Commits

Author SHA1 Message Date
Alessandro Di Federico 077a6e2629 Importers: ignore unmapped code
This commit ensures that parts of the model that must point to code
(specifically `Binary::EntryPoint`, `Binary::ExtraCodeAddresses` and
`Function::Entry`) actually point to a segment mapped as +x.
2024-11-28 14:04:36 +01:00
Alessandro Di Federico 37feb2dd77 Binary::verify: verify executable addresses
Fail if code addresses are not within an executable segment.
2024-11-28 14:04:36 +01:00
Alessandro Di Federico 278c6f625c Importers: first of all, Segments
This commit makes sure that before setting EntryPoint, adding
ExtraCodeAddresses or Function entry points, we completed the processing
of Segments.
2024-11-28 14:04:36 +01:00
Alessandro Di Federico d1252046ce Importers: do not set EntryPoint, if absent 2024-11-28 13:58:29 +01:00
Alessandro Di Federico 1e2a55e372 Minor changes 2024-11-28 13:58:28 +01:00
Alessandro Di Federico 6e733427bc emitMessage: fix function calle emission 2024-11-27 17:18:39 +01:00
Alessandro Di Federico 11d8515f46 ModelToHeader: adjust blank lines 2024-11-27 17:18:12 +01:00
Alessandro Di Federico c81f02a10f Merge branch 'feature/llvm-transparent-zstd' 2024-11-26 15:42:17 +01:00
Giacomo Vercesi 70217f00c9 revng opt: drop unwrapping of zstd modules
Drop support of uncompressing zstd-compressed modules in `revng opt` as
this functionality has been moved within `llvm`.

(This is a revert of commit dd8d158e47)
2024-11-26 11:30:19 +01:00
Giacomo Vercesi 58b326b8fa ZstdStream: remove manual memory management
Remove the use of manual memory management, convert to the use of
`std::unique_ptr`.
2024-11-26 09:48:37 +01:00
Alessandro Di Federico 56c6d49050 Merge branch 'feature/backlog-fixes' 2024-11-25 17:58:59 +01:00
Giacomo Vercesi 046be11be2 revng graphql: gracefully terminate daemon
When stopping an internal daemon, first try to use SIGINT and then
resort to SIGKILL. This is to avoid the signal handler exiting with a
non-zero return code during shutdown.
2024-11-25 17:52:27 +01:00
Giacomo Vercesi 3a936a650c Tracing/Runner: lazily initialize CommandHandler
Avoid initializing `CommandHandler` statically, as this causes the
constructor to run every time `libPipelineC` is linked against.
2024-11-25 16:25:48 +01:00
Giacomo Vercesi 1b6ff00595 Tracing/Runner: delay registering signal handlers
On the C++ side of revng it is important that LLVM's signal handlers are
registered within the initialization of `revng::InitRevng`, as this
allows downstream users (e.g. `revng daemon`) to preserve its signal
handlers before setting up the C++ infrastructure. In
`Tracing/Runner.cpp` there's `CommandHandler` which is statically
initialized and called `llvm::sys::AddSignalHandler`, this happened at
`dlopen` time, breaking the promise outlined above. Rework the code so
that the function is called lazily instead of statically.
2024-11-25 14:55:01 +01:00
Giacomo Vercesi 9ee719f2c2 ptml/common: fix missing kwargs
Add the missing `kwargs` to the invocation of the wrapped `func` in
`suppress_brokenpipe`.
2024-11-22 16:05:16 +01:00
Alessandro Di Federico 686083bdab Remove mentions to revng-c 2024-11-21 15:54:23 +01:00
Alessandro Di Federico 143c315196 Merge revng-c into revng 2024-11-21 10:50:55 +01:00
Alessandro Di Federico 73de70872f Merge branch 'feature/backlog-fixes' 2024-11-13 09:28:35 +01:00
Giacomo Vercesi 38cd15d755 fetch_debuginfo: fix race condition
Fix a possible race condition that could arise if multiple instances of
`fetch-debuginfo` are run in parallel. This avoids the same file being
written by multiple processes and being moved early. This avoids a
`FileNotFoundError` and possibly data corruption due to the concurrent
situation.
2024-11-13 09:28:12 +01:00
Giacomo Vercesi 7a01742421 mass-testing: show smallest binaries
Show on the overview page of mass-testing the smallest binary for OOMs
and timeouts, as these are probably show an early sign of some broken
aspect of the pipeline.
2024-11-13 09:28:12 +01:00
Giacomo Vercesi 8773f3bbd6 mass-testing dump-sections: improve --text-size
Improve text-size detection in the case of PE and Mach-O files. In both
cases if a suitable `.text`-like section is not found then the text size
will be the sum of all segments with an executable flag.
2024-11-13 09:28:12 +01:00
Alessandro Di Federico efcea8ae48 importBinary: fix error handling 2024-11-12 18:05:48 +01:00
Alessandro Di Federico ba186a130c s/module.ll/module.bc.zstd/g 2024-11-12 14:58:00 +01:00
Alessandro Di Federico bbd527ae51 DecompileToDirectory: do not emit PTML 2024-11-12 14:28:21 +01:00
Alessandro Di Federico 30f464119e s/module.ll/module.bc.zstd/g 2024-11-11 16:51:18 +01:00
Alessandro Di Federico 7e88fbedfc Merge branch 'feature/shorter-names' 2024-11-07 09:12:32 +01:00
Alessandro Di Federico 24651ac468 Merge branch 'feature/shorter-names' 2024-11-07 09:12:27 +01:00
Ivan Krysak 4582982075 Replace std::string_view with llvm::StringRef 2024-11-06 19:18:53 +02:00
Ivan Krysak c72abab5e4 Introduce name collision tests 2024-11-06 19:18:53 +02:00
Ivan Krysak 7a827b4ef5 Use doxygen for header grouping 2024-11-06 19:18:53 +02:00
Ivan Krysak 64446d0453 Adopt name builder across the model users 2024-11-06 19:18:53 +02:00
Ivan Krysak 2240da4ffc Improve test documentation 2024-11-06 19:18:53 +02:00
Ivan Krysak efbc5cdd5c Introduce an error creation helper 2024-11-06 19:18:53 +02:00
Ivan Krysak 8a774b22f5 Model: forbid copies and moves of abstract structs 2024-11-06 15:43:13 +02:00
Ivan Krysak 672ee5df50 Replace std::string_view with llvm::StringRef 2024-11-06 15:43:13 +02:00
Ivan Krysak 8e3c9c0788 Model: remove obsolete name methods 2024-11-06 15:43:13 +02:00
Ivan Krysak a67ba96644 Adopt name builder across the model users 2024-11-06 15:43:13 +02:00
Ivan Krysak 2a5d50630b Model: adopt name builder in verification 2024-11-06 15:43:13 +02:00
Ivan Krysak 2be6f4aebb TypeSystemPrinter: adopt name builder 2024-11-06 15:43:13 +02:00
Ivan Krysak ad868f57ad Model: introduce name builder 2024-11-06 15:43:13 +02:00
Ivan Krysak c101770c72 ModelTypeTests: pass the binary to the verifier 2024-11-06 15:42:44 +02:00
Ivan Krysak 0a3628e6fe Model: introduce naming configuration 2024-11-06 15:42:44 +02:00
Ivan Krysak 1eb80ecd2d Introduce an error creation helper 2024-11-06 15:20:37 +02:00
Ivan Krysak a0f4921e07 Minor improvements 2024-11-04 19:43:03 +02:00
Ivan Krysak a12f5d9e97 Minor improvements 2024-11-04 18:51:12 +02:00
Alessandro Di Federico 96b60dbde3 Merge branch 'feature/prepare-revng-c-merge' 2024-11-04 15:14:35 +01:00
Alessandro Di Federico d32726cf47 Merge branch 'feature/prepare-revng-c-merge' 2024-11-04 15:14:30 +01:00
Alessandro Di Federico a48e0f5c93 Rework usage of analyses list 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 8cd4ee3b59 Move Kinds.h to revng 2024-11-04 15:09:56 +01:00
Alessandro Di Federico 98903f6b07 Move Ranks.h to revng 2024-11-04 15:09:56 +01:00