Skip to content

Conversation

laanwj
Copy link
Member

@laanwj laanwj commented Apr 15, 2024

Add a check for 32-byte (256-bit) and 64-byte (512-bit) aligned AVX memory accesses (vmova instructions), which cause issues combined with a GCC stack alignment bug on Windows. This check is added to the existing symbol-check.py.

Makes use of the capstone disassembler library.

Also add a test to test the behavior of the check on a series of assembly instructions against the expected output.

Closes #28413.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 15, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

Add a check for 32-byte (256 bit) and 64-byte (512 bit) aligned AVX
memory accesses (vmova instructions), which cause issues combined with a
GCC stack alignment bug on Windows. This check is added to the existing
symbol-check.py.

Makes use of the capstone disassembler library.

Also add a test to test the behavior of the check on a series of
assembly instructions against the expected output.

Closes bitcoin#28413.
@laanwj laanwj force-pushed the 2024-04-forbidden-vmov-check branch from 60d11eb to c21e680 Compare April 15, 2024 11:37
@DrahtBot
Copy link
Contributor

🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the
documentation.

Possibly this is due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.

Leave a comment here, if you need help tracking down a confusing failure.

Debug: https://github.com/bitcoin/bitcoin/runs/23823549566

@fanquake
Copy link
Member

Looks like python-capstone at least exists in Guix already: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/engineering.scm#n1820.

@laanwj
Copy link
Member Author

laanwj commented Apr 18, 2024

Looks like python-capstone at least exists in Guix already:
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/engineering.scm#n1820.

That's good to know! i'm not that surprised, it's a very popular library for doing binary analysis and reverse engineering kind of things.
i'll have a look at integrating it.

@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

@laanwj
Copy link
Member Author

laanwj commented May 16, 2024

Closing for now.

@laanwj laanwj closed this May 16, 2024
@bitcoin bitcoin locked and limited conversation to collaborators May 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

contrib: add symbol-check test for non-existence of vmova instructions in Windows build
3 participants