[DTrace-devel] [PATCH v3 06/19] alloca: add alloca() itself

Nick Alcock nick.alcock at oracle.com
Fri Apr 1 13:11:37 UTC 2022


On 31 Mar 2022, Kris Van Hees outgrape:

> On Wed, Mar 30, 2022 at 01:05:17PM -0400, Kris Van Hees via DTrace-devel wrote:
>> > +
>> > +	/* Loading.  */
>> > +
>> > +	emit(dlp,  BPF_LOAD(BPF_DW, mst, BPF_REG_FP, DT_STK_DCTX));
>> > +	emit(dlp,  BPF_LOAD(BPF_DW, mst, mst, DCTX_MST));
>> > +	emit(dlp,  BPF_LOAD(BPF_DW, scratchbot, BPF_REG_FP, DT_STK_DCTX));
>> > +	emit(dlp,  BPF_LOAD(BPF_DW, scratchbot, scratchbot, DCTX_SCRATCHMEM));
>> > +	emit(dlp,  BPF_LOAD(BPF_DW, dnp->dn_reg, mst, DMST_SCRATCH_NEXT));
>
> This is wrong.  The scratch_next member in dt_mstate_s uint32_t so this
> should be a BPF_W load.  Even with the change to only have scratch_top this
> needs to be a BPF_W load because that member is also uint32_t.

Nice catch! I fixed this everywhere else but failed to spot it there.



More information about the DTrace-devel mailing list