[
https://issues.apache.org/jira/browse/BEAM-7994?focusedWorklogId=297356&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-297356
]
ASF GitHub Bot logged work on BEAM-7994:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Aug/19 19:04
Start Date: 19/Aug/19 19:04
Worklog Time Spent: 10m
Work Description: lostluck commented on issue #9362: [BEAM-7994] Fixing
unsafe pointer usage for Go 1.13
URL: https://github.com/apache/beam/pull/9362#issuecomment-522712507
IIRC there should only be one other use of Unsafe and that's an optmization
in the ioutilx package so a []byte we know should be allocated on the stack
isn't put on the heap. (Noescape essentially).
The only other workaround would be to plumb a concrete type all the way to
that spot instead of an io.Reader.
On Mon, Aug 19, 2019, 11:02 AM Joe Tsai <[email protected]> wrote:
> *@dsnet* commented on this pull request.
> ------------------------------
>
> In sdks/go/pkg/beam/core/util/reflectx/functions_test.go
> <https://github.com/apache/beam/pull/9362#discussion_r315339519>:
>
> > +func TestXxx(t *testing.T) {
> + val := reflect.ValueOf(testFunction)
> + fi := uintptr(val.Pointer())
> + typ := val.Type()
> +
> + callable := LoadFunction(fi, typ)
> +
> + cv := reflect.ValueOf(callable)
> + out := cv.Call(nil)
> + if len(out) != 1 {
> + t.Errorf("got %d return values, wanted 1.", len(out))
> + }
> + // TODO: check type?
> + if out[0].Int() != 42 {
> + t.Errorf("got %d, wanted 42", out[0].Int())
> + }
>
> Yes, please! :)
>
> The lack of a unit test on this function meant that it took several days
> to track down the issue when there was mysterious memory corruption
> happening in the entire beam job. A single unit test would have immediately
> identified this as the culprit.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
>
<https://github.com/apache/beam/pull/9362?email_source=notifications&email_token=ADKDOFLM2AWDPFUA6VVIYRTQFLN4XA5CNFSM4IMMR2Z2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCB7HKGI#discussion_r315339519>,
> or mute the thread
>
<https://github.com/notifications/unsubscribe-auth/ADKDOFOD7DO2HSTTQ55SXOLQFLN4XANCNFSM4IMMR2ZQ>
> .
>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 297356)
Time Spent: 3h 20m (was: 3h 10m)
> BEAM SDK has compatibility problems with go1.13
> -----------------------------------------------
>
> Key: BEAM-7994
> URL: https://issues.apache.org/jira/browse/BEAM-7994
> Project: Beam
> Issue Type: Improvement
> Components: sdk-go
> Reporter: Bill Neubauer
> Assignee: Bill Neubauer
> Priority: Minor
> Fix For: 2.16.0
>
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> The Go team identified a problem in the Beam SDK that appears due to runtime
> changes in Go 1.13, which is upcoming. There is a backwards compatible fix
> the team recommended.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)