From: Tony Gutierrez Date: Mon, 21 Nov 2016 20:38:30 +0000 (-0500) Subject: gpu-compute: init valid field of GpuTlbEntry in default ctor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a0d4019abda8b39285deaf2f8f262b7682ece4de;p=gem5.git gpu-compute: init valid field of GpuTlbEntry in default ctor valid field for GpuTlbEntry is not set in the default ctor, which can lead to strange behavior, and is also flagged by UBSAN. --- diff --git a/src/gpu-compute/gpu_tlb.hh b/src/gpu-compute/gpu_tlb.hh index 9c1a7b326..7a7485c48 100644 --- a/src/gpu-compute/gpu_tlb.hh +++ b/src/gpu-compute/gpu_tlb.hh @@ -68,7 +68,7 @@ namespace X86ISA GpuTlbEntry(Addr asn, Addr _vaddr, Addr _paddr, bool _valid) : TlbEntry(asn, _vaddr, _paddr, false, false), valid(_valid) { } - GpuTlbEntry() : TlbEntry() { } + GpuTlbEntry() : TlbEntry(), valid(false) { } bool valid; };