From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by sourceware.org (Postfix) with ESMTPS id 2F2403857C40 for ; Wed, 12 Aug 2020 11:23:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2F2403857C40 Received: by mail-qv1-xf2b.google.com with SMTP id l13so797892qvt.10 for ; Wed, 12 Aug 2020 04:23:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=xIgWlBs6c1P8iFLKOZ4Cv7CxvnmyJZQXmmuPVty5wQ8=; b=UDb/x5ysCppg9tTY7JMhwCY1OhkNgnqnJQpaLsiBQFya2zFEkyrQu/PmrzmKGzroTJ O4XKUI9BkPTKlWumNycA8ffEOVGM1FRluz9cE22mKE4OYvZVppW5awdwxSJFeG9xnGWs O5I1aGBaPoYNiUAc0ZOUfN5IC1CdGzSsPmjw6he/yaqV+gEMOc/rlg8pNw8orerjSLSW afmQk1ckOEAata3wmlwvjykAEwkcJb//Y4weVD82KiX49G01Jsaboh1aVpdj53JuoO77 WTf5czYQjlVEktFk8yoUsuqzmcSLfD3kK7RGAsjHxNbZIobbPnsRdrM/qPu8NngG9u6a 6ecQ== X-Gm-Message-State: AOAM532FpExCUhOOF5fjE+AGLz9L8R0dsXMQdLkSwr01muKySXUTxcuW PxtOcbgYVOLunOQ0J87uQaZEd2oWSjdRDFDgRH4= X-Google-Smtp-Source: ABdhPJwQdKfG8R/Pp8roryrOyM1XoLK+wpxHmMpdaEF8tT/BMbahFUQYi5jHn+XRojb2QNvDNDr0Qz7zm+BEw4Ppx40= X-Received: by 2002:a0c:e981:: with SMTP id z1mr6175197qvn.15.1597231391661; Wed, 12 Aug 2020 04:23:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?5a2Z5LiW6b6ZIHN1bnNoaWxvbmc=?= Date: Wed, 12 Aug 2020 19:23:00 +0800 Message-ID: Subject: Re: Is realloc(3) permitted to fail when shrinking a block? To: Jonathan Wakely Cc: Dan Kegel , gcc-help Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2020 11:23:13 -0000 >This mailing list is about GCC, not general C programming. The realloc >function is not part of GCC. Sorry, I didn't notice it. I took it granted that libc is part of the GCC since there is a folder named "libstdc++" in the Github of GCC(i.e. https://github.com/gcc-mirror/gcc/tree/master/libstdc%2B%2B-v3). One more question arises, why there is no library for libc whereas libstdc++ is provided by GCC? Thank you for your attention to this matter. On Tue, Aug 11, 2020 at 3:22 PM Jonathan Wakely wro= te: > > On Tue, 11 Aug 2020 at 07:39, =E5=AD=99=E4=B8=96=E9=BE=99 sunshilong via = Gcc-help > wrote: > > > > Thank you for your reply. > > > > >If the heap's corrupt, yes, it can fail... > > Could you please explain that in more detail? > > This mailing list is about GCC, not general C programming. The realloc > function is not part of GCC.