GJDuck / e9patch

A powerful static binary rewriting tool
GNU General Public License v3.0
986 stars 67 forks source link

Assertion error on page_offset #59

Closed liangjs closed 2 years ago

liangjs commented 2 years ago
$ ./e9tool -M 'asm=/xor.*/' -P print ./ls
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
+MM+MMMMMMMMMMMM+M+MMMMMMM+MMMMM+M+MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM++MMMMMMMMMMMMMMMMMMMMM+MMMMMMMMMMMMMMMMMMMMMMMMMMM+MMM+MMMMMMMM+MMMMMMMMMMMMMMMMMMMMMMMMM+MMMMMMM++MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM+MMMMMMMM+MMMMMMMMMMMMMMMMMMMM+MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM+MMMMM+MMM+M+MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM+MMMMMMMMMMMMMM+MMMMMMMMMMMMMMMMMMMMMMMMM++MMMMMMMMMMMMMMMMMMMMMMMM+MM+MMMMMMMM+MMMMMMMMMMMMMMMMMMMMMM+MMMMMMMMMMMMMMMMMMMM+MM+MMMMMMMMM+MMMMMMMMMMMMMMMMMMMMM+MM+MMMMMMMMMMMMMMM
[3C0F0001F001FE001F1E01F00FC001E0][000000003E000F00000001E00F000000][07807BDF03C1FE1E0F3F878EEE7C0F1E][79F7FDFFFFF9FF1E9F7BDE7BDE0F7E78][001E01E03C1E3807800007800783FFF8][39EEFB83FFF83E0FC7BBE3DFFFFF1EEE][FCE00E703FF9EF03FFFFFFFFFFFDFF7C][EFE007001E3C3F0F0FF3C01FFFF7F038][1FDFE3F8007F9E78FFC00079E70001F0][FCFFEF7FBFCFFE79E3F9F1FC7BFFFF7D][BE1FFC3FE3BFFE77FBBFFC7F8FF3F9F3][E7803C0FFFE1E77FE0F07FBDE39FEF01][DFBC07FF83C0F7BC3C3C783BDFFFF1F7][FFF7FBE7FFFBFFBDF1EF3CFFFF9FFDFE][783CFFBFFEFBFFBEF1FBDEFF781FE7CF][1E00038001E07DC0F80007C01E000000][B801E01E07C03FC00787C0F81E00781F][0F3E0F3DE07CFFC00F001C39F7C78F1C][3800000F380003E0000000F7FC038000][783E1FFE1FF83FE0F0FFF3E79E0F3BCF][FFC3BC03E3CF8FF87BFBC0F1FCF83FFF][F83E01EE071FFFF88F1C783F7C79F9EF][DE1FC1E001FF7FFCF1C1FF81FC1FFEF3][FC7E07000FFE1FC1FFFFC001F80E03FF][BFE38F071E7FBEF1FFFDC007DE7800FF][FFFE01E000FEF7F9C3C0003FFE1F01FF][FE0FF1EF1FF3BFF9FF8FFCFFFFEFBFFF][38FF80E07E0F3FCEFF0F801FF81E07F8][001C0FF1E780F3DE1E7800F01F7E00E0][87F803C00F07FDFE7DF0F0000E078F3F][7BC000F1F81F7FFE07C00000F83C00F0][000707801E70FBE7038000E0381F80FF][0F3E7CFFFFFFFFFB70FFF1FFFFFF1FFC][E7DE0007C07BE3FF07F80000FFE071FE][00000007FFFFFBDF0FF800003C1DC0F0][1E7E00E1EF387FFF3E00E0003F0001E0]
e9patch: src/e9patch/e9elf.cpp:301: size_t emitRefactoredPatch(const uint8_t*, uint8_t*, size_t, size_t, const InstrSet&, RefactorSet&): Assertion `page_offset == offset' failed.
error  : backend process (54719) killed by signal (Aborted)

This only appears when e9path is built with make tool.debug debug.

GJDuck commented 2 years ago

Hi, which version of ls is this? Can you also provide the file hash?

GJDuck commented 2 years ago

Nevermind, I can reproduce it on Ubuntu 22.04. I will work on a fix.