llvm-project
32fc625a - Reapply "Reapply "[clang][bytecode] Allocate IntegralAP and Floating … (#145014)

Commit
83 days ago
Reapply "Reapply "[clang][bytecode] Allocate IntegralAP and Floating … (#145014) …types usi… (#144676)" This reverts commit 68471d29eed2c49f9b439e505b3f24d387d54f97. IntegralAP contains a union: union { uint64_t *Memory = nullptr; uint64_t Val; }; On 64bit systems, both Memory and Val have the same size. However, on 32 bit system, Val is 64bit and Memory only 32bit. Which means the default initializer for Memory will only zero half of Val. We fixed this by zero-initializing Val explicitly in the IntegralAP(unsigned BitWidth) constructor. See also the discussion in https://github.com/llvm/llvm-project/pull/144246
Author
Parents
Loading