From: Gabor Dozsa Date: Mon, 4 Feb 2019 14:39:08 +0000 (+0000) Subject: cpu: Fix the type of the effective mem request size X-Git-Tag: v19.0.0.0~707 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a3ac8caba9dba103d61d4b75b1ea3f8061cfabf4;p=gem5.git cpu: Fix the type of the effective mem request size A memory request size can be larger than 255 bytes (e.g. SVE with 2048-bit vector length) which could cause overflow in the 'uint8_t effSize' variable. Change-Id: I77e0d02a49ea7f81cacfa5be7e4ae40434af3109 Reviewed-by: Giacomo Gabrielli Signed-off-by: Giacomo Gabrielli Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19175 Tested-by: kokoro Reviewed-by: Andreas Sandberg Reviewed-by: Jason Lowe-Power Maintainer: Andreas Sandberg --- diff --git a/src/cpu/base_dyn_inst.hh b/src/cpu/base_dyn_inst.hh index 6f9555a38..de76559fb 100644 --- a/src/cpu/base_dyn_inst.hh +++ b/src/cpu/base_dyn_inst.hh @@ -221,7 +221,7 @@ class BaseDynInst : public ExecContext, public RefCounted short asid; /** The size of the request */ - uint8_t effSize; + unsigned effSize; /** Pointer to the data for the memory access. */ uint8_t *memData;