Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
41ffcac4
Commit
41ffcac4
authored
Feb 18, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more debug
parent
0e47eeab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
asn1c/tests/check-70.c
asn1c/tests/check-70.c
+20
-9
No files found.
asn1c/tests/check-70.c
View file @
41ffcac4
...
@@ -33,10 +33,10 @@ _buf_writer(const void *buffer, size_t size, void *app_key) {
...
@@ -33,10 +33,10 @@ _buf_writer(const void *buffer, size_t size, void *app_key) {
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
memcpy
(
buf
+
buf_offset
,
buffer
,
size
);
b
=
buf
+
buf_offset
;
b
=
buf
+
buf_offset
;
bend
=
b
+
size
;
bend
=
b
+
size
;
printf
(
"=> ["
);
fprintf
(
stderr
,
"=> ["
);
for
(;
b
<
bend
;
b
++
)
for
(;
b
<
bend
;
b
++
)
printf
(
"%c"
,
*
b
);
fprintf
(
stderr
,
"%c"
,
*
b
);
printf
(
"]:%ld
\n
"
,
(
long
)
size
);
fprintf
(
stderr
,
"]:%ld
\n
"
,
(
long
)
size
);
buf_offset
+=
size
;
buf_offset
+=
size
;
return
0
;
return
0
;
}
}
...
@@ -82,28 +82,39 @@ load_object_from(enum expectation expectation, char *fbuf, int size, enum der_or
...
@@ -82,28 +82,39 @@ load_object_from(enum expectation expectation, char *fbuf, int size, enum der_or
asn_dec_rval_t
(
*
zer_decode
)(
struct
asn_codec_ctx_s
*
,
asn_dec_rval_t
(
*
zer_decode
)(
struct
asn_codec_ctx_s
*
,
asn_TYPE_descriptor_t
*
,
void
**
,
void
*
,
size_t
);
asn_TYPE_descriptor_t
*
,
void
**
,
void
*
,
size_t
);
PDU_t
*
st
=
0
;
PDU_t
*
st
=
0
;
int
csize
;
int
csize
=
1
;
if
(
how
==
AS_DER
)
if
(
how
==
AS_DER
)
zer_decode
=
ber_decode
;
zer_decode
=
ber_decode
;
else
else
zer_decode
=
xer_decode
;
zer_decode
=
xer_decode
;
if
(
getenv
(
"INITIAL_CHUNK_SIZE"
))
fprintf
(
stderr
,
"LOADING OBJECT OF SIZE %d
\n
"
,
size
);
csize
=
atoi
(
getenv
(
"INITIAL_CHUNK_SIZE"
)
);
/* Perform multiple iterations with multiple chunks sizes */
/* Perform multiple iterations with multiple chunks sizes */
for
(
csize
=
1
;
csize
<
20
;
csize
+=
1
)
{
for
(;
csize
<
20
;
csize
+=
1
)
{
int
fbuf_offset
=
0
;
int
fbuf_offset
=
0
;
int
fbuf_left
=
size
;
int
fbuf_left
=
size
;
int
fbuf_chunk
=
csize
;
int
fbuf_chunk
=
csize
;
fprintf
(
stderr
,
"LOADING OBJECT OF SIZE %d, chunks %d
\n
"
,
size
,
csize
);
if
(
st
)
asn_DEF_PDU
.
free_struct
(
&
asn_DEF_PDU
,
st
,
0
);
if
(
st
)
asn_DEF_PDU
.
free_struct
(
&
asn_DEF_PDU
,
st
,
0
);
st
=
0
;
st
=
0
;
do
{
do
{
fprintf
(
stderr
,
"Decoding from %d with %d (left %d)
\n
"
,
fprintf
(
stderr
,
"Decoding bytes %d..%d (left %d)
\n
"
,
fbuf_offset
,
fbuf_chunk
,
fbuf_left
);
fbuf_offset
,
fbuf_chunk
<
fbuf_left
?
fbuf_chunk
:
fbuf_left
,
fbuf_left
);
if
(
st
)
{
fprintf
(
stderr
,
"=== currently ===
\n
"
);
asn_fprint
(
stderr
,
&
asn_DEF_PDU
,
st
);
fprintf
(
stderr
,
"=== end ===
\n
"
);
}
rval
=
zer_decode
(
0
,
&
asn_DEF_PDU
,
(
void
**
)
&
st
,
rval
=
zer_decode
(
0
,
&
asn_DEF_PDU
,
(
void
**
)
&
st
,
fbuf
+
fbuf_offset
,
fbuf
+
fbuf_offset
,
fbuf_chunk
<
fbuf_left
fbuf_chunk
<
fbuf_left
...
...
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