Bug 1181869

Summary: GCC 11: libaio package fails
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Liška <martin.liska>
Component: BasesystemAssignee: Lee Duncan <lduncan>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: martin.liska
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1181859    
Attachments: Patch submitted upstream to fix this issue

Description Martin Liška 2021-02-06 11:09:37 UTC
Fails here:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/libaio/standard/x86_64

with:
[   13s] cases/3.t: In function 'test_main':
[   13s] cases/3.t:18:19: error: 'attempt_io_submit' accessing 8 bytes in a region of size 0 [-Werror=stringop-overflow=]
[   13s]    18 |         status |= attempt_io_submit( io_ctx, 1, (void *)-1, -EFAULT);
[   13s]       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[   13s] cases/3.t:18:19: note: referencing argument 3 of type 'struct iocb **'
[   13s] In file included from cases/3.t:5,
[   13s]                  from main.c:24:
[   13s] cases/aio_setup.h:15:5: note: in a call to function 'attempt_io_submit'
[   13s]    15 | int attempt_io_submit(io_context_t ctx, long nr, struct iocb *ios[], int expect)
[   13s]       |     ^~~~~~~~~~~~~~~~~
Comment 1 Hannes Reinecke 2021-02-10 14:28:20 UTC
Lee, can you have look here?
Comment 2 Lee Duncan 2021-02-11 16:30:09 UTC
I can reproduce the issue on Tumbleweed if I install gcc-11 then set CC=gcc-11, on the upstream code.

So I will work with upstream to fix this.

Martin, do you need a workaround in the mean time?
Comment 3 Martin Liška 2021-02-11 16:32:32 UTC
> Martin, do you need a workaround in the mean time?

No, we have plenty of time (a couple of months) :)
Comment 4 Lee Duncan 2021-02-12 16:42:30 UTC
Created attachment 846080 [details]
Patch submitted upstream to fix this issue

Adding the patch I submitted upstream to address this issue. Note that they may take a different approach upstream, but this patch certainly fixes the broken compilation.
Comment 5 Lee Duncan 2021-02-16 15:53:43 UTC
Upstream fix was done in the Makefile, not in the test source code file, as was done in my attachment. So don't use that attachment.

The upstream fix was accepted, and now has been submitted to Factory.
Comment 6 Martin Liška 2021-02-16 15:54:48 UTC
Thank you for the fix.