Bug#910923: $PLATFORM is no longer expanded.

2018-12-31 Thread Aurelien Jarno
On 2018-10-15 00:49, Roman Lebedev wrote:
> On Sun, Oct 14, 2018 at 10:51 PM Aurelien Jarno  wrote:
> >
> > control: severity -1 normal
> > control: retitle -1 libc6: broken support for curly braces DST
> >
> > On 2018-10-13 16:13, Roman Lebedev wrote:
> > > Source: glibc
> > > Version: 2.27-6
> > > Severity: important
> > >
> > > Reproduction:
> > > $ strace -ELD_PRELOAD='/sss/${PLATFORM}/'  -s300  /bin/cat
> > > execve("/bin/cat", ["/bin/cat"], 0x55ddc6b820f0 /* 64 vars */) = 0
> > > brk(NULL)   = 0x56046d9c1000
> > > access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or 
> > > directory)
> > > readlink("/proc/self/exe", "/bin/cat", 4096) = 8
> > > openat(AT_FDCWD, "/sss/x86_64/", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No 
> > > such file or directory)
> Hm actually wait, i think i'm confused here.
> Both the ${PLATFORM} and $PLATFORM seem to expand just fine.
> 
> $ strace -ELD_PRELOAD='/sss/${PLATFORM}/'  -s300  /bin/cat | grep PLATFORM
> ...
> openat(AT_FDCWD, "/sss/x86_64/", O_RDONLY|O_CLOEXEC) = -1 ENOENT
> (No such file or directory)
> writev(2, [{iov_base="ERROR: ld.so: object '", iov_len=22},
> {iov_base="/sss/${PLATFORM}/", iov_len=21}, {iov_base="' from ",
> iov_len=7}, {iov_base="LD_PRELOAD", iov_len=10}, {iov_base=" cannot be
> preloaded (", iov_len=22}, {iov_base="cannot open shared object file",
> iov_len=30}, {iov_base="): ignored.\n", iov_len=12}], 7ERROR: ld.so:
> object '/sss/${PLATFORM}/' from LD_PRELOAD cannot be preloaded
> (cannot open shared object file): ignored.
> ) = 124
> 
> $ strace -ELD_PRELOAD='/sss/$PLATFORM/'  -s300  /bin/cat | grep PLATFORM
> ...
> openat(AT_FDCWD, "/sss/x86_64/", O_RDONLY|O_CLOEXEC) = -1 ENOENT
> (No such file or directory)
> writev(2, [{iov_base="ERROR: ld.so: object '", iov_len=22},
> {iov_base="/sss/$PLATFORM/", iov_len=19}, {iov_base="' from ",
> iov_len=7}, {iov_base="LD_PRELOAD", iov_len=10}, {iov_base=" cannot be
> preloaded (", iov_len=22}, {iov_base="cannot open shared object file",
> io
> v_len=30}, {iov_base="): ignored.\n", iov_len=12}], 7ERROR: ld.so:
> object '/sss/$PLATFORM/' from LD_PRELOAD cannot be preloaded
> (cannot open shared object file): ignored.
> ) = 122
> 
> It clearly expanded PLATFORM to x86_64 in both cases, do you agree?
> 
> So whatever i'm seeing is something else, might be caused by docker.
> 

I agree that both are correctly expanded. I also looked again calmly on
my system, and I confirm that both are expanded. So it looks like there
is no bug there.

Aurelien

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net



Bug#910923: $PLATFORM is no longer expanded.

2018-10-14 Thread Roman Lebedev
On Sun, Oct 14, 2018 at 10:51 PM Aurelien Jarno  wrote:
>
> control: severity -1 normal
> control: retitle -1 libc6: broken support for curly braces DST
>
> On 2018-10-13 16:13, Roman Lebedev wrote:
> > Source: glibc
> > Version: 2.27-6
> > Severity: important
> >
> > Reproduction:
> > $ strace -ELD_PRELOAD='/sss/${PLATFORM}/'  -s300  /bin/cat
> > execve("/bin/cat", ["/bin/cat"], 0x55ddc6b820f0 /* 64 vars */) = 0
> > brk(NULL)   = 0x56046d9c1000
> > access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or 
> > directory)
> > readlink("/proc/self/exe", "/bin/cat", 4096) = 8
> > openat(AT_FDCWD, "/sss/x86_64/", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No 
> > such file or directory)
Hm actually wait, i think i'm confused here.
Both the ${PLATFORM} and $PLATFORM seem to expand just fine.

$ strace -ELD_PRELOAD='/sss/${PLATFORM}/'  -s300  /bin/cat | grep PLATFORM
...
openat(AT_FDCWD, "/sss/x86_64/", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
writev(2, [{iov_base="ERROR: ld.so: object '", iov_len=22},
{iov_base="/sss/${PLATFORM}/", iov_len=21}, {iov_base="' from ",
iov_len=7}, {iov_base="LD_PRELOAD", iov_len=10}, {iov_base=" cannot be
preloaded (", iov_len=22}, {iov_base="cannot open shared object file",
iov_len=30}, {iov_base="): ignored.\n", iov_len=12}], 7ERROR: ld.so:
object '/sss/${PLATFORM}/' from LD_PRELOAD cannot be preloaded
(cannot open shared object file): ignored.
) = 124

$ strace -ELD_PRELOAD='/sss/$PLATFORM/'  -s300  /bin/cat | grep PLATFORM
...
openat(AT_FDCWD, "/sss/x86_64/", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
writev(2, [{iov_base="ERROR: ld.so: object '", iov_len=22},
{iov_base="/sss/$PLATFORM/", iov_len=19}, {iov_base="' from ",
iov_len=7}, {iov_base="LD_PRELOAD", iov_len=10}, {iov_base=" cannot be
preloaded (", iov_len=22}, {iov_base="cannot open shared object file",
io
v_len=30}, {iov_base="): ignored.\n", iov_len=12}], 7ERROR: ld.so:
object '/sss/$PLATFORM/' from LD_PRELOAD cannot be preloaded
(cannot open shared object file): ignored.
) = 122

It clearly expanded PLATFORM to x86_64 in both cases, do you agree?

So whatever i'm seeing is something else, might be caused by docker.

Roman.

> > writev(2, [{iov_base="ERROR: ld.so: object '", iov_len=22}, 
> > {iov_base="/sss/${PLATFORM}/", iov_len=21}, {iov_base="' from ", 
> > iov_len=7}, {iov_base="LD_PRELOAD", iov_len=10}, {iov_base=" cannot be 
> > preloaded (", iov_len=22}, {iov_base="cannot open shared object file", 
> > iov_len=30}, {iov_base="): ignored.\n", iov_len=12}], 7ERROR: ld.so: object 
> > '/sss/${PLATFORM}/' from LD_PRELOAD cannot be preloaded (cannot open 
> > shared object file): ignored.
> > ) = 124
> >
> > So $PLATFORM is not expanded. This is a regression from 2.24
>
> Actually ${PLATFORM} is not expanded. If you try with $PLATFORM you will
> see it is correctly expanded.
>
> > According to
> > https://sourceware.org/bugzilla/show_bug.cgi?id=22299
> > it *should* be fixed in 2.27, but it is clerly still reproducible in
> > debian testing/sid.
>
> This is a different bug, as shown above the problem is that support for
> curly braces does not work anymore.
>
> > This is causing the following problem for me:
> > https://community.sonarsource.com/t/sonarqube-c-ubuntu-build-wrapper-ld-preload-error/300/2
>
> The workaround is to use $PLATFORM instead of ${PLATFORM}.
>
> Aurelien
>
> --
> Aurelien Jarno  GPG: 4096R/1DDD8C9B
> aurel...@aurel32.net http://www.aurel32.net



Bug#910923: $PLATFORM is no longer expanded.

2018-10-14 Thread Aurelien Jarno
control: severity -1 normal
control: retitle -1 libc6: broken support for curly braces DST

On 2018-10-13 16:13, Roman Lebedev wrote:
> Source: glibc
> Version: 2.27-6
> Severity: important
> 
> Reproduction:
> $ strace -ELD_PRELOAD='/sss/${PLATFORM}/'  -s300  /bin/cat
> execve("/bin/cat", ["/bin/cat"], 0x55ddc6b820f0 /* 64 vars */) = 0
> brk(NULL)   = 0x56046d9c1000
> access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or 
> directory)
> readlink("/proc/self/exe", "/bin/cat", 4096) = 8
> openat(AT_FDCWD, "/sss/x86_64/", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such 
> file or directory)
> writev(2, [{iov_base="ERROR: ld.so: object '", iov_len=22}, 
> {iov_base="/sss/${PLATFORM}/", iov_len=21}, {iov_base="' from ", 
> iov_len=7}, {iov_base="LD_PRELOAD", iov_len=10}, {iov_base=" cannot be 
> preloaded (", iov_len=22}, {iov_base="cannot open shared object file", 
> iov_len=30}, {iov_base="): ignored.\n", iov_len=12}], 7ERROR: ld.so: object 
> '/sss/${PLATFORM}/' from LD_PRELOAD cannot be preloaded (cannot open 
> shared object file): ignored.
> ) = 124
> 
> So $PLATFORM is not expanded. This is a regression from 2.24

Actually ${PLATFORM} is not expanded. If you try with $PLATFORM you will
see it is correctly expanded.

> According to
> https://sourceware.org/bugzilla/show_bug.cgi?id=22299
> it *should* be fixed in 2.27, but it is clerly still reproducible in
> debian testing/sid.

This is a different bug, as shown above the problem is that support for
curly braces does not work anymore.

> This is causing the following problem for me:
> https://community.sonarsource.com/t/sonarqube-c-ubuntu-build-wrapper-ld-preload-error/300/2

The workaround is to use $PLATFORM instead of ${PLATFORM}.

Aurelien

-- 
Aurelien Jarno  GPG: 4096R/1DDD8C9B
aurel...@aurel32.net http://www.aurel32.net


signature.asc
Description: PGP signature


Bug#910923: $PLATFORM is no longer expanded.

2018-10-13 Thread Roman Lebedev
Source: glibc
Version: 2.27-6
Severity: important

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Reproduction:
$ strace -ELD_PRELOAD='/sss/${PLATFORM}/'  -s300  /bin/cat
execve("/bin/cat", ["/bin/cat"], 0x55ddc6b820f0 /* 64 vars */) = 0
brk(NULL)   = 0x56046d9c1000
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
readlink("/proc/self/exe", "/bin/cat", 4096) = 8
openat(AT_FDCWD, "/sss/x86_64/", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such 
file or directory)
writev(2, [{iov_base="ERROR: ld.so: object '", iov_len=22}, 
{iov_base="/sss/${PLATFORM}/", iov_len=21}, {iov_base="' from ", 
iov_len=7}, {iov_base="LD_PRELOAD", iov_len=10}, {iov_base=" cannot be 
preloaded (", iov_len=22}, {iov_base="cannot open shared object file", 
iov_len=30}, {iov_base="): ignored.\n", iov_len=12}], 7ERROR: ld.so: object 
'/sss/${PLATFORM}/' from LD_PRELOAD cannot be preloaded (cannot open shared 
object file): ignored.
) = 124

So $PLATFORM is not expanded. This is a regression from 2.24
According to
https://sourceware.org/bugzilla/show_bug.cgi?id=22299
it *should* be fixed in 2.27, but it is clerly still reproducible in
debian testing/sid.

This is causing the following problem for me:
https://community.sonarsource.com/t/sonarqube-c-ubuntu-build-wrapper-ld-preload-error/300/2

Roman.

- -- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'unstable-debug'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.18.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEjkF6151RK40WXe2HCDw+u0oWieAFAlvB74kACgkQCDw+u0oW
ieC64A/+NJUBom7TnJ2IDVydGFTAtoEpBU/ShodqYPuZ/Yh020UHL/xQ6Y/XEeGk
/hjR0VadQFxJlIQcCygUVb10+q1JslT2FMWAtL4nyfD3FhSHjzBgzKthqbd0Gj4X
9SY4eZ6J85zUv+V505sAu550oUgGI9HQmxsVPa4yZqkAvL5Q6bZTW6w8vKZUH7ix
yaInTC7KXT9n0GCyoGiiLoW3hmH0JYcw99Emt26HaTyHCbMiMMZlPYxAp5UnxAFF
1VTZp69rYxePLQvuCi+wv452WVSdA8xeN6LO1uxvpkHuHefNj2v6XGmzmLEE8LWU
zTMFyyNu29bX7YYKNVLLUA3gPz9hqgTysEK3tLotLho0gTwYUt//RBiJD8/XktHP
pC0TDVbhMO/gqfsSLWLwHx5OOMXv+Xif5Z5OyQS/RI7O2deF2lsBDXGFmghUPGh2
nsZ/gTqdK/37UvtL4UgnSg5AOd4+VE6rI6XuLUrbbGsJ/OBDTj+HbriaSgStDo/k
O82reGp8M/33iyR0UN5YjqBgcVL27KtcJdDZKUmnQFcVfkbE3iFp44EMSOY0180A
QTZXYw4xA2yTdrq7JdfQqAws6f3X+e4S9JHoWIp5rRqpjRlH9HLwWzQ/+j9cR32U
eAvtOowmWRSoQbRO5muoGd96aRGeqcLwHHv4GYLBqR/Xziu6NFE=
=8rcH
-END PGP SIGNATURE-