igorkudrin wrote:
Here is one possible manifestation of the problem, on an Arm32 Linux system:
```
$ cat test.cpp
class A {
public:
A(int v) : value_a(v) {}
virtual ~A() {}
private:
int value_a;
};
class X {
public:
X(int v) : value_x(v) {}
private:
int value_x;
};
class B : public X, public virtual A {
public:
B(int va, int vb, int vx) : X(vx), A(va), value_b(vb) {}
virtual ~B() {}
private:
int value_b;
};
void test(A *p, char *boom) {
*boom = 43;
}
int main() {
B b(5, 7, 9);
test(&b, 0);
}
$ g++ test.cpp -o test -g -O0
$ ./test
Segmentation fault (core dumped)
$ lldb -c core
(lldb) var p -T -P1
(B *) p = 0xffe57164 {
(X) X = {
(int) value_x = <read memory from 0x1ffe57168 failed (0 of 4 bytes read)>
}
(A) A = {
(int) value_a = <read memory from 0x1ffe57174 failed (0 of 4 bytes read)>
}
(int) value_b = <read memory from 0x1ffe5716c failed (0 of 4 bytes read)>
}
```
https://github.com/llvm/llvm-project/pull/169150
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits