From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10893 Path: news.gmane.org!.POSTED!not-for-mail From: "Anthony G. Basile" Newsgroups: gmane.linux.lib.musl.general Subject: bug in getopt_long() Date: Thu, 5 Jan 2017 11:00:52 -0500 Message-ID: <61d0bce5-f14a-11d8-022b-a65ff2f5524a@freeharbor.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------B0FD66AC7CD934A923F39467" X-Trace: blaine.gmane.org 1483632080 29234 195.159.176.226 (5 Jan 2017 16:01:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2017 16:01:20 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 To: musl@lists.openwall.com Original-X-From: musl-return-10906-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jan 05 17:01:15 2017 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.84_2) (envelope-from ) id 1cPATQ-0005t9-J9 for gllmg-musl@m.gmane.org; Thu, 05 Jan 2017 17:01:04 +0100 Original-Received: (qmail 1657 invoked by uid 550); 5 Jan 2017 16:01:06 -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 1608 invoked from network); 5 Jan 2017 16:01:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=freeharbor.net; s=mail; t=1483632052; bh=lTEjuEjLiOVX7LGqX1fkgeYSSocSruC00VnrcmuiKt0=; h=To:From:Subject:Date; b=LjcRKOhouj38DeNWHIHPKfO6KEmcADSvTFbaOZ6h1QT2c4/kkaffhaAKromyANVhc 7C0o2H9F062HFNUcrqEs/ft9Xg/TwP8DABjUeLMwHwWk1/GZX6tsRBAcID+c86kGTJ nWDu1M22r+jhlJivOYiTFW30MQyAuaEfc1xpDobU= Xref: news.gmane.org gmane.linux.lib.musl.general:10893 Archived-At: This is a multi-part message in MIME format. --------------B0FD66AC7CD934A923F39467 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, We hit a bug in Gentoo with getopt_long(). It appears the alpine people hit it too http://bugs.alpinelinux.org/issues/4802. The problem was encountered in open-iscsi but I got some reduced code which I've attached. If you build and run that code as `./test --portal 10.144.0.14 --discover` then you get p D unrecognized character 'D' On a glibc system, you don't get the "unrecognized character 'D'" which is what we'd expect. Rich suggested a patch to musl which looked like it might work, but it didn't. I didn't investigate further. I'm just reporting it first to see if others know what's up. -- Anthony G. Basile, Ph.D. Gentoo Linux Developer [Hardened] E-Mail : basile@freeharbor.net GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA GnuPG ID : F52D4BBA --------------B0FD66AC7CD934A923F39467 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="test.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.c" I2luY2x1ZGUgPGdldG9wdC5oPgojaW5jbHVkZSA8c3RkaW8uaD4KCnN0YXRpYyBzdHJ1Y3Qg b3B0aW9uIGNvbnN0IGxvbmdfb3B0aW9uc1tdID0KewogICAgeyJwb3J0YWwiLCByZXF1aXJl ZF9hcmd1bWVudCwgTlVMTCwgJ3AnfSwKICAgIHsiZGlzY292ZXIiLCBub19hcmd1bWVudCwg TlVMTCwgJ0QnfSwKICAgIHtOVUxMLCAwLCBOVUxMLCAwfSwKfTsKCnN0YXRpYyBjaGFyICpz aG9ydF9vcHRpb25zID0gIkRwOiI7CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqKmFyZ3Yp CnsKICAgIGludCBjaCwgbG9uZ2luZGV4OwogICAgb3B0b3B0ID0gMDsKICAgIHdoaWxlICgo Y2ggPSBnZXRvcHRfbG9uZyhhcmdjLCBhcmd2LCBzaG9ydF9vcHRpb25zLCBsb25nX29wdGlv bnMsICZsb25naW5kZXgpKSA+PSAwKSB7CiAgICAgICAgc3dpdGNoIChjaCkgewogICAgICAg IGNhc2UgJ0QnOgogICAgICAgICAgICBwcmludGYoIkRcbiIpOwogICAgICAgICAgICBicmVh azsKICAgICAgICBjYXNlICdwJzoKICAgICAgICAgICAgcHJpbnRmKCJwXG4iKTsKICAgICAg ICB9CiAgICB9CgogICAgaWYgKG9wdG9wdCkKICAgICAgICBwcmludGYoInVucmVjb2duaXpl ZCBjaGFyYWN0ZXIgJyVjJ1xuIiwgb3B0b3B0KTsKfQo= --------------B0FD66AC7CD934A923F39467--