Skip to content

encoding/gob: Int, float arrays don't encode/decode correctly #459

@gopherbot

Description

@gopherbot

by soniakeys:

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1.  modify TestArray (http://pastebin.com/f1301c4ed) of encoder_test.go to
test an int array instead of a string array.
2.  modifed code:  http://pastebin.com/f208c03e9
3.  gotest

What is the expected output? What do you see instead?
PASS expected.  EOF and FAIL seen.

What is your $GOOS?  $GOARCH?
linux, amd64.


Which revision are you using?  (hg identify)
release.2009-12-09

Please provide any additional information below.
Code I was trying with float arrays either crashed or decoded wrong
numbers.  I expanded TestArray a little more to actually verify values. 
http://pastebin.com/f294d2205  Output from this was 3 "data corruption"
messages.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions