Skip to content

[JIT] Do not allow creating generics with None types#44958

Closed
malfet wants to merge 2 commits intopytorch:masterfrom
malfet:malfet/jit-do-not-deref-null-pointers
Closed

[JIT] Do not allow creating generics with None types#44958
malfet wants to merge 2 commits intopytorch:masterfrom
malfet:malfet/jit-do-not-deref-null-pointers

Conversation

@malfet
Copy link
Copy Markdown
Contributor

@malfet malfet commented Sep 18, 2020

Otherwise, invoking something like python -c "import torch._C;print(torch._C.ListType(None))" will result in SIGSEGV

Discovered while trying to create a torch script for function with the following type annotation Tuple[int, Ellipsis] -> None

@malfet malfet added module: crash Problem manifests as a hard crash, as opposed to a RuntimeError triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Sep 18, 2020
@malfet malfet requested review from ezyang, jamesr66a and suo September 18, 2020 16:25
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 18, 2020

Codecov Report

Merging #44958 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #44958   +/-   ##
=======================================
  Coverage   67.83%   67.83%           
=======================================
  Files         384      384           
  Lines       50047    50047           
=======================================
  Hits        33950    33950           
  Misses      16097    16097           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b059f2...977dd10. Read the comment docs.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Copy Markdown
Member

@suo suo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python -c "import torch._C;print(torch._C.ListType(None))"

Can we add a line like this somewhere in our test suite? As well?

Comment thread aten/src/ATen/core/jit_type.h Outdated
Otherwise, invoking something like  `python -c "import torch._C;print(torch._C.ListType(None))"` will result in SIGSEGV

Discovered while trying to create a torch script for function with the following type annotation `Tuple[int, Ellipsis] -> None`
@malfet malfet force-pushed the malfet/jit-do-not-deref-null-pointers branch from 3758087 to 977dd10 Compare September 22, 2020 22:15
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Sep 23, 2020

💊 CI failures summary and remediations

As of commit 977dd10 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 1 time.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@malfet merged this pull request in 989d877.

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Otherwise, invoking something like  `python -c "import torch._C;print(torch._C.ListType(None))"` will result in SIGSEGV

Discovered while trying to create a torch script for function with the following type annotation `Tuple[int, Ellipsis] -> None`

Pull Request resolved: pytorch#44958

Reviewed By: suo

Differential Revision: D23799906

Pulled By: malfet

fbshipit-source-id: 916a243007d13ed3e7a5b282dd712da3d66e3bf7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: crash Problem manifests as a hard crash, as opposed to a RuntimeError triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants