curve25519-donna runtime math errors on armhf
On a rasppi3, run Ubuntu Core,
http://people.canonical.com/~mvo/all-snaps/16/all-snaps-pi2.img.xz
unxz, dd to card. boot. ubuntu/ubuntu username and password.
Install the tor-middle-relay snap, which was compiled with --enable-expensive-hardening and --enable-gcc-warnings: 'sudo snap install tor-middle-relay'
It will run, and emit to /var/log/syslog
src/ext/curve25519_donna/curve25519-donna.c:310:25: runtime error: left shift of negative value -54871 src/ext/curve25519_donna/curve25519-donna.c:300:23: runtime error: left shift of negative value -34426 src/ext/curve25519_donna/curve25519-donna.c:218:27: runtime error: left shift of negative value -1052007405335134 src/ext/curve25519_donna/curve25519-donna.c:219:27: runtime error: left shift of negative value -1052007405335134 src/ext/curve25519_donna/curve25519-donna.c:224:27: runtime error: left shift of negative value -3270924659300114 src/ext/curve25519_donna/curve25519-donna.c:225:27: runtime error: left shift of negative value -3270924659300114 src/ext/curve25519_donna/curve25519-donna.c:230:27: runtime error: left shift of negative value -1471294915178450 src/ext/curve25519_donna/curve25519-donna.c:231:27: runtime error: left shift of negative value -1471294915178450 src/ext/curve25519_donna/curve25519-donna.c:209:27: runtime error: left shift of negative value -829694144934512 src/ext/curve25519_donna/curve25519-donna.c:210:27: runtime error: left shift of negative value -829694144934512 src/ext/curve25519_donna/curve25519-donna.c:212:27: runtime error: left shift of negative value -2269747493562282 src/ext/curve25519_donna/curve25519-donna.c:213:27: runtime error: left shift of negative value -2269747493562282 src/ext/curve25519_donna/curve25519-donna.c:215:27: runtime error: left shift of negative value -2894814430932928 src/ext/curve25519_donna/curve25519-donna.c:216:27: runtime error: left shift of negative value -2894814430932928 src/ext/curve25519_donna/curve25519-donna.c:221:27: runtime error: left shift of negative value -3930039718593350 src/ext/curve25519_donna/curve25519-donna.c:222:27: runtime error: left shift of negative value -3930039718593350 src/ext/curve25519_donna/curve25519-donna.c:227:27: runtime error: left shift of negative value -7442567708082396 src/ext/curve25519_donna/curve25519-donna.c:228:27: runtime error: left shift of negative value -7442567708082396 src/ext/curve25519_donna/curve25519-donna.c:233:27: runtime error: left shift of negative value -1428303790038902 src/ext/curve25519_donna/curve25519-donna.c:234:27: runtime error: left shift of negative value -1428303790038902 src/ext/curve25519_donna/curve25519-donna.c:314:27: runtime error: left shift of negative value -79097269 src/ext/curve25519_donna/curve25519-donna.c:315:27: runtime error: left shift of negative value -79097269 src/ext/curve25519_donna/curve25519-donna.c:324:23: runtime error: left shift of negative value -22 src/ext/curve25519_donna/curve25519-donna.c:461:10: runtime error: left shift of negative value -21802520 src/ext/curve25519_donna/curve25519-donna.c:462:10: runtime error: left shift of 1352663040 by 8 places cannot be represented in type 'int' src/ext/curve25519_donna/curve25519-donna.c:463:10: runtime error: left shift of 1073741824 by 4 places cannot be represented in type 'int' src/ext/curve25519_donna/curve25519-donna.c:599:12: runtime error: left shift of 34457694 by 6 places cannot be represented in type 'int' src/ext/curve25519_donna/curve25519-donna.c:464:10: runtime error: left shift of negative value -2147483648 src/ext/curve25519_donna/curve25519-donna.c:465:10: runtime error: left shift of negative value -2147483648
which seems bad. It doesn't happen on amd64 snap.
Trac:
Username: chadmiller