Skip to content

Commit 13902e0

Browse files
committed
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.
1 parent 8fc7b2a commit 13902e0

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
@@ -1031,7 +1031,6 @@ static int context_parse_iovw(Context *context, struct iovec_wrapper *iovw) {
10311031

10321032
assert(context);
10331033
assert(iovw);
1034-
assert(iovw->count >= _META_ARGV_MAX);
10351034

10361035
/* Converts the data in the iovec array iovw into separate fields. Fills in context->meta[] (for
10371036
* which no memory is allocated, it just contains direct pointers into the iovec array memory). */

0 commit comments

Comments
 (0)