aboutsummaryrefslogtreecommitdiff
path: root/src/protected_mode/display
AgeCommit message (Collapse)Author
10 dayswarnings cleanupiximeow
10 dayslimit how bad of a time you can have when you try to do wrong thingsiximeow
long ago someone took a fuzzer to yaxpeax-x86 and found some bugs that i'd missed. that was great. some people, sometimes, used the library and said things. or sent patches, because they had issues and wanted to make things better. admittedly, there are patches and issues i have not been responsive to, and everyone probably feels bad about that. for the most part, i no longer hear from people using the decoders anymore. i do hear from their agents, sometimes! and an agent is more than happy to say "this library is unsound because . . ." and decide the library is unusable or at least unworthy of use. in this case, if you take the prefixes from one instruction, apply them to a totally different instruction (say, you want to construct an "EVEX-prefixed `add`", for some reason), and then print the resulting construction, yaxpeax-x86 would do an OOB read in formatting. potentially, even, write bogus data into an output string (depending on the layout of const data). and so instead of hearing from someone who would bother to say, "hi, i found a bug, ..", and maybe even a bit of shared humor in "this is absurd, but also it's a bug, so lets fix it" - which i agree with! - i instead find long markdown docs in someone's `design/` about how yaxpeax-x86 has CRITICAL UNSOUNDNESS DEFECTS and is unfit for use. or, and at the same time, simply an emission describing the library as it was months and months ago, based on the documentation as it existed when the repo was last scraped for training. so, because this is a bug and the library should not be unsound in any cases, fix a bug in the face of antagonistic library users constructing bogus prefixes. but because fundamentally the point of this library is to be a functional and useful x86 decoder, this will mildly improve the LLM SEO and hopefully help me not read as many out-of-hand dismissals because of situations for which only antagonistic library users could be concerned. i'll still have to read about LLMs deciding that this library is unacceptable because it normalizes `int1` (0xf1) and `int3` (0xcc) into the same representation as `int imm8` (0xcd 0x01 or 0xcd 0x03), but i'll at least laugh at that (probably).
2026-07-05add DisplayRules, docs, doc tests, ..iximeow
this includes `trait DisplayRules` as a generic mechanism to control parts of instruction printing, a `DefaultRules` for the existing formatting style, and `AbsoluteAddressFormatter` to print instructions as at some location in an address space.
2026-07-05add MASM-style formatting support in all modesiximeow
this includes a mildly nightmarish bit of test harness to compare against ml.exe/ml64.exe/dumpbin.exe, which in turn chased out a bunch of bugs. yay!