From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 20BF13858C50; Mon, 5 Jun 2023 21:56:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20BF13858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1686002166; bh=TquVl50b8jePq08mOTh4PCAKT5B0VdVbjMKtGt3MqQo=; h=From:To:Subject:Date:From; b=EyCWT8UHb6BR6I6WmIzMP/kaVEy+cRmV3HSNR1u1bk5bvDcBRAWQbuiKqPepBCYnG arXmkvBnLMh9JAktHVvneChxKv6nhZJN6cE4CpSApvY513VwkN3f8i2N9vpN6bdBha 0bBdWMhhQoxpE4gQ5IOkHKI/7kk3vyCKPUygbAVw= From: "ayzhao at google dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/30516] New: realpath() implementation has a C++ ODR violation Date: Mon, 05 Jun 2023 21:56:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.39 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ayzhao at google dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30516 Bug ID: 30516 Summary: realpath() implementation has a C++ ODR violation Product: glibc Version: 2.39 Status: UNCONFIRMED Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: ayzhao at google dot com CC: drepper.fsp at gmail dot com Target Milestone: --- In stdlib/bits/stdlib.h, realpath is implemented as an inline function whose definition changes depending on whether or not limits.h was included first before stdlib.h [0]. In C++, this leads to an ODR violation if, for example, one translation unit includes stdlib.h and another translation unit includes limit.h and stdlib.h. [0]: https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dstdlib/bits/stdlib.h= ;h=3Dc6c0082ad5b5fe0a9714326051f19818dedd5e11;hb=3DHEAD#l44 --=20 You are receiving this mail because: You are on the CC list for the bug.=