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

Bugreport: Everything crashes when running an example from the docstring #90

Open
schlichtanders opened this issue Jul 31, 2021 · 2 comments

Comments

@schlichtanders
Copy link

Hi here is one example docstring from pushfirst

julia> f(x) = 3x + 2
f (generic function with 1 method)

julia> ir = @code_ir f(1)
1: (%1, %2)
  %3 = 3 * %2
  %4 = %3 + 2
  return %4

julia> pushfirst!(ir, :(println("hello, world")))
%5

julia> ir
1: (%1, %2)
  %5 = println("hello, world")
  %3 = 3 * %2
  %4 = %3 + 2
  return %4

when running this with IRTools.func(ir)(f, 1) everything crashes.
I experience similar behaviour everytime I try to insert literal values like "hello, world" in this case.

Probably this is just missing and wrong documentation - What is the current way of inserting literal values?

@KDr2
Copy link

KDr2 commented Nov 11, 2021

Seems that it works under Julia 1.7 and prior, but crashes on Julia 1.8.

@simeonschaub
Copy link
Member

Could you post the whole stacktrace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants