Opened 10 years ago

Closed 10 years ago

#43 closed defect (fixed)

bus error on 64-bit install_name_tool

Reported by: Jim Ursetto Owned by:
Priority: minor Milestone:
Component: build system Version:
Keywords: Cc:
Estimated difficulty:

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

Attachments (1)

osx-64-install-name-tool.diff.txt (394 bytes) - added by Jim Ursetto 10 years ago.
128 bytes minimum padding

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by Jim Ursetto

128 bytes minimum padding

comment:1 Changed 10 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

Applied in r15017 - thanks, zb.

Note: See TracTickets for help on using tickets.