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

Function compilation not being updated for specific types on 32-bit systems #8298

Open
2 tasks done
kc611 opened this issue Jul 29, 2022 · 1 comment
Open
2 tasks done
Labels
bug - incorrect behavior Bugs: incorrect behavior

Comments

@kc611
Copy link
Collaborator

kc611 commented Jul 29, 2022

Reporting a bug

  • I have tried using the latest released version of Numba (most recent is
    visible in the change log (https://github.com/numba/numba/blob/main/CHANGE_LOG).
  • I have included a self contained code sample to reproduce the problem.
    i.e. it's possible to run as 'python bug.py'.

Note: This is only observed in 32-bit systems and not 64-bit ones.

import numba
import numpy as np

@numba.njit
def foo(x):
    print("from within: ",x)
    return x

foo(0)
print( foo( np.iinfo(np.int32).max + 1) )
# Returns a negative integer (overflow), the function signature stays as `int32` argument instead of an `int64`/`uint32`

First encountered in #8041

@sklam
Copy link
Member

sklam commented Aug 2, 2022

Note:

  • check typeof logic in dispatching. seems like it's always picking intp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - incorrect behavior Bugs: incorrect behavior
Projects
Status: Observing
Development

No branches or pull requests

3 participants