On 19 Feb 2017, at 23:28, André Hentschel nerv@dawncrow.de wrote:
I can reproduce the bug with the instructions above Linux Mint 18.1, gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4), binutils 2.26.1, flex 2.6, biso 3.0.4 the first bad value is at offset 269h Which is datatype2 from MSFT_TypeInfoBase
So initializing datatype2 in add_typedef_typeinfo or the following patch fixes the problem for me:
diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c index 137bb2d..7904e45 100644 --- a/tools/widl/write_msft.c +++ b/tools/widl/write_msft.c @@ -798,6 +798,7 @@ static int encode_type( if (!alignment) alignment = &scratch; if (!decoded_size) decoded_size = &scratch;
*decoded_size = 0;
switch (vt) { case VT_I1:
This looks good to me, please send this in - the size in datatype2 should apparently be zero unless the type is complex.
Thanks for tracking this down.
Huw.