Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 394
    • Issues 394
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Issues
  • #1436
Closed
Open
Created Nov 23, 2006 by Markus Weigel@mwgGuest

runtime pointer error when invoking print on an array which is the return value of a function

Bugzilla Link 328
Created on Nov 23, 2006 16:33
Resolution INVALID
Resolved on May 08, 2007 11:44
Version 1.00beta
OS Linux
Architecture PC

Extended Description

In the following code example, the print statement will result in a runtime
error similar to
"*** glibc detected *** free(): invalid pointer: 0x080540d0 ***".
use StdIO: all;
import Array: all;
int[*] foo(int[.] shp) {
  return(genarray(shp,0));
}
int main() {
  shp = [64,64];
  A = foo(shp);
  print(A[[2,2]]); 
  return(0);
}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking