Opened 7 years ago

Closed 7 years ago

#13436 closed bug (fixed)

runtime_loader can't handle SONAME longer than 32 chars

Reported by: korli Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: System/runtime_loader Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

One of the samba4 libraries is named "libsamba-cluster-support-samba4.so", which is 34 characters long. It is then cut at libsamba-cluster-support-samba4 when used in the image_t structure in the name field. The limit is ATM B_OS_NAME_LENGTH.

Resulting error:

runtime_loader: /boot/system/lib/libsmbconf.so.0: Version dependency "libsamba-cluster-support-samba4.so" not foundfree(0x00000070a174e7e0)
free(0x00000070a174e628)

Change History (4)

comment:1 by korli, 7 years ago

The proposed fix is to extend the name field to B_FILE_NAME_LENGTH. http://cgit.haiku-os.org/haiku/tree/headers/private/runtime_loader/runtime_loader.h#n91

comment:2 by axeld, 7 years ago

Looking at the runtime loader's heap implementation, it starts using 64 KB, and increases it's size by 32 KB. If you're interested in how much more memory that will take, the following shell command will compute a size of all runtime loader heaps in bytes (to run before and after on a freshly booted system):

$ listarea | grep "rld heap" | cut -c50-60 | grep -v "^$" | { echo ibase=16; paste -d+ -s; } | bc
Last edited 7 years ago by axeld (previous) (diff)

comment:3 by korli, 7 years ago

I tried and it varies between 6207000 and 6584000, same values with or without B_FILE_MAX_LENGTH.

comment:4 by korli, 7 years ago

Resolution: fixed
Status: newclosed

Increased to B_FILE_MAX_LENGTH in hrev51110.

Note: See TracTickets for help on using tickets.