powerpc segfault on exponential of negative in python
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-images |
Invalid
|
Undecided
|
Unassigned | ||
python3-defaults (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
qemu (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
When calculating the exponential of a negative number in python 3.6 with the Ubuntu 18.04 Docker image (ppcle64), I receive a segfault.
```
python3 -c "import math; math.exp(-1)"
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
```
I am running this in Docker on macOS. Here are the steps to reproduce the error.
```
docker run --rm -it --platform linux/ppc64le ubuntu:18.04
apt-get update -qq && apt-get install -y -qq python3
python3 -c "import math; print(math.exp(0))" # 1.0
python3 -c "import math; print(math.
python3 -c "import math; print(math.exp(1))" # 2.718281828459045
python3 -c "import math; print(math.
```
This error does not happen when using the debian:10 or alpine images.
Here is the output of docker version on my machine:
```
Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:21:11 2020
OS/Arch: darwin/amd64
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:29:16 2020
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: v1.2.13
GitCommit: 7ad184331fa3e55
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef
docker-init:
Version: 0.18.0
GitCommit: fec3683
```
Cross-posted to StackOverflow: https:/
information type: | Public → Public Security |
information type: | Public Security → Public |
description: | updated |
Hi,
I tested this on a real ppc64le machine:
root@1325f59858 61:/# python3 -c "import math; print(math. exp(-1) )" 61:/# uname -a 02004031128- Ubuntu SMP Fri Apr 3 18:38:30 UTC 202 ppc64le ppc64le ppc64le GNU/Linux
0.36787944117144233
root@1325f59858
Linux 1325f5985861 5.4.0-21-generic #25+lp1866909v2
It looks like it's a qemu bug.