On Mon, Jan 26, 2026 at 3:07 PM Marco Liebel <[email protected]>
wrote:

> On Sat, Jan 24, 2026 at 5:41 PM Taylor Simpson <[email protected]>
> wrote:
>
>> This patch would be alot smaller if you kept pkt as-is and added a new
>> member
>> Packet packet;
>>
>
> That would reduce the patch size, but it wouldn’t remove the risk of a
> dangling pointer
> and would introduce an alias instead. Is there a specific reason we need
> to keep the
> pointer around?
>

 There's a bunch of code throughout target/hexagon where a variable named
"pkt" is a pointer to a packet.  If you really want to get rid of the
pointer in DisasContext, do 2 things

   1. Name the field in DisasContext something else, e.g., packet.
   2. Don't eliminate the local "Packet *pkt" variables in various
   functions, e.g., gen_end_tb.

Then, it will be clear that "packet" is the actual struct and "pkt" is a
pointer.

Thanks,
Taylor

Reply via email to