Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testsuite fails on arm{el,hf} and ppc64el #61

Closed
mehdid opened this issue Sep 1, 2018 · 2 comments
Closed

testsuite fails on arm{el,hf} and ppc64el #61

mehdid opened this issue Sep 1, 2018 · 2 comments

Comments

@mehdid
Copy link

mehdid commented Sep 1, 2018

This bug is forwarded from Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907431

The testsuite of cppo fails on arm{el,hf} and ppc64el in the same location:

https://buildd.debian.org/status/fetch.php?pkg=cppo&arch=ppc64el&ver=1.6.4-1&stamp=1533482737&raw=0
https://buildd.debian.org/status/fetch.php?pkg=cppo&arch=armhf&ver=1.6.4-1&stamp=1533483827&raw=0
https://buildd.debian.org/status/fetch.php?pkg=cppo&arch=armel&ver=1.6.4-1&stamp=1533484809&raw=0

dh_auto_test -a
make -j4 test
make[1]: Entering directory '/<>'
cppo alias test/runtest (exit 1)
(cd _build/default/test && ../../install/default/bin/cppo test.cppo) > /dev/null
Error: File "test.cppo", line 98, characters 0-20
Error: math error
make[1]: *** [Makefile:5: test] Error 1
make[1]: Leaving directory '/<>'
dh_auto_test: make -j4 test returned exit code 2
make: *** [debian/rules:18: build-arch] Error 2

@pirbo
Copy link
Contributor

pirbo commented Sep 9, 2018

The culprit is the test -1 asr 100 = -1. It reveals 2 problems:
An obvious mistake line 255 of src/cppo_parser.mly where:

  | aexpr ASR aexpr          { `Lsr ($1, $3) }

should be

  | aexpr ASR aexpr          { `Asr ($1, $3) }

and a potentially dangerous behaviour lines 224 - 252 of src/cppo_eval.ml:
The code ensures that -64L <= shift <= 64L but the OCaml documentation says [...] The result is unspecified if y < 0 or y >= 64 so you might want to ensure 0L <= shift < 64L...

mjambon added a commit that referenced this issue Sep 12, 2018
Fix #61 caused by a typo in the parser
@mjambon
Copy link
Member

mjambon commented Sep 12, 2018

Thanks @mehdid and @pirbo. 1.6.5 was released. The opam release is in progress (ocaml/opam-repository#12606).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants