Registry / devops / archinfo

archinfo

JSON →
library9.3.3pypypi✓ verified 22d ago

archinfo is a Python library providing classes with architecture-specific information essential for cross-architecture tools. It serves as a foundational component within the larger angr binary analysis framework, defining architectural details like register mappings, endianness, and instruction set properties. The library is actively maintained, with frequent minor updates, and is currently at version 9.2.209.

pip install archinfo
INSTALL
IMPORT
SIG · ARCHINFO
A
archinfo
devopspythonv9.3.3
Install
1.7s avg
Import
76ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v9.2.213 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.082s · 18.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.070s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ArchAMD64
from archinfo import ArchAMD64
Import a specific architecture class.
get_host_arch
from archinfo import get_host_arch
Utility function to detect and return the current host architecture.
Arch
from archinfo.arch import Arch
Import the base Arch class for custom architecture definitions or type checking.

This quickstart demonstrates how to obtain the host system's architecture information and how to instantiate a specific architecture class, such as AMD64. It then prints basic properties of these architecture objects, including name, bitness, endianness, and key register names.

from archinfo import get_host_arch, ArchAMD64 # Get the architecture of the host machine host_arch = get_host_arch() print(f"Host Architecture: {host_arch.name} ({host_arch.bits}-bit, {host_arch.memory_endness.name} endian)") # Instantiate a specific architecture (e.g., AMD64) x86_64_arch = ArchAMD64() print(f"AMD64 Architecture: {x86_64_arch.name} ({x86_64_arch.bits}-bit, {x86_64_arch.memory_endness.name} endian)") print(f"Instruction Pointer Register: {x86_64_arch.ip_name}") print(f"Stack Pointer Register: {x86_64_arch.sp_name}")
Debug
Known issues
breakingInternal architecture definitions, especially register file offsets and VEX IR assumptions, are tightly coupled with PyVEX. Major updates to PyVEX or the angr framework may introduce breaking changes to how these internal structures are defined or accessed, even if the public archinfo API remains superficially similar.
fix
Always ensure archinfo is installed with a compatible version of pyvex and other angr components. Consult angr's migration guides for specific breaking changes related to architecture definitions or register handling if issues arise after an upgrade.
affects: All versions, particularly across major angr/pyvex releases.
gotchaarchinfo is a core library within the angr ecosystem. Using mismatched versions of archinfo with other angr components (like pyvex, cle, or claripy) can lead to subtle runtime errors, incorrect architectural interpretations, or crashes due to inconsistent internal representations.
fix
For projects leveraging angr, install 'angr' as a whole via pip, which will pull in compatible versions of its dependencies including archinfo. If using archinfo standalone, carefully manage its version to match the expectations of any dependent libraries.
affects: All versions, especially when used outside of a unified angr installation.
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'archinfo'
The 'archinfo' module is not installed in the Python environment.
fix
Install the module using pip: 'pip install archinfo'.
ImportError: cannot import name 'Arch' from 'archinfo'
The 'Arch' class is not available in the 'archinfo' module, possibly due to an outdated version.
fix
Ensure you have the latest version of 'archinfo' installed: 'pip install --upgrade archinfo'.
AttributeError: module 'archinfo' has no attribute 'ArchARM'
The 'ArchARM' attribute is not present in the 'archinfo' module, likely due to a missing or outdated module.
fix
Verify that 'archinfo' is correctly installed and up to date: 'pip install --upgrade archinfo'.
TypeError: 'NoneType' object is not callable
Attempting to call a function or method that is None, possibly due to a failed import or incorrect module usage.
fix
Check the import statements and ensure all necessary modules are correctly installed and imported.
ValueError: Unsupported architecture: 'armv7'
The specified architecture 'armv7' is not supported by the 'archinfo' module.
fix
Use a supported architecture identifier as defined in the 'archinfo' documentation.
Upgrade
Version history
9.3.3latest on PyPI · released Aug 19, 2026
Audit
Dependencies
backports-strenumrequiredRequired for core functionality, likely for enum backporting.
Agent activity
33 hits · last 30 days
node
28
OpenAI (training)
1
Resources
archinfo — pip install archinfo · libregistry