From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14392 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andrew Bell Newsgroups: gmane.linux.lib.musl.general Subject: open64 and similar Date: Wed, 10 Jul 2019 18:03:51 -0400 Message-ID: Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000eabce1058d5ada3f" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="15452"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-14408-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jul 11 00:04:17 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1hlKhF-0003rM-PK for gllmg-musl@m.gmane.org; Thu, 11 Jul 2019 00:04:17 +0200 Original-Received: (qmail 3460 invoked by uid 550); 10 Jul 2019 22:04:15 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3424 invoked from network); 10 Jul 2019 22:04:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Ao9Av1AQUlaO2hyIhCaIUIIUMkrN5PPMnnah9ycCs8E=; b=WTn9Y/P8bL5mPkYtEqZIzBHFwS5LcghRDo/Idz15Sy2p3OkRkdqmOQd9Yuu5oLBS7/ MHIm3jQ1xTm1mZAy2aMdqhPVGY/BitGViiFrHdSS0cRIaOwdSXboraA/A56wRJtM9f/v 7a0/hOVBfvHudcrx7p3jts3Xtw7QvHkRKvtBqaU9k5O3gQEjiaawjNHAN8bRz96ln4qT x7TS/I46lTluV8hYMp4f6W2LhWP1uO22VgdNqAYL/OxlrjzMrfBucKCa9ZJ4t9V70RYZ +ydrMmDFnXN7H9c2eAmzbM4EML4AvAgNrX9ARXUw/mKqyj74qloTiAZfOwbaJUd+vYu/ vrWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Ao9Av1AQUlaO2hyIhCaIUIIUMkrN5PPMnnah9ycCs8E=; b=n36cBU1IGZfjoYBkOAFazfgGPLi2tQ9/EG7LW/4y0Sk8kxr9YHfZaIgG7+iDqojDVc H7D7aQzTBybG4scAdyRfSrjP05BMI0WFG9DXg/aQjETu0RxqRc2SfbG6o6yo1YyFwCx4 54cQJ9Zv+YoIB70pXsQ8R3It1lwx7MsgCdGavKX5fur9AsPV7vDHmPSMFteXxhUgkW/b XqHw1K6SnV54CKGH+gUmTIe6PqZcxHZDy/DciwIN4RIu57SrzLWTDrvZ4FpzJznJXht/ HzHQwyhmyT6PUZg/IjYVG2cU6mnhLA5JVM1nyALb5+gyQs1MqX/eeJFu2ockqTfZ8SQe cj+g== X-Gm-Message-State: APjAAAX3UeVap6kFLw39m7+yy3zZpWUHPyTpCReymhb8FZjKEH0EDsFh 3xwOzkIBlaonEhRYTyrqCuHIMataMbrOSgRuujLjCw== X-Google-Smtp-Source: APXvYqxE4oKOXnYbu7N8WzFUw9nr2EWC02ebbE85TAdh9ofUCkyyS2kiE2WS2aCa0/ghvpyWDfqMx6tufd/T4oAsSOM= X-Received: by 2002:a25:5ac6:: with SMTP id o189mr62989ybb.117.1562796242941; Wed, 10 Jul 2019 15:04:02 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:14392 Archived-At: --000000000000eabce1058d5ada3f Content-Type: text/plain; charset="UTF-8" musl does the following: #define open64 open This can cause an infinite loop for the following code: class Foo { public: int open64() { open(); } }; Perhaps it would be better to supply open64 and have it call open, rather than #define it? There are several other xxx64 functions also defined that could cause problems with unfortunate code. -- Andrew Bell andrew.bell.ia@gmail.com --000000000000eabce1058d5ada3f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
musl does the following:

#define open64= open

This can cause an infinite loop for the foll= owing code:

class Foo
{
public= :
=C2=A0 int open64()
=C2=A0 =C2=A0 {=C2=A0 open(); }
};

Perhaps it would be better to supply o= pen64 and have it call open, rather than #define it?=C2=A0 There are severa= l other xxx64 functions also defined that could cause problems with unfortu= nate code.
--000000000000eabce1058d5ada3f--