Bugzilla – Attachment 846080 Details for
Bug 1181869
GCC 11: libaio package fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Patch submitted upstream to fix this issue
0001-Fix-test-issue-with-gcc-11.patch (text/plain), 2.72 KB, created by
Lee Duncan
on 2021-02-12 16:42:30 UTC
(
hide
)
Description:
Patch submitted upstream to fix this issue
Filename:
MIME Type:
Creator:
Lee Duncan
Created:
2021-02-12 16:42:30 UTC
Size:
2.72 KB
patch
obsolete
>From 2e2df08a2dd7111fe5479fa9742df1d85c54d9d9 Mon Sep 17 00:00:00 2001 >From: Lee Duncan <lduncan@suse.com> >Date: Thu, 11 Feb 2021 11:34:42 -0800 >Subject: [PATCH] Fix test issue with gcc-11 >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test 3.t exercises io_submit() with invalid addresses, >and one test attempted to pass in "-1" as an invalid >pointer. But gcc-11 realizes you cannot take an offset >from an invalid pointer, making it impossible to >compile or run this test: > >> sh# make CC=gcc-11 partcheck >> make[1]: Entering directory '/alt/public_software/libaio/src' >> make[1]: Nothing to be done for 'all'. >> make[1]: Leaving directory '/alt/public_software/libaio/src' >> make[1]: Entering directory '/alt/public_software/libaio/harness' >> gcc-11 -Wall -Werror -I../src -g -O2 -DTEST_NAME=\"cases/2.t\" -o cases/2.p main.c ../src/libaio.a -lpthread >> gcc-11 -Wall -Werror -I../src -g -O2 -DTEST_NAME=\"cases/3.t\" -o cases/3.p main.c ../src/libaio.a -lpthread >> In file included from main.c:24: >> cases/3.t: In function âtest_mainâ: >> cases/3.t:18:19: error: âattempt_io_submitâ accessing 8 bytes in a region of size 0 [-Werror=stringop-overflow=] >> 18 | status |= attempt_io_submit( io_ctx, 1, (void *)-1, -EFAULT); >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> cases/3.t:18:19: note: referencing argument 3 of type âstruct iocb **â >> In file included from cases/3.t:5, >> from main.c:24: >> cases/aio_setup.h:15:5: note: in a call to function âattempt_io_submitâ >> 15 | int attempt_io_submit(io_context_t ctx, long nr, struct iocb *ios[], int expect) >> | ^~~~~~~~~~~~~~~~~ >> cc1: all warnings being treated as errors >> make[1]: *** [Makefile:19: cases/3.p] Error 1 >> make[1]: Leaving directory '/alt/public_software/libaio/harness' >> make: *** [Makefile:23: partcheck] Error 2 > >The fix is to remove this one test case, since the compiler now >ensures the running code will never see this case. > >Signed-off-by: Lee Duncan <leeman.duncan@gmail.com> >--- > harness/cases/3.t | 1 - > 1 file changed, 1 deletion(-) > >diff --git a/harness/cases/3.t b/harness/cases/3.t >index 7773d80f0665..ba669a6494ce 100644 >--- a/harness/cases/3.t >+++ b/harness/cases/3.t >@@ -15,7 +15,6 @@ int test_main(void) > status |= attempt_io_submit(BAD_CTX, 1, good_ios, -EINVAL); > status |= attempt_io_submit( io_ctx, 0, good_ios, 0); > status |= attempt_io_submit( io_ctx, 1, NULL, -EFAULT); >- status |= attempt_io_submit( io_ctx, 1, (void *)-1, -EFAULT); > status |= attempt_io_submit( io_ctx, 2, bad1_ios, -EFAULT); > status |= attempt_io_submit( io_ctx, 2, bad2_ios, -EFAULT); > status |= attempt_io_submit( io_ctx, -1, good_ios, -EINVAL); >-- >2.30.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 1181869
: 846080