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

t/pmc/bigint.t failures with an clang on optimized build on Ubuntu #744

Closed
leto opened this issue Mar 19, 2012 · 10 comments
Closed

t/pmc/bigint.t failures with an clang on optimized build on Ubuntu #744

leto opened this issue Mar 19, 2012 · 10 comments
Assignees
Labels

Comments

@leto
Copy link
Member

leto commented Mar 19, 2012

#   Failed test 'set overflow Integer'
#   at t/pmc/bignum.t line 1035.
# Exited with error code: 1
# Received:
# error:imcc:add_1_const:Integer overflow '9223372036854775808'
#   in file '/home/leto/git/parrot/t/pmc/bignum_35.pasm' line 10
# 
# Expected:
# ok
# 
$ git rev-parse HEAD
b714b9044d4d67b9377216e705043aa619df9a2c
$ uname -a
Linux datura 2.6.32-35-generic #78-Ubuntu SMP Tue Oct 11 16:11:24 UTC 2011 x86_64 GNU/Linux
@leto
Copy link
Member Author

leto commented Mar 19, 2012

$ clang --version
clang version 1.1 (branches/release_27)
Target: x86_64-pc-linux-gnu
Thread model: posix

@leto
Copy link
Member Author

leto commented Mar 23, 2012

My current hunch is that this is from some questionable casting. There are many casting warnings when compiling an optimized parrot with clang.

@Benabik
Copy link
Member

Benabik commented May 23, 2012

Also occurs for me on OS X with gcc 4.2.1

@leto
Copy link
Member Author

leto commented Dec 12, 2012

This no longer happens for me. @Benabik can you confirm that you are no longer seeing this?

@Benabik
Copy link
Member

Benabik commented Dec 12, 2012

#   Failed test 'set overflow Integer'
#   at t/pmc/bignum.t line 1035.
# error:imcc:add_1_const:Integer overflow '9223372036854775808'
#   in file '/Users/brian/dev/parrot/parrot/t/pmc/bignum_35.pasm' line 10

gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

@leto
Copy link
Member Author

leto commented Dec 12, 2012

@Benabik which versions of GMP does this happen on for you?

@rurban
Copy link
Member

rurban commented Dec 12, 2012

My libgmp: GMP 5.0.5
I cannot repro this on ubuntu with a clang 3.2

clang version 3.2 (trunk 167594)
Target: x86_64-unknown-linux-gnu
Thread model: posix

nor on darwin 10.8 with their clang:

$ clang --version
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.2.1
Thread model: posix

nor on darwin with their llvm-gcc (which looks similar to benabiks)

$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

nor with all my recent gcc's and clang's on darwin.
So it looks it's a libgmp problem.

@Benabik
Copy link
Member

Benabik commented Dec 12, 2012

@leto: 5.0.5 installed via homebrew, and --optimize=-O2 --debugging=0 given to configure.

@rurban rurban self-assigned this Mar 6, 2014
@rurban
Copy link
Member

rurban commented Mar 6, 2014

I can repro it now. travis also caught it. https://travis-ci.org/parrot/parrot/jobs/20232247

Fixed in branch smoke-me/clang-inc-opt-gh774 a1c0935

@rurban
Copy link
Member

rurban commented Mar 7, 2014

Fixed with commit 84807d1
Author: Reini Urban rurban@cpanel.net
Date: Thu Mar 6 17:20:58 2014 -0600

fix clang optimizer increment issue GH #774

have to use volatile scratch registers in Parrot_Integer_increment_orig to avoid
skipping overflow sementics: -1 => MAXINT
fixes t/pmc/bigint.t test negate_min_integer

@rurban rurban closed this as completed Mar 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants