Community
cancel
Showing results for 
Search instead for 
Did you mean: 
patrick_bao
Beginner
79 Views

vtable pointer alignment

Hi,

I mix using intel amd64 compiler and Visual C++ 64bit compiler at object files level, some files are compiled using intel and some are compiled using vc and then linked together with intel.

I run into one problem that intel compiler add 8 bytes alignment to vfptr and vbptr in virtual inheritance case

0x000000000A83AE30 e8 ef aa 80 01 00 00 00 vfptr
0x000000000A83AE38 cd cd cd cd cd cd cd cd 8 bytes alignment
0x000000000A83AE40 60 e9 9a 80 01 00 00 00 vbptr
0x000000000A83AE48 cd cd cd cd cd cd cd cd 8 bytes alignment
0x000000000A83AE50 ff ff ff ff cd cd cd cd the first data member, -1, then 4 bytes alignment

but vc doesn't add those paddding after vfptr and vbptr pointer, this result a crash. I don't have this problem if I use intel or vc only.

Any ideas? I get the same issue on both intel 11.1.067 and 12.0

Thanks,
0 Kudos
1 Reply
Judith_W_Intel
Employee
79 Views


This sounds like a bug (we are supposed to be link compatible with Microsoft). Can you please post a test case that shows the problem/difference?

thanks
Judy
Reply