Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

llvm4: same treatment

(cherry picked from commit b2e6952f378e2ed17d0d30b4986c6632a652d867)

+369 -3
+1 -3
pkgs/development/compilers/llvm/4/llvm.nix
··· 86 86 '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' 87 87 patch -p1 -i ${../TLI-musl.patch} 88 88 patch -p1 -i ${./dynamiclibrary-musl.patch} 89 + patch -p1 -i ${./sanitizers-nongnu.patch} -d projects/compiler-rt 89 90 ''; 90 91 91 92 # hacky fix: created binaries need to be run before installation ··· 121 122 "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" 122 123 "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}" 123 124 "-DTARGET_TRIPLE=${stdenv.targetPlatform.config}" 124 - 125 - "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" 126 - "-DCOMPILER_RT_BUILD_XRAY=OFF" 127 125 ]; 128 126 129 127 postBuild = ''
+368
pkgs/development/compilers/llvm/4/sanitizers-nongnu.patch
··· 1 + From dac4d3912378069b44340204e5fc6237aa1baf94 Mon Sep 17 00:00:00 2001 2 + From: Matthias Maier <tamiko@43-1.org> 3 + Date: Fri, 5 May 2017 17:47:39 +0000 4 + Subject: [PATCH] Musl patches 5 + 6 + Ported to compiler-rt-sanitizers-4.0.0. Taken from 7 + 8 + https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch 9 + --- 10 + lib/asan/asan_linux.cc | 4 +-- 11 + lib/interception/interception_linux.cc | 2 +- 12 + lib/interception/interception_linux.h | 2 +- 13 + lib/msan/msan_linux.cc | 2 +- 14 + .../sanitizer_common_interceptors_ioctl.inc | 4 +-- 15 + lib/sanitizer_common/sanitizer_common_syscalls.inc | 2 +- 16 + lib/sanitizer_common/sanitizer_linux_libcdep.cc | 12 +++---- 17 + lib/sanitizer_common/sanitizer_platform.h | 7 ++++ 18 + .../sanitizer_platform_interceptors.h | 2 +- 19 + .../sanitizer_platform_limits_posix.cc | 39 +++++++++++++--------- 20 + lib/tsan/rtl/tsan_platform_linux.cc | 2 +- 21 + 11 files changed, 46 insertions(+), 32 deletions(-) 22 + 23 + diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc 24 + index c051573dd..e295f6004 100644 25 + --- a/lib/asan/asan_linux.cc 26 + +++ b/lib/asan/asan_linux.cc 27 + @@ -39,7 +39,7 @@ 28 + #include <sys/link_elf.h> 29 + #endif 30 + 31 + -#if SANITIZER_ANDROID || SANITIZER_FREEBSD 32 + +#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_NONGNU 33 + #include <ucontext.h> 34 + extern "C" void* _DYNAMIC; 35 + #else 36 + @@ -80,7 +80,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) { 37 + UNIMPLEMENTED(); 38 + } 39 + 40 + -#if SANITIZER_ANDROID 41 + +#if SANITIZER_ANDROID || SANITIZER_NONGNU 42 + // FIXME: should we do anything for Android? 43 + void AsanCheckDynamicRTPrereqs() {} 44 + void AsanCheckIncompatibleRT() {} 45 + diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc 46 + index 6e908ac01..8f23d9adc 100644 47 + --- a/lib/interception/interception_linux.cc 48 + +++ b/lib/interception/interception_linux.cc 49 + @@ -24,7 +24,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr, 50 + return real == wrapper; 51 + } 52 + 53 + -#if !defined(__ANDROID__) // android does not have dlvsym 54 + +#if !defined(__ANDROID__) && !SANITIZER_NONGNU // android does not have dlvsym 55 + void *GetFuncAddrVer(const char *func_name, const char *ver) { 56 + return dlvsym(RTLD_NEXT, func_name, ver); 57 + } 58 + diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h 59 + index 27a66c882..3b559a303 100644 60 + --- a/lib/interception/interception_linux.h 61 + +++ b/lib/interception/interception_linux.h 62 + @@ -34,7 +34,7 @@ void *GetFuncAddrVer(const char *func_name, const char *ver); 63 + (::__interception::uptr) & (func), \ 64 + (::__interception::uptr) & WRAP(func)) 65 + 66 + -#if !defined(__ANDROID__) // android does not have dlvsym 67 + +#if !defined(__ANDROID__) && !SANITIZER_NONGNU // android does not have dlvsym 68 + #define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \ 69 + (::__interception::real_##func = (func##_f)( \ 70 + unsigned long)::__interception::GetFuncAddrVer(#func, symver)) 71 + diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc 72 + index 0a687f620..0852d97d7 100644 73 + --- a/lib/msan/msan_linux.cc 74 + +++ b/lib/msan/msan_linux.cc 75 + @@ -13,7 +13,7 @@ 76 + //===----------------------------------------------------------------------===// 77 + 78 + #include "sanitizer_common/sanitizer_platform.h" 79 + -#if SANITIZER_FREEBSD || SANITIZER_LINUX 80 + +#if SANITIZER_FREEBSD || SANITIZER_LINUX && !SANITIZER_NONGNU 81 + 82 + #include "msan.h" 83 + #include "msan_thread.h" 84 + diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc 85 + index 4ed9afedf..64f584e93 100644 86 + --- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc 87 + +++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc 88 + @@ -100,7 +100,7 @@ static void ioctl_table_fill() { 89 + _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz); 90 + #endif 91 + 92 + -#if SANITIZER_LINUX 93 + +#if SANITIZER_LINUX && !SANITIZER_NONGNU 94 + // Conflicting request ids. 95 + // _(CDROMAUDIOBUFSIZ, NONE, 0); 96 + // _(SNDCTL_TMR_CONTINUE, NONE, 0); 97 + @@ -361,7 +361,7 @@ static void ioctl_table_fill() { 98 + _(VT_WAITACTIVE, NONE, 0); 99 + #endif 100 + 101 + -#if SANITIZER_LINUX && !SANITIZER_ANDROID 102 + +#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU 103 + // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE 104 + _(CYGETDEFTHRESH, WRITE, sizeof(int)); 105 + _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); 106 + diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc 107 + index 469c8eb7e..24f87867d 100644 108 + --- a/lib/sanitizer_common/sanitizer_common_syscalls.inc 109 + +++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc 110 + @@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) { 111 + } 112 + } 113 + 114 + -#if !SANITIZER_ANDROID 115 + +#if !SANITIZER_ANDROID && !SANITIZER_NONGNU 116 + PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim, 117 + void *old_rlim) { 118 + if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz); 119 + diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc 120 + index f99f0b594..3a773a94e 100644 121 + --- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc 122 + +++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc 123 + @@ -152,7 +152,7 @@ bool SanitizerGetThreadName(char *name, int max_len) { 124 + #endif 125 + } 126 + 127 + -#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO 128 + +#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && !SANITIZER_NONGNU 129 + static uptr g_tls_size; 130 + 131 + #ifdef __i386__ 132 + @@ -180,11 +180,11 @@ void InitTlsSize() { 133 + } 134 + #else 135 + void InitTlsSize() { } 136 + -#endif // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO 137 + +#endif // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && !SANITIZER_NONGNU 138 + 139 + #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) \ 140 + || defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__)) \ 141 + - && SANITIZER_LINUX && !SANITIZER_ANDROID 142 + + && SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU 143 + // sizeof(struct pthread) from glibc. 144 + static atomic_uintptr_t kThreadDescriptorSize; 145 + 146 + @@ -338,7 +338,7 @@ uptr ThreadSelf() { 147 + 148 + #if !SANITIZER_GO 149 + static void GetTls(uptr *addr, uptr *size) { 150 + -#if SANITIZER_LINUX && !SANITIZER_ANDROID 151 + +#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU 152 + # if defined(__x86_64__) || defined(__i386__) || defined(__s390__) 153 + *addr = ThreadSelf(); 154 + *size = GetTlsSize(); 155 + @@ -364,7 +364,7 @@ static void GetTls(uptr *addr, uptr *size) { 156 + *addr = (uptr) dtv[2]; 157 + *size = (*addr == 0) ? 0 : ((uptr) segbase[0] - (uptr) dtv[2]); 158 + } 159 + -#elif SANITIZER_ANDROID 160 + +#elif SANITIZER_ANDROID || SANITIZER_NONGNU 161 + *addr = 0; 162 + *size = 0; 163 + #else 164 + @@ -375,7 +375,7 @@ static void GetTls(uptr *addr, uptr *size) { 165 + 166 + #if !SANITIZER_GO 167 + uptr GetTlsSize() { 168 + -#if SANITIZER_FREEBSD || SANITIZER_ANDROID 169 + +#if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NONGNU 170 + uptr addr, size; 171 + GetTls(&addr, &size); 172 + return size; 173 + diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h 174 + index d9a8e8df1..fe01c5744 100644 175 + --- a/lib/sanitizer_common/sanitizer_platform.h 176 + +++ b/lib/sanitizer_common/sanitizer_platform.h 177 + @@ -162,6 +162,13 @@ 178 + # define SANITIZER_PPC64V2 0 179 + #endif 180 + 181 + + 182 + +#if defined(__linux__) && !defined(__GLIBC__) 183 + +# define SANITIZER_NONGNU 1 184 + +#else 185 + +# define SANITIZER_NONGNU 0 186 + +#endif 187 + + 188 + // By default we allow to use SizeClassAllocator64 on 64-bit platform. 189 + // But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64 190 + // does not work well and we need to fallback to SizeClassAllocator32. 191 + diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h 192 + index 62875d11a..212e6e882 100644 193 + --- a/lib/sanitizer_common/sanitizer_platform_interceptors.h 194 + +++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h 195 + @@ -23,7 +23,7 @@ 196 + # define SI_NOT_WINDOWS 0 197 + #endif 198 + 199 + -#if SANITIZER_LINUX && !SANITIZER_ANDROID 200 + +#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU 201 + # define SI_LINUX_NOT_ANDROID 1 202 + #else 203 + # define SI_LINUX_NOT_ANDROID 0 204 + diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 205 + index 683f019d7..fd4880962 100644 206 + --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 207 + +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc 208 + @@ -14,6 +14,8 @@ 209 + 210 + #include "sanitizer_platform.h" 211 + 212 + +#define _LINUX_SYSINFO_H 213 + + 214 + #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC 215 + // Tests in this file assume that off_t-dependent data structures match the 216 + // libc ABI. For example, struct dirent here is what readdir() function (as 217 + @@ -139,12 +141,14 @@ typedef struct user_fpregs elf_fpregset_t; 218 + 219 + #if SANITIZER_LINUX && !SANITIZER_ANDROID 220 + #include <glob.h> 221 + -#include <obstack.h> 222 + +# if !SANITIZER_NONGNU 223 + +# include <obstack.h> 224 + +# endif 225 + #include <mqueue.h> 226 + -#include <net/if_ppp.h> 227 + -#include <netax25/ax25.h> 228 + -#include <netipx/ipx.h> 229 + -#include <netrom/netrom.h> 230 + +#include <linux/if_ppp.h> 231 + +#include <linux/ax25.h> 232 + +#include <linux/ipx.h> 233 + +#include <linux/netrom.h> 234 + #if HAVE_RPC_XDR_H 235 + # include <rpc/xdr.h> 236 + #elif HAVE_TIRPC_RPC_XDR_H 237 + @@ -160,7 +164,8 @@ typedef struct user_fpregs elf_fpregset_t; 238 + # include <sys/procfs.h> 239 + #endif 240 + #include <sys/user.h> 241 + -#include <sys/ustat.h> 242 + +// #include <sys/ustat.h> 243 + +#include <sys/statfs.h> 244 + #include <linux/cyclades.h> 245 + #include <linux/if_eql.h> 246 + #include <linux/if_plip.h> 247 + @@ -252,7 +257,7 @@ namespace __sanitizer { 248 + unsigned struct_itimerspec_sz = sizeof(struct itimerspec); 249 + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD 250 + 251 + -#if SANITIZER_LINUX && !SANITIZER_ANDROID 252 + +#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU 253 + unsigned struct_ustat_sz = sizeof(struct ustat); 254 + unsigned struct_rlimit64_sz = sizeof(struct rlimit64); 255 + unsigned struct_statvfs64_sz = sizeof(struct statvfs64); 256 + @@ -310,7 +315,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr)); 257 + unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); 258 + #endif 259 + 260 + -#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID 261 + +#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU 262 + int glob_nomatch = GLOB_NOMATCH; 263 + int glob_altdirfunc = GLOB_ALTDIRFUNC; 264 + #endif 265 + @@ -404,7 +409,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); 266 + unsigned struct_termios_sz = sizeof(struct termios); 267 + unsigned struct_winsize_sz = sizeof(struct winsize); 268 + 269 + -#if SANITIZER_LINUX 270 + +#if SANITIZER_LINUX && !SANITIZER_NONGNU 271 + unsigned struct_arpreq_sz = sizeof(struct arpreq); 272 + unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf); 273 + unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession); 274 + @@ -454,7 +459,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); 275 + unsigned struct_vt_mode_sz = sizeof(struct vt_mode); 276 + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD 277 + 278 + -#if SANITIZER_LINUX && !SANITIZER_ANDROID 279 + +#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU 280 + unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); 281 + unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); 282 + #if EV_VERSION > (0x010000) 283 + @@ -822,7 +827,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); 284 + unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE; 285 + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD 286 + 287 + -#if SANITIZER_LINUX && !SANITIZER_ANDROID 288 + +#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU 289 + unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; 290 + unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; 291 + unsigned IOCTL_CYGETMON = CYGETMON; 292 + @@ -985,7 +990,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr); 293 + CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum); 294 + #endif // SANITIZER_LINUX || SANITIZER_FREEBSD 295 + 296 + -#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID 297 + +#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU 298 + CHECK_TYPE_SIZE(glob_t); 299 + CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc); 300 + CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv); 301 + @@ -1019,6 +1024,7 @@ CHECK_TYPE_SIZE(iovec); 302 + CHECK_SIZE_AND_OFFSET(iovec, iov_base); 303 + CHECK_SIZE_AND_OFFSET(iovec, iov_len); 304 + 305 + +#if !SANITIZER_NONGNU 306 + CHECK_TYPE_SIZE(msghdr); 307 + CHECK_SIZE_AND_OFFSET(msghdr, msg_name); 308 + CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen); 309 + @@ -1032,6 +1038,7 @@ CHECK_TYPE_SIZE(cmsghdr); 310 + CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len); 311 + CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level); 312 + CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type); 313 + +#endif 314 + 315 + COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent)); 316 + CHECK_SIZE_AND_OFFSET(dirent, d_ino); 317 + @@ -1134,7 +1141,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno); 318 + 319 + CHECK_TYPE_SIZE(ether_addr); 320 + 321 + -#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID 322 + +#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU 323 + CHECK_TYPE_SIZE(ipc_perm); 324 + # if SANITIZER_FREEBSD 325 + CHECK_SIZE_AND_OFFSET(ipc_perm, key); 326 + @@ -1195,7 +1202,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr); 327 + CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data); 328 + #endif 329 + 330 + -#if SANITIZER_LINUX 331 + +#if SANITIZER_LINUX && !SANITIZER_NONGNU 332 + COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo)); 333 + #endif 334 + 335 + @@ -1245,7 +1252,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE); 336 + COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE); 337 + #endif 338 + 339 + -#if SANITIZER_LINUX && !SANITIZER_ANDROID 340 + +#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU 341 + COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE)); 342 + CHECK_SIZE_AND_OFFSET(FILE, _flags); 343 + CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr); 344 + @@ -1264,7 +1271,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain); 345 + CHECK_SIZE_AND_OFFSET(FILE, _fileno); 346 + #endif 347 + 348 + -#if SANITIZER_LINUX && !SANITIZER_ANDROID 349 + +#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU 350 + COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk)); 351 + CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit); 352 + CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev); 353 + diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc 354 + index 3313288a7..103c7b6b9 100644 355 + --- a/lib/tsan/rtl/tsan_platform_linux.cc 356 + +++ b/lib/tsan/rtl/tsan_platform_linux.cc 357 + @@ -287,7 +287,7 @@ void InitializePlatform() { 358 + // This is required to properly "close" the fds, because we do not see internal 359 + // closes within glibc. The code is a pure hack. 360 + int ExtractResolvFDs(void *state, int *fds, int nfd) { 361 + -#if SANITIZER_LINUX && !SANITIZER_ANDROID 362 + +#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU 363 + int cnt = 0; 364 + __res_state *statp = (__res_state*)state; 365 + for (int i = 0; i < MAXNS && cnt < nfd; i++) { 366 + -- 367 + 2.16.2 368 +