Bug? tensor 0/0 will terminate the program

I am using pytorch 0.4

import torch
a=torch.tensor(0)/torch.tensor(0)
print(a)
print(‘here’)

run the above code, it just terminates before print(a), and nothing will be printed. However, a is supposed to be nan.

this works fine
a=torch.tensor(0.0)/torch.tensor(0.0)

this is expected behavior.
See this comment for answer: https://github.com/pytorch/pytorch/issues/8079#issuecomment-394386663