Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
darshan
darshan
Commits
d4dc84f4
Commit
d4dc84f4
authored
Aug 17, 2016
by
Shane Snyder
Browse files
bug fix in writing of name records
parent
def2fe28
Changes
1
Hide whitespace changes
Inline
Side-by-side
darshan-util/darshan-logutils.c
View file @
d4dc84f4
...
@@ -593,15 +593,15 @@ int darshan_log_put_namehash(darshan_fd fd, struct darshan_name_record_ref *hash
...
@@ -593,15 +593,15 @@ int darshan_log_put_namehash(darshan_fd fd, struct darshan_name_record_ref *hash
assert
(
state
);
assert
(
state
);
/* allocate memory for largest possible hash record */
/* allocate memory for largest possible hash record */
name_rec
=
malloc
(
sizeof
(
struct
darshan_
name_
record
)
+
PATH_MAX
);
name_rec
=
malloc
(
sizeof
(
darshan_record
_id
)
+
PATH_MAX
+
1
);
if
(
!
name_rec
)
if
(
!
name_rec
)
return
(
-
1
);
return
(
-
1
);
memset
(
name_rec
,
0
,
sizeof
(
struct
darshan_
name_
record
)
+
PATH_MAX
);
memset
(
name_rec
,
0
,
sizeof
(
darshan_record
_id
)
+
PATH_MAX
+
1
);
/* individually serialize each hash record and write to log file */
/* individually serialize each hash record and write to log file */
HASH_ITER
(
hlink
,
hash
,
ref
,
tmp
)
HASH_ITER
(
hlink
,
hash
,
ref
,
tmp
)
{
{
name_rec_len
=
sizeof
(
struct
darshan_
name_
record
)
+
strlen
(
ref
->
name_record
->
name
);
name_rec_len
=
sizeof
(
darshan_record
_id
)
+
strlen
(
ref
->
name_record
->
name
)
+
1
;
memcpy
(
name_rec
,
ref
->
name_record
,
name_rec_len
);
memcpy
(
name_rec
,
ref
->
name_record
,
name_rec_len
);
/* write this hash entry to log file */
/* write this hash entry to log file */
...
...
Glenn K. Lockwood
@glock
mentioned in commit
6e75dade
·
Aug 24, 2016
mentioned in commit
6e75dade
mentioned in commit 6e75dadeb0f78ad6c6c9d2f4e8eea9b8c9da7f54
Toggle commit list
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