Skip to content

Commit 7c9b17c

Browse files
keszybzbluca
authored andcommitted
coredump: get rid of a bogus assertion
The check looks plausible, but when I started checking whether it needs to be lowered for the recent changes, I realized that it doesn't make much sense. context_parse_iovw() is called from a few places, e.g.: - process_socket(), where the other side controls the contents of the message. We already do other checks on the correctness of the message and this assert is not needed. - gather_pid_metadata_from_argv(), which is called after inserting MESSAGE_ID= and PRIORITY= into the array, so there is no direct relation between _META_ARGV_MAX and the number of args in the iovw. - gather_pid_metadata_from_procfs(), where we insert a bazillion fields, but without any relation to _META_ARGV_MAX. Since we already separately check if the required stuff was set, drop this misleading check. (cherry picked from commit 13902e025321242b1d95c6d8b4e482b37f58cdef) (cherry picked from commit 4c424072b3cc6a68265345cef2d29a6903081dcf) (cherry picked from commit e1afd271b5a297873008dcf54d3ce45fe2965984) (cherry picked from commit 32c4237) (cherry picked from commit 8f21d05) (cherry picked from commit e507f50)
1 parent 2eb46dc commit 7c9b17c

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/coredump/coredump.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,6 @@ static int save_context(Context *context, const struct iovec_wrapper *iovw) {
10851085

10861086
assert(context);
10871087
assert(iovw);
1088-
assert(iovw->count >= _META_ARGV_MAX);
10891088

10901089
/* The context does not allocate any memory on its own */
10911090

0 commit comments

Comments
 (0)