* Fix 64-bit enums for MSVC
As Windows has 32 bit ints (x86 or x64), enums in the Microsoft C compiler are only 32 bits. The PPC machine description uses 64 bit enum values, which won't work for MSVC. Replace them with #defines
* Add `ffs` implementation for Microsoft C/C++
* Remove GCC function attributes for non-GCC compilers
* Add macro to provide MSVC definition of strncasecmp
* Workaround MSVC pre-processor deficiencies
The MSVC preprocessor doesn't appear to like having a #if/#endif within a macro invocation. To placate it, surround two instances of the macro invocation (with appropriately different arguments!) with #if/#else/#endif
* Fix watchpoint leak in ARM
* Builds fuzz targets with sanitizer support
* Builds fuzz targets with directory driver
* Adds script to dowlonad public corpus
* Adds CIfuzz
To checks Pull Requests with fuzzing
* Use static library for fuzz targets
* Less verbose logs for fuzz driver directory
* fix finding python path which only has python3.
* fix#1246, arm host issue.
* skip assembler tests on non-x86 host.
* update macro of dummy value.
* fix MSVC macro.
* update dummy array value macro.
* restore to original qemu code.
* Handle the cpu context save in a more pythonic way, so the context can be serialized and reuse in an other process using the same emulator architecture and modes
* Fix type error ; mistakes a size_t uint64_t ; breaks in 32bit...
* Fix the UAF situation when deleting a hook while being in a hook callback. Added an attribute 'to_delete' to hooks, and a list hooks_to_del to delay the free of the hooks
* Minor fixes ; forgot return type of clear_deleted_hooks ; do not declare variable in for predicate
* x86: setup FS & GS base
* Fixed base register writes for x64, removed then for x16/x32 (the don't exist there?)
* FS reg comes before GS so the base regs do so, too
* added shebang to const_generator.py
* Added base regs to and added 'all' support to const_generator
Co-authored-by: naq <aquynh@gmail.com>
Ensure the TCG exit flag is cleared at the end of cpu_exec. This ensures
that subsequent calls are not polluted by the prior call to request an
early exit. The symptoms of the problem being addressed here are that
after a cpu_exit call triggered within a hook there may still be a
pending tcg_exit_req flag set. This then causes a block to start its
execution and then be aborted (from which point it'll continue because
there's no other condition to service). The start of the execution
causes the block hook to be called, no actual code to be run, and then
the block started again with another block hook call.
This change is discussed in ticket 1193:
https://github.com/unicorn-engine/unicorn/issues/1193