Skip to content

Commit

Permalink
Merge pull request #18119 from JuliaLang/jb/fix18085
Browse files Browse the repository at this point in the history
fix #18085, segfault on method add in loop
  • Loading branch information
JeffBezanson committed Aug 19, 2016
2 parents 57df5f1 + c9c7bfa commit e23cea1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2882,7 +2882,7 @@ f(x) = yt(x)
(let* ((exprs (lift-toplevel (convert-lambda lam2 '|#anon| #t '())))
(top-stmts (cdr exprs))
(newlam (renumber-slots-and-labels (linearize (car exprs)))))
`(block
`(toplevel-butlast
,@top-stmts
,@sp-inits
(method ,name ,(cl-convert sig fname lam namemap toplevel interp)
Expand Down
8 changes: 8 additions & 0 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4476,3 +4476,11 @@ function f18054()
return Cint(0)
end
cfunction(f18054, Cint, ())

# issue #18085
f18085(a,x...) = (0,)
for (f,g) in ((:asin,:sin), (:acos,:cos))
gx = eval(g)
f18085(::Type{Val{f}},x...) = map(x->2gx(x), f18085(Val{g},x...))
end
@test f18085(Val{:asin},3) === (0.0,)

2 comments on commit e23cea1

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something went wrong when running your job: RemoteException(2,CapturedException(ErrorException("type NanosoldierError is immutable"),Any[( in report at BenchmarkJob.jl:405,1),( in run at BenchmarkJob.jl:233,1),( in #503 at multi.jl:1410,1),( in run_work_thunk at multi.jl:996,1),( in macro expansion at multi.jl:1410 [inlined],1),( in #502 at event.jl:46,1)]))
cc @jrevels

Please sign in to comment.