public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/10253] New: RPATH $ORIGIN breaks if resulting path has colons in it
@ 2009-06-08 4:52 trick at icculus dot org
2009-06-08 4:53 ` [Bug libc/10253] " trick at icculus dot org
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: trick at icculus dot org @ 2009-06-08 4:52 UTC (permalink / raw)
To: glibc-bugs
As the summary says, RPATH with $ORIGIN breaks if the expansion of ORIGIN
results in a path with colons in it. More specifically, the path is broken up
at the colons.
For example, if an executable has RPATH set to $ORIGIN, requires a library
(libfoo.so) that is in the same directory as the exceutable, and both files
reside in eg /tmp/a, everything will work fine. However, if both files reside
in /tmp/a:b (and not in /tmp/a), the linker will be unable to find libfoo.so.
If the executable is in /tmp/a:b but libfoo.so exists in /tmp/a, the linker
will find /tmp/a/libfoo.so in stead of the one in the executable's directory.
I've tested this on Arch Linux 64-bit with glibc 2.10.1, and also on Gentoo
Linux 32-bit with glibc 2.4. The results are identical on both systems.
I'll attach a script that illustrates the bug.
--
Summary: RPATH $ORIGIN breaks if resulting path has colons in it
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: trick at icculus dot org
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=10253
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/10253] RPATH $ORIGIN breaks if resulting path has colons in it
2009-06-08 4:52 [Bug libc/10253] New: RPATH $ORIGIN breaks if resulting path has colons in it trick at icculus dot org
@ 2009-06-08 4:53 ` trick at icculus dot org
2010-01-23 21:53 ` they4kman at gmail dot com
2010-01-24 9:32 ` they4kman at gmail dot com
2 siblings, 0 replies; 5+ messages in thread
From: trick at icculus dot org @ 2009-06-08 4:53 UTC (permalink / raw)
To: glibc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3507 bytes --]
------- Additional Comments From trick at icculus dot org 2009-06-08 04:53 -------
Created an attachment (id=3987)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3987&action=view)
Script to reproduce bug
Run the attached script to reproduce. It'll create a new directory named
rpath-bug, enter it, and compile a small library named libfoo.so and an
executable with RPATH set to '$ORIGIN'. Then it'll copy the files around to a
couple subdirectories with or without colons, showing results of ldd etc.
Here's the output I get when running the script in /tmp:
=== /tmp/rpath-bug ===
* ls:
foo.c libfoo.so test test.c this this:breaks:rpath
* ./test:
* objdump -x test | grep RPATH:
RPATH $ORIGIN
* ldd test:
linux-vdso.so.1 => (0x00007fff3e1fe000)
libfoo.so => /tmp/rpath-bug/libfoo.so (0x00007fd535c83000)
libc.so.6 => /lib/libc.so.6 (0x00007fd53592e000)
/lib/ld-linux-x86-64.so.2 (0x00007fd535e84000)
=== /tmp/rpath-bug/this:breaks:rpath ===
* ls:
libfoo.so subdir test
* ./test:
./test: error while loading shared libraries: libfoo.so: cannot open shared
object file: No such file or directory
* objdump -x test | grep RPATH:
RPATH $ORIGIN
* ldd test:
linux-vdso.so.1 => (0x00007fffff7ff000)
libfoo.so => not found
libc.so.6 => /lib/libc.so.6 (0x00007f13f70ef000)
/lib/ld-linux-x86-64.so.2 (0x00007f13f7444000)
=== /tmp/rpath-bug/this:breaks:rpath/subdir ===
* ls:
libfoo.so test
* ./test:
./test: error while loading shared libraries: libfoo.so: cannot open shared
object file: No such file or directory
* objdump -x test | grep RPATH:
RPATH $ORIGIN
* ldd test:
linux-vdso.so.1 => (0x00007ffff23fe000)
libfoo.so => not found
libc.so.6 => /lib/libc.so.6 (0x00007ff9e9dbd000)
/lib/ld-linux-x86-64.so.2 (0x00007ff9ea112000)
* back to this:breaks:rpath
«libfoo.so» -> «breaks/libfoo.so»
=== /tmp/rpath-bug/this:breaks:rpath ===
* ls:
breaks libfoo.so subdir test
* ./test:
* objdump -x test | grep RPATH:
RPATH $ORIGIN
* ldd test:
linux-vdso.so.1 => (0x00007fffb91ff000)
libfoo.so => breaks/libfoo.so (0x00007fd3b0d5c000)
libc.so.6 => /lib/libc.so.6 (0x00007fd3b0a07000)
/lib/ld-linux-x86-64.so.2 (0x00007fd3b0f5d000)
«libfoo.so» -> «../this/libfoo.so»
=== /tmp/rpath-bug/this:breaks:rpath ===
* ls:
breaks libfoo.so subdir test
* ./test:
* objdump -x test | grep RPATH:
RPATH $ORIGIN
* ldd test:
linux-vdso.so.1 => (0x00007fff00bfe000)
libfoo.so => /tmp/rpath-bug/this/libfoo.so (0x00007f51f87d0000)
libc.so.6 => /lib/libc.so.6 (0x00007f51f847b000)
/lib/ld-linux-x86-64.so.2 (0x00007f51f89d1000)
=== /tmp/rpath-bug/this:breaks:rpath/subdir ===
* ls:
libfoo.so test
* ./test:
* objdump -x test | grep RPATH:
RPATH $ORIGIN
* ldd test:
linux-vdso.so.1 => (0x00007fffb11ff000)
libfoo.so => /tmp/rpath-bug/this/libfoo.so (0x00007f71a8c42000)
libc.so.6 => /lib/libc.so.6 (0x00007f71a88ed000)
/lib/ld-linux-x86-64.so.2 (0x00007f71a8e43000)
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10253
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/10253] RPATH $ORIGIN breaks if resulting path has colons in it
2009-06-08 4:52 [Bug libc/10253] New: RPATH $ORIGIN breaks if resulting path has colons in it trick at icculus dot org
2009-06-08 4:53 ` [Bug libc/10253] " trick at icculus dot org
@ 2010-01-23 21:53 ` they4kman at gmail dot com
2010-01-24 9:32 ` they4kman at gmail dot com
2 siblings, 0 replies; 5+ messages in thread
From: they4kman at gmail dot com @ 2010-01-23 21:53 UTC (permalink / raw)
To: glibc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |they4kman at gmail dot com
Severity|normal |critical
http://sourceware.org/bugzilla/show_bug.cgi?id=10253
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/10253] RPATH $ORIGIN breaks if resulting path has colons in it
2009-06-08 4:52 [Bug libc/10253] New: RPATH $ORIGIN breaks if resulting path has colons in it trick at icculus dot org
2009-06-08 4:53 ` [Bug libc/10253] " trick at icculus dot org
2010-01-23 21:53 ` they4kman at gmail dot com
@ 2010-01-24 9:32 ` they4kman at gmail dot com
2 siblings, 0 replies; 5+ messages in thread
From: they4kman at gmail dot com @ 2010-01-24 9:32 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From they4kman at gmail dot com 2010-01-24 09:29 -------
Created an attachment (id=4552)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4552&action=view)
quick fix
I've created a quick patch that solves the issue. I've tested it against the
git master.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10253
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/10253] RPATH $ORIGIN breaks if resulting path has colons in it
[not found] <bug-10253-131@http.sourceware.org/bugzilla/>
@ 2011-11-21 22:24 ` luto at mit dot edu
0 siblings, 0 replies; 5+ messages in thread
From: luto at mit dot edu @ 2011-11-21 22:24 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=10253
Andy Lutomirski <luto at mit dot edu> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |luto at mit dot edu
--- Comment #3 from Andy Lutomirski <luto at mit dot edu> 2011-11-21 22:22:07 UTC ---
Any chance of getting this fixed? I just triggered it in a production system
(oops!)
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-21 22:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-08 4:52 [Bug libc/10253] New: RPATH $ORIGIN breaks if resulting path has colons in it trick at icculus dot org
2009-06-08 4:53 ` [Bug libc/10253] " trick at icculus dot org
2010-01-23 21:53 ` they4kman at gmail dot com
2010-01-24 9:32 ` they4kman at gmail dot com
[not found] <bug-10253-131@http.sourceware.org/bugzilla/>
2011-11-21 22:24 ` luto at mit dot edu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).