Skip to content

Commit 250b4bb

Browse files
committed
Circumvent more illegal instructions
1 parent 8ee5829 commit 250b4bb

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.1.1"
44

55
[deps]
66
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
7+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
78
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
89

910
[extras]

src/JuliaInterpreter.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ using Core: CodeInfo, SSAValue, SlotNumber, TypeMapEntry, SimpleVector, LineInfo
66
GeneratedFunctionStub, MethodInstance, NewvarNode, TypeName
77

88
using UUIDs
9+
# The following are for circumventing #28, memcpy invalid instruction error,
10+
# in Base and stdlib
11+
using Random.DSFMT
12+
using InteractiveUtils
913

1014
export @enter, @make_stack, @interpret, Compiled, JuliaStackFrame
1115

@@ -1060,6 +1064,11 @@ function set_compiled_methods()
10601064
push!(compiled_methods, which(vcat, (Vector,)))
10611065
push!(compiled_methods, first(methods(Base._getindex_ra)))
10621066
push!(compiled_methods, first(methods(Base._setindex_ra!)))
1067+
push!(compiled_methods, which(Base.decompose, (BigFloat,)))
1068+
push!(compiled_methods, @eval DSFMT which(dsfmt_jump, (DSFMT_state, GF2X)))
1069+
if Sys.iswindows()
1070+
push!(compiled_methods, which(InteractiveUtils.clipboard, (AbstractString,)))
1071+
end
10631072
end
10641073

10651074
function __init__()

0 commit comments

Comments
 (0)