summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2025-01-20 16:43:44 -0500
committerEli Schwartz <eschwartz93@gmail.com>2025-01-20 17:56:49 -0500
commit9a9abaf795ef9c701d74105a05b190be658dfd3f (patch)
tree0e1ea741a2df0523ae47d9d40758fff8f3bc29f7 /test cases
parent147a089eb54dabc0ae0cf9d81674665de3d5f0a1 (diff)
downloadmeson-9a9abaf795ef9c701d74105a05b190be658dfd3f.tar.gz
linkers: fix rpath padding calculation for non-ascii
rpaths are calculated in bytes, and that's also how depfixer processes them. We need to ensure that the ascii padding we use (bytes == unicode) is the correct offset for the install rpath - build rpath (both specified in unicode which then gets converted to bytes). In the event of a unicode install_rpath, we can get into a situation where the install rpath is longer than the padding, since we assumed that the install_rpath was shorter than it actually is -- because we counted the length in characters instead of the length in bytes. This then broke installation for people who e.g. install into a prefix inside their home directory, when their home directory contains multibyte unicode characters. Bug: https://gitlab.gnome.org/GNOME/gnome-builder/-/issues/2280
Diffstat (limited to 'test cases')
-rw-r--r--test cases/unit/10 build_rpath/meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/test cases/unit/10 build_rpath/meson.build b/test cases/unit/10 build_rpath/meson.build
index c0bc3bd27..f53c0f8bd 100644
--- a/test cases/unit/10 build_rpath/meson.build
+++ b/test cases/unit/10 build_rpath/meson.build
@@ -8,6 +8,12 @@ executable('prog', 'prog.c',
install : true,
)
+executable('multibyte_rpath', 'prog.c',
+ link_with: l,
+ install_rpath: get_option('prefix') / '⢖⢖⢖⢖⢖',
+ install: true
+ )
+
executable('progcxx', 'prog.cc',
link_with : l,
build_rpath : '/foo/bar',