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

[Io\print] print segfaults when trying to print :bytecode's data field #1627

Open
RickBarretto opened this issue May 10, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@RickBarretto
Copy link
Collaborator

RickBarretto commented May 10, 2024

To Reproduce

antiprimes.art:

btc: to :bytecode [
  found: 0
  i: 1
  maxDiv: 0

  while [found < 20] [
    fac: size factors i
    if fac > maxDiv [
      print i
      maxDiv: fac
      found: found + 1
    ]
    i: i + 1
  ]
]

do btc

print "============"

print btc\data

On terminal:

$ arturo antiprimes.art
1
2
4
6
12
24
36
48
60
120
180
240
360
720
840
1260
1680
2520
5040
7560
============
SIGSEGV: Illegal storage access. (Attempt to read from nil?)

Expected behavior

As for inspect, print should work as well:

image

$ arturo antiprimes.art
1
2
4
6
12
24
36
48
60
120
180
240
360
720
840
1260
1680
2520
5040
7560
============
[found i maxDiv 20 factors fac]

Desktop (please complete the following information):

  • OS: Windows11
  • Arch: x86
  • Version: v/0.9.83 b/2898 @ 2024-05-04T20:31:34-03:00

Additional context
I discovered when talking about a possible bug with bytecode\data

@RickBarretto RickBarretto added the bug Something isn't working label May 10, 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
Projects
None yet
Development

No branches or pull requests

2 participants