1int foo() {
2 int data[4];
3 int x = *(int *)(((char *)&data[0]) + 2);
4 return 42;
5}
6
7int main() {
8 return 0; // breakpoint line
9}
10

Provided by KDAB

Privacy Policy
Update your C++ knowledge – Modern C++11/14/17 Training
Find out more

source code of lldb/test/API/functionalities/ubsan/user-expression/main.c