Closed fligger closed 1 year ago
Please revert the formatting changes done to the dissassembler and I will merge. Thanks for finding and fixing these!
Hope I reverted as expected.
Just to be clear: The curly braces are needed to avoid the following error: (output paths are stripped)
[build] ZydisDisassembler.cpp:105:1: error: jump to label ‘exit’
[build] 105 | exit:
[build] | ^~~~
[build] ZydisDisassembler.cpp:53:22: note: from here
[build] 53 | goto exit;
[build] | ^~~~
[build] ZydisDisassembler.cpp:58:14: note: crosses initialization of ‘bool endHit’
[build] 58 | bool endHit = false;
[build] | ^~~~~~
[build] ZydisDisassembler.cpp:57:18: note: crosses initialization of ‘uint64_t offset’
[build] 57 | uint64_t offset = 0;
[build] | ^~~~~~
This of course can also be fixed by replacing goto exit;
with delete[] buf; \n return insVec;
(removing the goto command completely.)
Ah, that makes sense, I like duplicating the exit actually
Removes missplaced source path which breaks cmake build in CMakeLists.txt.
"attribute((always_inline))" needs an additional "inline" to build correctly.
gcc does not like the goto statement without the curly brackets.
With these changes polyhook should build fine on linux.