Summary

bus error on 64-bit install_name_tool

Metadata

Attachments

Description

When changing a library name to one that is longer, and the .so file is too short, install_name_tool segfaults. This is rare and I can only reproduce it on a 64-bit build with one or two files. It may be a bug in the tools. The least intrusive change is to add a bit of minimum header padding on 64-bit systems. (Patch attached.) The chosen pad size of 128 is experimentally determined (32 is the minimum that works for me, and I added some fudge). It can be increased if required, at the cost of slightly bigger output files.

 make PLATFORM=macosx ARCH=x86-64 NURSERY=1048576 \
   CHICKEN=$HOME/local/chicken-4/bin/chicken \
   PREFIX=$HOME/local.64/chicken-4 install
 
 [...]
 install_name_tool -change libchicken.dylib /Users/jim/local.64/chicken-4/lib/libchicken.dylib /Users/jim/local.64/chicken-4/lib/chicken/4/foreign.import.so
 install_name_tool -change libchicken.dylib /Users/jim/local.64/chicken-4/lib/libchicken.dylib /Users/jim/local.64/chicken-4/lib/chicken/4/scheme.import.so
 install_name_tool -change libchicken.dylib /Users/jim/local.64/chicken-4/lib/libchicken.dylib /Users/jim/local.64/chicken-4/lib/chicken/4/csi.import.so
 make[1]: *** [install] Bus error

Changes and comments

[2009-06-17 23:04:57 UTC] zbigniew attached osx-64-install-name-tool.diff.txt (description=128 bytes minimum padding)

[2009-06-18 14:06:00 UTC] felix changed status from new to closed

[2009-06-18 14:06:00 UTC] felix set resolution to fixed

[2009-06-18 14:06:00 UTC] felix wrote:

Applied in r15017 - thanks, zb.