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
gollvm/gofrontend: llvm-goc crashes when importing complex(0) #52862
Labels
Milestone
Comments
tianxiaogu
changed the title
gollvm/frontend: llvm-goc crashes when importing complex(0)
gollvm/gofrontend: llvm-goc crashes when importing complex(0)
May 12, 2022
cc @thanm |
heschi
added
the
NeedsFix
The path to resolution is known, but the work has not been done.
label
May 12, 2022
Change https://go.dev/cl/413980 mentions this issue: |
Change https://go.dev/cl/413981 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Jun 27, 2022
The gofrontend crashed importing a complex 0 constant. For #52862 Change-Id: Ia87d8eadb9c5ddf51e1cd65c1a626f05f0d068d4 Reviewed-on: https://go-review.googlesource.com/c/go/+/413980 Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
xionghul
pushed a commit
to xionghul/gcc
that referenced
this issue
Jun 27, 2022
realqhc
pushed a commit
to realqhc/gofrontend
that referenced
this issue
Aug 4, 2022
Test case is https://go.dev/cl/413980. Fixes golang/go#52862 Change-Id: I2233878df0ee075a5cc60e32151cc9802e9b7075 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/413981 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
jproberts
pushed a commit
to jproberts/go
that referenced
this issue
Aug 10, 2022
The gofrontend crashed importing a complex 0 constant. For golang#52862 Change-Id: Ia87d8eadb9c5ddf51e1cd65c1a626f05f0d068d4 Reviewed-on: https://go-review.googlesource.com/c/go/+/413980 Reviewed-by: Cherry Mui <cherryyz@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
There is a trivial bug of
Integer_expression::do_import
. When the imported number is complex(0), there is no plus or minus in the input string. So thereal
will be set to zero bympfr_set_ui(real, 0, MPFR_RNDN)
. But laterreal
will be freed anyway bympfr_clear(real)
. To fix the issue, we can either do not clear real when the input is zero (i.e., no plus or minus) or usempfr_init_set_ui
instead ofmpfr_set_ui
.We can use the following C program to show that
mpfr_set_ui
cannot work withmpfr_clear
.The text was updated successfully, but these errors were encountered: