Skip to content

Does not panic upon division by zero when assigned to _. #551

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

Closed
dmitshur opened this issue Dec 13, 2016 · 1 comment
Closed

Does not panic upon division by zero when assigned to _. #551

dmitshur opened this issue Dec 13, 2016 · 1 comment
Labels

Comments

@dmitshur
Copy link
Member

The following program panics when compiled using gc:

package main

func main() {
	x := 0
	_ = 1 / x
}

It does not panic when compiled with GopherJS.

This is the same issue as golang/go#18024 upstream, and it was uncovered by me when working on go1.8 branch thanks to golang/go@c2bb52b causing fixedbugs/issue8613.go test to run as part of TestGoRepositoryCompilerTests.

Low priority, I'm reporting for tracking purposes.

@dmitshur dmitshur added the bug label Dec 13, 2016
dmitshur added a commit that referenced this issue Dec 13, 2016
There were 3 failing tests.

One was a modified old test that wasn't previously run due to a build
constraint (that has been removed in 1.8). It fails due to a compiler
bug, see #551 that tracks it.

Two were new tests that use unsupported packages/funcs (such as "unsafe",
runtime.FuncForPC, runtime.Callers) and failed as a result.
dmitshur added a commit that referenced this issue Dec 13, 2016
There were 3 failing tests.

One was a modified old test that wasn't previously run due to a build
constraint (that has been removed in 1.8). It fails due to a compiler
bug, see #551 that tracks it.

Two were new tests that use unsupported packages/funcs (such as "unsafe",
runtime.FuncForPC, runtime.Callers) and failed as a result.
dmitshur added a commit that referenced this issue Dec 14, 2016
There were 3 failing tests.

One was a modified old test that wasn't previously run due to a build
constraint (that has been removed in 1.8). It fails due to a compiler
bug, see #551 that tracks it.

Two were new tests that use unsupported packages/funcs (such as "unsafe",
runtime.FuncForPC, runtime.Callers) and failed as a result.
dmitshur added a commit that referenced this issue Jan 5, 2017
There were 3 failing tests.

One was a modified old test that wasn't previously run due to a build
constraint (that has been removed in 1.8). It fails due to a compiler
bug, see #551 that tracks it.

Two were new tests that use unsupported packages/funcs (such as "unsafe",
runtime.FuncForPC, runtime.Callers) and failed as a result.
@neelance
Copy link
Member

Fixed by f347191.

dmitshur added a commit that referenced this issue Feb 16, 2017
There were 3 failing tests.

One was a modified old test that wasn't previously run due to a build
constraint (that has been removed in 1.8). It fails due to a compiler
bug, see #551 that tracks it.

Two were new tests that use unsupported packages/funcs (such as "unsafe",
runtime.FuncForPC, runtime.Callers) and failed as a result.
dmitshur added a commit that referenced this issue Feb 16, 2017
There were 3 failing tests.

One was a modified old test that wasn't previously run due to a build
constraint (that has been removed in 1.8). It fails due to a compiler
bug, see #551 that tracks it.

Two were new tests that use unsupported packages/funcs (such as "unsafe",
runtime.FuncForPC, runtime.Callers) and failed as a result.
dmitshur added a commit that referenced this issue Feb 16, 2017
It now passes, because the underlying issue has been fixed in f347191.

See #551 (which is now resolved).
dmitshur added a commit that referenced this issue Jun 25, 2017
The fixedbugs/issue19182.go test requires GOMAXPROCS=2, otherwise it
never terminates. Avoid running it, since GopherJS only supports
GOMAXPROCS=1.

The fixedbugs/issue19246.go case looks similar to #551. /cc @neelance

Check knownFails table before potentially setting test.err to nil for
skip errors. Otherwise the never-terminate skip tests get incorrectly
classified as "unok" instead of "knfl".
dmitshur added a commit that referenced this issue Aug 25, 2017
The fixedbugs/issue19182.go test requires GOMAXPROCS=2, otherwise it
never terminates. Avoid running it, since GopherJS only supports
GOMAXPROCS=1.

The fixedbugs/issue19246.go case looks similar to #551. /cc @neelance

Check knownFails table before potentially setting test.err to nil for
skip errors. Otherwise the never-terminate skip tests get incorrectly
classified as "unok" instead of "knfl".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants