bin/181152: %i fails with negative hex numbers with sscanf

看板FB_bugs作者時間12年前 (2013/08/09 08:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
>Number: 181152 >Category: bin >Synopsis: %i fails with negative hex numbers with sscanf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 09 00:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 10-CURRENT >Organization: EMC Isilon >Environment: FreeBSD fuji-current.local 10.0-CURRENT FreeBSD 10.0-CURRENT #10 c9d2bd6-dirty: Wed Aug 7 18:55:03 PDT 2013 root@fuji-current.local:/usr/obj/usr/src/sys/FUJI-NOCOMPAT i386 >Description: Looks like FreeBSD has lib/21691: sscanf_neghex: [0.001912s] Failed: /usr/src/lib/libc/tests/stdio/t_scanf.c:50: i == NUM not met The snippet of test code that exhibits this is: #define NUM -0x1234 #define STRNUM __STRING(NUM) ATF_TC(sscanf_neghex); ATF_TC_HEAD(sscanf_neghex, tc) { atf_tc_set_md_var(tc, "descr", "PR lib/21691: %%i and %%x fail with negative hex numbers"); } ATF_TC_BODY(sscanf_neghex, tc) { int i; sscanf(STRNUM, "%i", &i); ATF_REQUIRE(i == NUM); sscanf(STRNUM, "%x", &i); ATF_REQUIRE(i == NUM); } >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
文章代碼(AID): #1I13Y3K_ (FB_bugs)
文章代碼(AID): #1I13Y3K_ (FB_bugs)