3 ms·
From the Github page: > Unfortunately, I made the decision to write nearly all of the gadgets in assembly language. This was probably a good decision with rega
by dfabulich 6y ago
From the Github page:
> Unfortunately, I made the decision to write nearly all of the gadgets in assembly language. This was probably a good decision with regards to performance (though I'll never know for sure), but a horrible decision with regards to readability, maintainability, and my sanity. The amount of bullshit I've had to put up with from the compiler/assembler/linker is insane. It's like there's a demon in there that makes sure my code is sufficiently deformed, and if not, makes up stupid reasons why it shouldn't compile. In order to stay sane while writing this code, I've had to ignore best practices in code structure and naming. You'll find macros and variables with such descriptive names as ss and s and a. Assembler macros nested beyond belief. And to top it off, there are almost no comments.
> So a warning: Long-term exposure to this code may cause loss of sanity, nightmares about GAS macros and linker errors, or any number of other debilitating side effects. This code is known to the State of California to cause cancer, birth defects, and reproductive harm.
M…maybe I'll hold off on that PR.
- Waterluvian 6y agoDoes this mean some person at Apple had to review the app... In assembly?
- snazz 6y agoI don't think that Apple usually reads an app's code as part of their review process. They might check out certain parts to see how pieces are implemented, but that's about it, as far as I understand.
- rhinoceraptor 6y agoFor any app, you give apple effectively a binary (really it's a sort of IR), not the source code.
- djxfade 6y agoNo, Apple don't have access to your sources, only the compiled binaries / ir, and symbols
- userbinator 6y agoGAS syntax is particularly annoying for actual human use, although I enjoy writing (x86) Asm otherwise.
- nneonneo 6y agoLine https://github.com/ish-app/ish/blob/master/jit/gadgets-aarch64/bits.S#L236 https://github.com/ish-app/ish/blob/master/jit/gadgets-aarch... and the subsequent lines sum it up nicely: # also hell {{{ .ifin(\op, bt) read_bullshit \size, \op\size\()_mem .endifin .ifin(\op, btc,bts,btr) write_bullshit \size, \op\size\()_mem .endifin # }}}