While the value of your a* is undefined, I believe the behavior of this code is actually defined.
The Test function's real header is going to be generated as:
void Test(A* this);
Meaning - it's a simple C function that gets a struct's pointer as its first parameter.
Since your b object has an initialized a object in it (initialized randomly by whatever resides in the memory it points to), when you call for a->test() you will call the Test function correctly (with the same random as the value of "this"). Since you perform no use of the "this" pointer in Test, it will actually work as expected.