Re: [BUG] libffi needs to be rebuilt for i386

2014-10-13 Thread Marco Atzeri



On 10/13/2014 11:39 AM, Pavel Fedin wrote:

  Hello!
  I have found another problem, this time in libffi. Something appears to be
wrong with the binary, and on my system it failed to execute its DllMain. As
a result, it did not register its .eh_frame contents, and upon module unload
i got abort() in __deregister_frame_info_bases()
  I started to research it, but cygffi-6.dll contains no symbols. So, in


FYI
debug symbols are in libffi-debuginfo package


order to get a version with symbols, i rebuilt it from the source using up
to date gcc. The problem magically went away with the rebuilt binary.
Perhaps it was some obscure gcc/ld bug.
  Is it possible for the maintainer to update the binary ?

Kind regards,
Pavel Fedin


Regards
Marco



Re: [BUG] libffi needs to be rebuilt for i386

2014-10-13 Thread Pavel Fedin
Hello, Marco.

Monday, October 13, 2014, 13:56:57 you wrote:

 FYI
 debug symbols are in libffi-debuginfo package

 Thank you, i know this.
 Actually,  when  i  started my research, i noticed that DllMain() and
corresponding init code is not called for libffi. I started to examine
that.  I  don't  know  the  exact  mechanism  of how DllMain() becomes
so special, but i suggested that it might be up to symbol name. I used
objdump  -t  on libffi, and it displayed nothing. I became curious and
checked   some  other  libraries,  including  cygwin1.dll.  All  these
libraries  had  populated  symbol tables. I suggested that this may be
the   thing  that  goes  wrong,  rebuilt  the  libffi,  and  installed
instripped  version  (just  by copying the file). It perfectly worked,
the problem is gone.
 Just  for  curiosity i tried 'make install' which strips the symbols.
This  variant  also  worked  fine.  So, apparently, the root cause was
likely  some  bug  in  the linker which was used to build the original
package.

-- 
Kind regards,
 Pavel