From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id E909145C305 for ; Sat, 5 Dec 2020 21:30:25 +0300 (MSK) References: <20201204153003.175555-1-gorcunov@gmail.com> From: Vladislav Shpilevoy Message-ID: <2488ad63-b7b8-36ff-c540-0fe8c83ff312@tarantool.org> Date: Sat, 5 Dec 2020 19:30:23 +0100 MIME-Version: 1.0 In-Reply-To: <20201204153003.175555-1-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v3 0/4] crash dump: implement sending feedback List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov , tml Cc: Mons Anderson Hi! Thanks for the patch! I can't build it. Also almost the entire CI is red: https://gitlab.com/tarantool/tarantool/-/pipelines/225435069 So I am going to look at the patch, but I can't validate if it works. The first question is why is the module called 'errstat'? It has nothing to with errors nor with statistics. It is just a dump collector. I suggest you to rename it to crashinfo or just crash or something like that. Even the new config option uses 'crashinfo' name. My compilation errors are below. For strlcpy I can tell, that it already exists on my system. Probably this is why it fails to compile your version. /Users/gerold/Work/Repositories/tarantool/src/lib/core/errstat.c:69:1: error: expected parameter declarator strlcpy(char *dst, const char *src, size_t size) ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_string.h:112:47: note: expanded from macro 'strlcpy' __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz' #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0) ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL' # define _USE_FORTIFY_LEVEL 2 ^ /Users/gerold/Work/Repositories/tarantool/src/lib/core/errstat.c:69:1: error: expected ')' /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_string.h:112:47: note: expanded from macro 'strlcpy' __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz' #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0) ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL' # define _USE_FORTIFY_LEVEL 2 ^ /Users/gerold/Work/Repositories/tarantool/src/lib/core/errstat.c:69:1: note: to match this '(' /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_string.h:112:47: note: expanded from macro 'strlcpy' __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz' #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0) ^ /Users/gerold/Work/Repositories/tarantool/src/lib/core/errstat.c:69:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] strlcpy(char *dst, const char *src, size_t size) ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_string.h:112:47: note: expanded from macro 'strlcpy' __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz' #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0) ^ /Users/gerold/Work/Repositories/tarantool/src/lib/core/errstat.c:69:1: error: definition of builtin function '__builtin___strlcpy_chk' /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_string.h:112:3: note: expanded from macro 'strlcpy' __builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest)) ^ /Users/gerold/Work/Repositories/tarantool/src/lib/core/errstat.c:74:3: error: too many arguments to function call, expected 1, have 2 memcpy(dst, src, len); ^~~~~~~~~~~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_string.h:63:46: note: expanded from macro 'memcpy' __builtin___memcpy_chk (dest, __VA_ARGS__, __darwin_obsz0 (dest)) ^~~~~~~~~~~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_common.h:38:63: note: expanded from macro '__darwin_obsz0' #define __darwin_obsz0(object) __builtin_object_size (object, 0) ~~~~~~~~~~~~~~~~~~~~~ ^ 5 errors generated.