Closed alfalcmar closed 10 months ago
Running code with UB sanitizer, I get reference binding to null pointer when I use NiceMock with a class that contains a reference member.
https://godbolt.org/z/87ccE1PT3
HEAD
Not sure what godbolt uses under the hood but I can reproduce it also in ubuntu
gcc 9.3
-std=c++14 -fsanitize=undefined -fno-sanitize-recover=undefined -O3
No response
I get the same error in GCC 8.4, 9.3, and 10.2. I get no error in GCC 8.5, 9.4, and 10.3. On that basis, I'm going to say this is likely a UBSAN bug that was fixed in several GCC patch releases.
Describe the issue
Running code with UB sanitizer, I get reference binding to null pointer when I use NiceMock with a class that contains a reference member.
Steps to reproduce the problem
https://godbolt.org/z/87ccE1PT3
What version of GoogleTest are you using?
HEAD
What operating system and version are you using?
Not sure what godbolt uses under the hood but I can reproduce it also in ubuntu
What compiler and version are you using?
gcc 9.3
What build system are you using?
-std=c++14 -fsanitize=undefined -fno-sanitize-recover=undefined -O3
Additional context
No response