On 2/7/24 07:45, Richard Henderson wrote:
On 2/6/24 19:24, Pierrick Bouvier wrote:
--- a/accel/tcg/plugin-gen.c
+++ b/accel/tcg/plugin-gen.c
@@ -442,6 +442,13 @@ static TCGOp *append_inline_cb(const struct 
qemu_plugin_dyn_cb *cb,
       char *ptr = cb->userp;
       size_t elem_size = 0;
       size_t offset = 0;
+    if (!ptr) {
+        /* use inline entry */
+        ptr = cb->inline_insn.entry.score->data->data;

This value will not survive the first resize.
You need to add a pointer dereference from the first "data".


If you look at scoreboard patch, you'll notice tb are flushed when we resize, and thus, invalidate the pointer.

We discussed this with Alex previously, and he recommended to implement this, instead of adding another indirection.

By the way, this is what created the need to fix cpu_init hook call site, to be able to call start/end exclusive. Thus the related patches at the beginning of the series.


r~

Reply via email to