Skip to content

unsafe_load does not taint :noub effect #56056

Open
@topolarity

Description

do_ub() = unsafe_load(Ptr{Int}(UInt(0)))

This function executes undefined behavior, but the compiler has no idea somehow:

julia> Base.infer_effects(do_ub, ())
(!c,+e,+n,+t,+s,+m,+u,+o,+r)
julia> do_ub()
Warning: detected a stack overflow; program state may be corrupted, so further execution might be unreliable.
ERROR: StackOverflowError:

Activity

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

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorcompiler:effectseffect analysis

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions