From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 13DDA1F463 for ; Sat, 14 Dec 2019 08:45:52 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:cc:message-id:date :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=fHXHQwYIslALISFPR2nonNA7jEkP6uIuxzz2lI0hHpHxWQ1ABnI4M e2UmqRfRRY82RFfKrdXO3+uTNhn9+cA7Br0TEyXBipW6jVna944SQiEslopNLTC+ ML5mRNohkrBspPV7HZf5zCOMA7pFgSR2fNW2idsmN7YPhquKrDD2v4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:cc:message-id:date :mime-version:content-type:content-transfer-encoding; s=default; bh=OwIOURmZFAflsrDdSqnu1NLqJBw=; b=nIcgUN7tt6Ajbixz7p5NXtr/q36A wH7DOPgvwFRO81E44e6vFiYVjmw6aYfAu3Y2Eq+n1tTer1S/QxuTRyZyhzqOsO/X imHa4Mcoxs21HLWI1sbeEx3g0EDmTZwnpmqfNIWM12cBRNLIqIHZlsBC/yG6YVaQ kVszBqj0Y2ChVOM= Received: (qmail 27022 invoked by alias); 14 Dec 2019 08:45:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 26912 invoked by uid 89); 14 Dec 2019 08:45:40 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: huawei.com To: , Florian Weimer , "Carlos O'Donell" From: liqingqing Subject: [discuss] iconv: what's the purpose of the mtrace in the tst-iconv2.c CC: Hushiyuan , Liusirui Message-ID: Date: Sat, 14 Dec 2019 16:44:50 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit I am working on the test of iconv feel confused with this test case tst-iconv2.c, because this function use mtrace, but i don't know what is the exactly purpose. what i want to do is removing the mtrace function but i'm not sure. static int do_test (void) { char buf[3]; const wchar_t wc[1] = L"a"; iconv_t cd; char *inptr; size_t inlen; char *outptr; size_t outlen; size_t n; int e; int result = 0; mtrace ();//does test case want test memory leak? cd = iconv_open ("UCS4", "WCHAR_T"); if (cd == (iconv_t) -1) { printf ("cannot convert from wchar_t to UCS4: %m\n"); exit (1); } inptr = (char *) wc; inlen = sizeof (wchar_t); outptr = buf; outlen = 3; n = iconv (cd, &inptr, &inlen, &outptr, &outlen); e = errno;