From a0d4019abda8b39285deaf2f8f262b7682ece4de Mon Sep 17 00:00:00 2001 From: Tony Gutierrez Date: Mon, 21 Nov 2016 15:38:30 -0500 Subject: [PATCH] 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. --- src/gpu-compute/gpu_tlb.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }; -- 2.30.2