Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
vala
vala
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 701
    • Issues 701
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 39
    • Merge Requests 39
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • GNOME
  • valavala
  • Issues
  • #816

Closed
Open
Opened Jun 30, 2019 by gavr@gavr123456789🕵🏻

SIGABRT on generic struct with string

public struct Pair<T,G> {
        T v0;
        G v1;
      
        Pair (T v0, G v1) {
          this.v0 = v0; this.v1 = v1;
        }
    
        Pair.empty () {}
    
        public T first () {
          return v0;
        }
        public G second () {
          return v1;
        }
}

public static int main(string[] args) {
  var b = new Pair<int,string>(4,"test");
  string s = b.second();
  return 0;
}

got free(): invalid pointer fish: './template_struct' terminated by signal SIGABRT (Abort)
I think the problem is with string because if write int i = b.first(); then everything works fine.
Vala 0.44.5

Edited Jul 25, 2019 by gavr
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/vala#816