Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Machine code
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Overlapping instructions== <!-- This section header is used in incoming redirects --> On processor architectures with [[variable-length instruction set]]s<ref name="Jacob-Jakubowski-Venkatesan_2007"/> (such as [[Intel]]'s [[x86]] processor family) it is, within the limits of the control-flow [[self-synchronizing code|resynchronizing]] phenomenon known as the [[Kruskal count]],<ref name="Lagarias-Rains-Vanderbei_2001"/><ref name="Jacob-Jakubowski-Venkatesan_2007"/><ref name="Andriesse-Bos_2014"/><ref name="Jakubowski_2016"/><ref name="Jämthagen_2016"/> sometimes possible through opcode-level programming to deliberately arrange the resulting code so that two code paths share a common fragment of opcode sequences.<ref group="nb" name="NB_Merging_or_branching"/> These are called ''overlapping instructions'', ''overlapping opcodes'', ''overlapping code'', ''overlapped code'', ''instruction scission'', or ''jump into the middle of an instruction''.<ref name="HN_2021"/><ref name="Kinder_2010"/><ref name="RE_2013"/> In the 1970s and 1980s, overlapping instructions were sometimes used to preserve memory space. One example were in the implementation of error tables in [[Microsoft]]'s [[Altair BASIC]], where ''interleaved instructions'' mutually shared their instruction bytes.<ref name="Gates"/><ref name="Jacob-Jakubowski-Venkatesan_2007"/><ref name="HN_2021"/> The technique is rarely used today, but might still be necessary to resort to in areas where extreme optimization for size is necessary on byte-level such as in the implementation of [[boot loader]]s which have to fit into [[boot sector]]s.<ref group="nb" name="NB_DR-DOS_707"/> It is also sometimes used as a [[code obfuscation]] technique as a measure against [[disassembly]] and tampering.<ref name="Jacob-Jakubowski-Venkatesan_2007"/><ref name="Jakubowski_2016"/> The principle is also used in shared code sequences of [[fat binaries]] which must run on multiple instruction-set-incompatible processor platforms.<ref group="nb" name="NB_Merging_or_branching"/> This property is also used to find [[unintended instruction]]s called [[gadget (machine instruction sequence)|gadget]]s in existing code repositories and is used in [[return-oriented programming]] as alternative to [[code injection]] for exploits such as [[return-to-libc attack]]s.<ref name="Shacham_2007"/><ref name="Jacob-Jakubowski-Venkatesan_2007"/>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Machine code
(section)
Add topic