Skip to content
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

Datatype's underline array is persisted as *uint8 pointer value #2704

Open
piux2 opened this issue Aug 15, 2024 · 0 comments
Open

Datatype's underline array is persisted as *uint8 pointer value #2704

piux2 opened this issue Aug 15, 2024 · 0 comments
Assignees
Labels
🐞 bug Something isn't working 🌟 must have 🌟 Mandatory work needed to complete a project

Comments

@piux2
Copy link
Contributor

piux2 commented Aug 15, 2024

Description

Problem:

A ByteTypeValue should not be persisted as it contains the underline array. However when it is assigned to a uint8 PointerType variable , the underlien array got persisted

Testing Case:

// PKGPATH: gno.land/r/test
package test

var a0, a1 *uint8

func main() {
a := []byte("helloooooooooooooooooooooo")
a1 = &a[1]
a0 = &a[0]

}

// Realm:
// switchrealm["gno.land/r/test"]
+c[a8ada09dee16d791fd406d629fe29bb0ed084a30:4]={

  • "Data": "aGVsbG9vb29vb29vb29vb29vb29vb29vb28AAAAAAAA=", <<<< "helloooooooooooooooooooooo"
  • "List": null,
  • "ObjectInfo": {
  •    "ID": "a8ada09dee16d791fd406d629fe29bb0ed084a30:4",
    
  •    "IsEscaped": true,
    
  •    "ModTime": "0",
    
  •    "RefCount": "2"
    
  • }
    +}
@piux2 piux2 self-assigned this Aug 15, 2024
@piux2 piux2 changed the title Datatype is persisted as *uint8 pointer value Datatype's underline array is persisted as *uint8 pointer value Aug 15, 2024
@zivkovicmilos zivkovicmilos added 🌟 must have 🌟 Mandatory work needed to complete a project 🐞 bug Something isn't working labels Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🌟 must have 🌟 Mandatory work needed to complete a project
Projects
Status: Triage
Development

No branches or pull requests

2 participants