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

Segmentation fault on array copy #2984

Open
EEVV opened this issue Jan 19, 2019 · 4 comments
Open

Segmentation fault on array copy #2984

EEVV opened this issue Jan 19, 2019 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed needs investigation This needs to be looked into before its "ready for work"

Comments

@EEVV
Copy link

EEVV commented Jan 19, 2019

class Double
  let _a: Array[U8 val] = []
  let _b: Array[U8 val] = []

  new create(a: Array[U8 val] val, b: Array[U8 val] val) =>
    for byte in a.values() do
      _a.push(byte)
    end

    for byte in b.values() do
      _b.push(byte)
    end

actor Main
  var _d: (Double | None) = None

  new create(env: Env) =>
    let a: Array[U8 val] val = []

    _d = Double(a, a)

Linux (x86_64 Linux 4.19.15_1)

$ ponyc --version:

0.25.0 [release]
compiled with: llvm 6.0.1 -- cc (GCC) 7.3.0
Defaults: pic=true ssl=openssl_0.9.0

$ ponyc:

Building builtin -> /usr/lib/pony/0.25.0/packages/builtin
Building . -> /home/eevv/projects/pony/bug
Generating
 Reachability
 Selector painting
 Data prototypes
 Data types
 Function prototypes
 Functions
 Descriptors
Optimising
Stack dump:
0.	Running pass 'Function Pass Manager' on module 'bug'.
1.	Running pass 'Move heap allocations to the stack' on function '@Main_Dispatch'
Segmentation fault
@SeanTAllen
Copy link
Member

I can confirm this causes the same error for me using Ponyc 0.25.0 with LLVM 3.9.1 on MacOS 10.11.6

@jemc
Copy link
Member

jemc commented Jan 22, 2019

Since this is a failure in the heap to stack area that I'm currently looking at these past few days, I can take responsibility for next triaging steps on this one.

@SeanTAllen SeanTAllen added needs investigation This needs to be looked into before its "ready for work" bug Something isn't working and removed bug: 1 - needs investigation labels May 12, 2020
@SeanTAllen SeanTAllen added the help wanted Extra attention is needed label Sep 5, 2020
@SeanTAllen
Copy link
Member

This is still an issue as of 0.37.0

@SeanTAllen
Copy link
Member

Still an issue as of 0.46.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed needs investigation This needs to be looked into before its "ready for work"
Projects
None yet
Development

No branches or pull requests

3 participants