Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
20983b85
Commit
20983b85
authored
Nov 06, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix atoi
parent
64f4d051
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
main.go
mipsevm/main.go
+2
-2
No files found.
mipsevm/main.go
View file @
20983b85
...
@@ -24,7 +24,7 @@ func main() {
...
@@ -24,7 +24,7 @@ func main() {
root
=
fmt
.
Sprintf
(
"/tmp/cannon/%d_%d"
,
0
,
blockNumber
)
root
=
fmt
.
Sprintf
(
"/tmp/cannon/%d_%d"
,
0
,
blockNumber
)
}
}
if
len
(
os
.
Args
)
>
2
{
if
len
(
os
.
Args
)
>
2
{
target
=
strconv
.
Atoi
(
os
.
Args
[
2
])
target
,
_
=
strconv
.
Atoi
(
os
.
Args
[
2
])
}
}
// step 1, generate the checkpoints every million steps using unicorn
// step 1, generate the checkpoints every million steps using unicorn
...
@@ -33,7 +33,7 @@ func main() {
...
@@ -33,7 +33,7 @@ func main() {
lastStep
:=
0
lastStep
:=
0
mu
:=
GetHookedUnicorn
(
root
,
ram
,
func
(
step
int
,
mu
uc
.
Unicorn
,
ram
map
[
uint32
](
uint32
))
{
mu
:=
GetHookedUnicorn
(
root
,
ram
,
func
(
step
int
,
mu
uc
.
Unicorn
,
ram
map
[
uint32
](
uint32
))
{
// this can be raised to 10,000,000 if the files are too large
// this can be raised to 10,000,000 if the files are too large
if
step
%
10000000
==
0
||
(
target
!=
-
1
&&
step
==
target
)
{
if
step
%
10000000
==
0
||
step
==
target
{
SyncRegs
(
mu
,
ram
)
SyncRegs
(
mu
,
ram
)
fn
:=
fmt
.
Sprintf
(
"%s/checkpoint_%d.json"
,
root
,
step
)
fn
:=
fmt
.
Sprintf
(
"%s/checkpoint_%d.json"
,
root
,
step
)
WriteCheckpoint
(
ram
,
fn
,
step
)
WriteCheckpoint
(
ram
,
fn
,
step
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment