qemu-libafl-bridge icon indicating copy to clipboard operation
qemu-libafl-bridge copied to clipboard

[SYX] Use `qht` instead of `GHashTable`

Open enisrat opened this issue 9 months ago • 1 comments

I noticed that GHashTable is used in SYX cow cache and ram snapshot.

QEMU has qht (under qemu/qht.h), which is thread-safe (I think) and optimized for concurrent reads. Why not use that instead?

enisrat avatar Mar 19 '25 08:03 enisrat

we do not need a thread-safe hash table for ram snapshotting for our use case (at least it's not supported). each instance is intended to be run with one core. so for performance reasons we used the ghashtable. if we support multi-core instances in the future, it would make sense to switch to this though.

rmalmain avatar Mar 24 '25 17:03 rmalmain

Ok, thx. I did not know it is supposed to be strictly single-thread.

It should be possible with change as above to support multi-threading I think.

enisrat avatar Apr 05 '25 07:04 enisrat