Bug#930808: marked as done (libc6: ${PLATFORM} is expanded as haswell instead of x86_64)

2019-06-21 Thread Debian Bug Tracking System
Your message dated Sat, 22 Jun 2019 01:32:36 +0200
with message-id 

and subject line Re: Bug#930808: libc6: ${PLATFORM} is expanded as haswell 
instead of x86_64
has caused the Debian Bug report #930808,
regarding libc6: ${PLATFORM} is expanded as haswell instead of x86_64
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
930808: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930808
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: libc6
Version: 2.28-10
Severity: important

Dear Maintainer,

It seems ${PLATFORM} is wrongly expanded on x86_64 architectures with
libc6 2.28. This leads to troubles while referencing libraries.

This doesn't seem related to the usage of curly braces.

You can find the reproductions steps below:

$ arch
x86_64

$ strace -ELD_PRELOAD='/sss/$PLATFORM/'  -s300  /bin/cat
execve("/bin/cat", ["/bin/cat"], 0x5607e51d5490 /* 62 vars */) = 0
brk(NULL)   = 0x560cc39d5000
readlink("/proc/self/exe", "/bin/cat", 4096) = 8
openat(AT_FDCWD, "/sss/haswell/", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such 
file or directory)

$ strace -ELD_PRELOAD='/sss/${PLATFORM}/'  -s300  /bin/cat
execve("/bin/cat", ["/bin/cat"], 0x563dc5b51490 /* 62 vars */) = 0
brk(NULL)   = 0x55f8d420d000
readlink("/proc/self/exe", "/bin/cat", 4096) = 8
openat(AT_FDCWD, "/sss/haswell/", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such 
file or directory)

Feel free to ask me any additionnal information.

Best regards,

-- System Information:
Debian Release: 10.0
  APT prefers testing
  APT policy: (900, 'testing'), (1, 'experimental'), (1, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libc6 depends on:
ii  libgcc1  1:8.3.0-6

Versions of packages libc6 recommends:
ii  libidn2-0  2.0.5-1

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0]  1.5.71
pn  glibc-doc  
ii  libc-l10n  2.28-10
ii  locales2.28-10

-- debconf information:
  glibc/disable-screensaver:
  glibc/kernel-too-old:
  glibc/restart-failed:
  glibc/upgrade: true
* libraries/restart-without-asking: false
  glibc/kernel-not-supported:
* glibc/restart-services: cups cron
--- End Message ---
--- Begin Message ---
Package: libc6
Version: 2.28-10

Thanks for your thorough explanation.

After reading more the documentation regarding the $PLATFORM token I
fully agree with you. There is no bug here.
I'll head up to the writers of the library to fix the problem there.
Thanks a lot for your time and precious feedback.

-- 
Vincent Hobeïka--- End Message ---


Bug#930808: libc6: ${PLATFORM} is expanded as haswell instead of x86_64

2019-06-21 Thread Aurelien Jarno
On 2019-06-21 02:04, Vincent Hobeïka wrote:
> Package: libc6
> Version: 2.28-10
> Severity: important
> 
> Dear Maintainer,
> 
> It seems ${PLATFORM} is wrongly expanded on x86_64 architectures with
> libc6 2.28.

I confirm that ${PLATFORM} is expanded to "haswell" if you have an
Haswell CPU. But I disagree that this is a wrong behaviour.

The ${PLATFORM} values has been designed to provide CPU specific
optimized libraries. There is no guarantee it matches the architecture.
The architecture name is only used when there is no more specific match.
For example on i386, it can be either i586 or i686 depending on your
CPU.

Here are a few examples of values that can be found on various
architectures:

mips: loongson2e, loongson2f, octeon, octeon2
s390x: g5, z900, z990, z9-109, z10, z196, zEC12, z13, z14
x86: i586, i686, haswell, xeon_phi

> This leads to troubles while referencing libraries.

The bug is probably in that libraries which wrongly use ${PLATFORM}

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