{"id":808148,"url":"http://patchwork.ozlabs.org/api/1.2/patches/808148/?format=json","web_url":"http://patchwork.ozlabs.org/project/glibc/patch/20170831095213.42A4F43994318@oldenburg.str.redhat.com/","project":{"id":41,"url":"http://patchwork.ozlabs.org/api/1.2/projects/41/?format=json","name":"GNU C Library","link_name":"glibc","list_id":"libc-alpha.sourceware.org","list_email":"libc-alpha@sourceware.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170831095213.42A4F43994318@oldenburg.str.redhat.com>","list_archive_url":null,"date":"2017-08-31T09:52:13","name":"malloc: Use compat_symbol_reference in libmcheck [BZ #22050]","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"1266563bbe05c34282644d8d7c75e10fea8a54cf","submitter":{"id":14312,"url":"http://patchwork.ozlabs.org/api/1.2/people/14312/?format=json","name":"Florian Weimer","email":"fweimer@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/glibc/patch/20170831095213.42A4F43994318@oldenburg.str.redhat.com/mbox/","series":[{"id":780,"url":"http://patchwork.ozlabs.org/api/1.2/series/780/?format=json","web_url":"http://patchwork.ozlabs.org/project/glibc/list/?series=780","date":"2017-08-31T09:52:13","name":"malloc: Use compat_symbol_reference in libmcheck [BZ #22050]","version":1,"mbox":"http://patchwork.ozlabs.org/series/780/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/808148/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/808148/checks/","tags":{},"related":[],"headers":{"Return-Path":"<libc-alpha-return-83901-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-83901-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"uivI9ti9\"; dkim-atps=neutral","sourceware.org; auth=none","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx03.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=fweimer@redhat.com"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjd2p2RdYz9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 19:52:34 +1000 (AEST)","(qmail 24225 invoked by alias); 31 Aug 2017 09:52:26 -0000","(qmail 24183 invoked by uid 89); 31 Aug 2017 09:52:25 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:to:subject:mime-version:content-type\n\t:content-transfer-encoding:message-id:from; q=dns; s=default; b=\n\tHzFvBQ0qjPs6+wHS6oI8frim4W/Cp2QD5HEWaofHTGBvzmTix7QbveIQ1CDDhJBT\n\tf8B1BKUH64g8tqRKayt0nLjjReVsghpkf+6kmJZYVZvZBhnwwUmJX4t+HKLsaZ8Q\n\tayJ1pXVcVeLV9mt5fZfdtYbdzU6sin+pqb6m9SWc7Gc=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:to:subject:mime-version:content-type\n\t:content-transfer-encoding:message-id:from; s=default; bh=DpHAvK\n\tUPd3a3jVkP2DxKdo27sx0=; b=uivI9ti9D9t1/BtCXbmSj+3HMz9sKurrAwSenm\n\tThVKOjoACp8X2/KB6EOugMPQZay0I/MBad9CNp4e7nFoKsvmZxWmM1B0w3H48nJA\n\tJ19VYrjYfzdUTiSX5qz6ZViDxWEWOrvAnkubhJcehCmrmd7V5rw5yqT4bwVwJgLT\n\tOCHq8=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD,\n\tSPF_HELO_PASS autolearn=ham version=3.3.2 spammy=","X-HELO":"mx1.redhat.com","DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 34FB97E439","Date":"Thu, 31 Aug 2017 11:52:13 +0200","To":"libc-alpha@sourceware.org","Subject":"[PATCH] malloc: Use compat_symbol_reference in libmcheck [BZ #22050]","User-Agent":"Heirloom mailx 12.5 7/5/10","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Transfer-Encoding":"7bit","Message-Id":"<20170831095213.42A4F43994318@oldenburg.str.redhat.com>","From":"fweimer@redhat.com (Florian Weimer)"},"content":"Since glibc 2.24, __malloc_initialize_hook is a compat symbol.  As a\nresult, the link editor does not export a definition of\n__malloc_initialize_hook from the main program, so that it no longer\ninterposes the variable definition in libc.so.  Specifying the symbol\nversion restores the exported symbol.\n\n2017-08-31  Florian Weimer  <fweimer@redhat.com>\n\n\t[BZ #22050]\n\t* malloc/mcheck-init.c (__malloc_initialize_hook): Use\n\tcompat_symbol_reference to access non-default version.","diff":"diff --git a/malloc/mcheck-init.c b/malloc/mcheck-init.c\nindex 6d2492ef7e..4ebfa868ea 100644\n--- a/malloc/mcheck-init.c\n+++ b/malloc/mcheck-init.c\n@@ -20,6 +20,7 @@\n \n #include <malloc.h>\n #include <mcheck.h>\n+#include <shlib-compat.h>\n \n static void\n turn_on_mcheck (void)\n@@ -28,3 +29,7 @@ turn_on_mcheck (void)\n }\n \n void (*__malloc_initialize_hook) (void) = turn_on_mcheck;\n+/* Slight abuse of compat_symbol_reference because the above is not a\n+   reference, but actually a definition.  */\n+compat_symbol_reference (libc, __malloc_initialize_hook,\n+                         __malloc_initialize_hook, GLIBC_2_0);\n","prefixes":[]}