Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
lvzhengyang
abc
Commits
ea3133e3
Commit
ea3133e3
authored
Aug 03, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making ABC error out instead of crashing when non-standard range is given.
parent
b29cda08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
src/base/wlc/wlcReadVer.c
+8
-3
No files found.
src/base/wlc/wlcReadVer.c
View file @
ea3133e3
...
...
@@ -493,6 +493,8 @@ static inline char * Wlc_PrsFindRange( char * pStr, int * End, int * Beg )
if
(
pStr
==
NULL
)
return
NULL
;
}
if
(
*
End
<
*
Beg
)
return
NULL
;
assert
(
*
End
>=
*
Beg
);
return
pStr
+
1
;
}
...
...
@@ -748,8 +750,10 @@ static inline int Wlc_PrsFindDefinition( Wlc_Prs_t * p, char * pStr, Vec_Int_t *
}
else
if
(
pStr
[
0
]
==
'['
)
{
int
End
,
Beg
;
int
End
,
Beg
;
char
*
pLine
=
pStr
;
pStr
=
Wlc_PrsFindRange
(
pStr
,
&
End
,
&
Beg
);
if
(
pStr
==
NULL
)
return
Wlc_PrsWriteErrorMessage
(
p
,
pLine
,
"Non-standard range."
);
Vec_IntPush
(
vFanins
,
(
End
<<
16
)
|
Beg
);
Type
=
WLC_OBJ_BIT_SELECT
;
}
...
...
@@ -795,7 +799,7 @@ static inline int Wlc_PrsFindDefinition( Wlc_Prs_t * p, char * pStr, Vec_Int_t *
}
int
Wlc_PrsReadDeclaration
(
Wlc_Prs_t
*
p
,
char
*
pStart
)
{
int
fFound
=
0
,
Type
=
WLC_OBJ_NONE
,
iObj
;
int
fFound
=
0
,
Type
=
WLC_OBJ_NONE
,
iObj
;
char
*
pLine
;
int
Signed
=
0
,
Beg
=
0
,
End
=
0
,
NameId
,
fIsPo
=
0
;
if
(
Wlc_PrsStrCmp
(
pStart
,
"input"
)
)
pStart
+=
strlen
(
"input"
),
Type
=
WLC_OBJ_PI
;
...
...
@@ -809,9 +813,10 @@ int Wlc_PrsReadDeclaration( Wlc_Prs_t * p, char * pStart )
// read 'signed'
pStart
=
Wlc_PrsFindWord
(
pStart
,
"signed"
,
&
Signed
);
// read range
pLine
=
pStart
;
pStart
=
Wlc_PrsFindRange
(
pStart
,
&
End
,
&
Beg
);
if
(
pStart
==
NULL
)
return
Wlc_PrsWriteErrorMessage
(
p
,
p
Start
,
"Cannot rea
d range."
);
return
Wlc_PrsWriteErrorMessage
(
p
,
p
Line
,
"Non-standar
d range."
);
if
(
Beg
!=
0
)
{
if
(
p
->
nNonZeroCount
++
==
0
)
...
...
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