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

Core._apply emits bad code #39113

Closed
simeonschaub opened this issue Jan 6, 2021 · 0 comments · Fixed by #39115
Closed

Core._apply emits bad code #39113

simeonschaub opened this issue Jan 6, 2021 · 0 comments · Fixed by #39115
Labels
compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) regression Regression in behavior compared to a previous version
Milestone

Comments

@simeonschaub
Copy link
Member

The following fails on 1.6 and latest master:

julia> f(x) = Core._apply(-, x)
f (generic function with 1 method)

julia> f(1)
ERROR: BoundsError: attempt to access Nothing at index [1]
Stacktrace:
 [1] f(x::Int64)
   @ Main ./REPL[1]:1
 [2] top-level scope
   @ REPL[2]:1

Note that this work if it's at the toplevel, so it seems to happen somewhere during optimization:

julia> Core._apply(-, 1)
-1
@simeonschaub simeonschaub added compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) regression Regression in behavior compared to a previous version labels Jan 6, 2021
@simeonschaub simeonschaub added this to the 1.6 blockers milestone Jan 6, 2021
vtjnash added a commit that referenced this issue Jan 6, 2021
We can emulate this deprecated function, until we delete it in v2.
This in turn revealed some missing error checks, which we also add.

Fixes #39113
vtjnash added a commit that referenced this issue Jan 6, 2021
We can emulate this deprecated function, until we delete it in v2.
This in turn revealed some missing error checks, which we also add.

Fixes #39113
simeonschaub added a commit to simeonschaub/Cassette.jl that referenced this issue Jan 6, 2021
vchuravy pushed a commit to JuliaLabs/Cassette.jl that referenced this issue Jan 6, 2021
* fix on nightly

* work around JuliaLang/julia#39113
JeffBezanson pushed a commit that referenced this issue Jan 7, 2021
We can emulate this deprecated function, until we delete it in v2.
This in turn revealed some missing error checks, which we also add.

Fixes #39113
vtjnash added a commit that referenced this issue Feb 16, 2021
We can emulate this deprecated function, until we delete it in v2.
This in turn revealed some missing error checks, which we also add.

Fixes #39113

(cherry picked from commit 59eb9f9)
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this issue May 4, 2021
We can emulate this deprecated function, until we delete it in v2.
This in turn revealed some missing error checks, which we also add.

Fixes JuliaLang#39113
staticfloat pushed a commit that referenced this issue Dec 23, 2022
We can emulate this deprecated function, until we delete it in v2.
This in turn revealed some missing error checks, which we also add.

Fixes #39113

(cherry picked from commit 59eb9f9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:optimizer Optimization passes (mostly in base/compiler/ssair/) regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant