GithubHelp home page GithubHelp logo

test failed if Golang over 1.4 about pp HOT 5 CLOSED

k0kubun avatar k0kubun commented on May 27, 2024
test failed if Golang over 1.4

from pp.

Comments (5)

walf443 avatar walf443 commented on May 27, 2024

It seems to crash on printer_test.go line 82:

    checkCases = []interface{}{
        map[string]int{"hell": 23, "world": 34},
        map[string]map[string]string{"s1": map[string]string{"v1": "m1", "va1": "me1"}, "si2": map[string]string{"v2": "m2"}},
        Foo{Bar: 1, Hoge: "a", Hello: map[string]string{"hel": "world", "a": "b"}, HogeHoges: []HogeHoge{HogeHoge{Hell: "a", World: 1}, HogeHoge{Hell: "bbb", World: 100}}},
        arr,
        []string{"aaa", "bbb", "ccc"},
        make(chan bool, 10),
        unsafe.Pointer(uintptr(1)),
        func(a string, b float32) int { return 0 },
        &HogeHoge{},
        &Piyo{Field1: map[string]string{"a": "b", "cc": "dd"}, F2: &Foo{}, Fie3: 128},
        []interface{}{1, 3},
        interface{}(1),
        HogeHoge{A: "test"},
        FooPri{Public: "hello", private: "world"},
        new(regexp.Regexp), // THIS LINE
    }

from pp.

walf443 avatar walf443 commented on May 27, 2024

hmm. it seems to be Golang's bug. SEE golang/go#9384

from pp.

k0kubun avatar k0kubun commented on May 27, 2024

Thank you for your report!

hmm. it seems to be Golang's bug. SEE golang/go#9384

I see. I commited a workaround in cdb03a4. Now CI passes.

from pp.

k0kubun avatar k0kubun commented on May 27, 2024

In my current understanding, uintptr(1) means a pointer whose address is 0x00000001.
Because it is an invalid address, conversion to unsafe.Pointer crashes.

So I changed to cast a pointer of a real struct to unsafe.Pointer. bbb232f

from pp.

walf443 avatar walf443 commented on May 27, 2024

I see. thanks.

from pp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.