intel / beignet

Beignet is an open source implementation of the OpenCL specification - a generic compute oriented API. Here is Beignet Source Code Mirror in github- This is a publish-only repository and all pull requests are ignored. Please follow https://wiki.freedesktop.org/www/Software/Beignet/ for any of your improvements
GNU Lesser General Public License v2.1
95 stars 40 forks source link

GBE: let GenRegister::reg() never return uninitialized memory #16

Closed michaellass closed 3 years ago

michaellass commented 4 years ago

GenRegister::reg() is called throughout the code, not only on virtual but also on physical registers. For the latter, value.reg is not initialized and therefore reg() returns uninitialized memory, leading to undefined behavior. Make sure to always return initialized memory by returning a valid ir::Register, even for physical registers.

Fixes https://gitlab.freedesktop.org/beignet/beignet/issues/12

michaellass commented 3 years ago

Closing since