|
Bugzilla – Full Text Bug Listing |
| Summary: | GCC 11: spirv-tools package fails | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Martin Liška <martin.liska> |
| Component: | Basesystem | Assignee: | Jan Engelhardt <jengelh> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | ismail |
| 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 | ||
|
Description
Martin Liška
2021-02-06 11:23:11 UTC
(In reply to Martin Liška from comment #0) > The package fails here: > https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging: > Gcc7/spirv-tools/standard/x86_64 > > due to: > [ 18s] In function 'char* strncpy(char*, const char*, size_t)', > [ 18s] inlined from 'spv_diagnostic_t* > spvDiagnosticCreate(spv_position, const char*)' at > /home/abuild/rpmbuild/BUILD/SPIRV-Tools-2020.6/source/diagnostic.cpp:40:10: > [ 18s] /usr/include/bits/string_fortified.h:106:34: error: 'char* > __builtin_strncpy(char*, const char*, long unsigned int)' specified bound > depends on the length of the source argument [-Werror=stringop-overflow=] > [ 18s] 106 | return __builtin___strncpy_chk (__dest, __src, __len, > __bos (__dest)); > [ 18s] | > ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > [ 18s] > /home/abuild/rpmbuild/BUILD/SPIRV-Tools-2020.6/source/diagnostic.cpp: In > function 'spv_diagnostic_t* spvDiagnosticCreate(spv_position, const char*)': > [ 18s] > /home/abuild/rpmbuild/BUILD/SPIRV-Tools-2020.6/source/diagnostic.cpp:31:25: > note: length computed here > [ 18s] 31 | size_t length = strlen(message) + 1; > [ 18s] | ~~~~~~^~~~~~~~~ > [ 18s] cc1plus: all warnings being treated as errors strncpy works as intended here, this is a gcc bug https://gcc.gnu.org/bugzilla//show_bug.cgi?id=88059 This is an autogenerated message for OBS integration: This bug (1181882) was mentioned in https://build.opensuse.org/request/show/870832 Factory / spirv-tools >
> strncpy works as intended here, this is a gcc bug
> https://gcc.gnu.org/bugzilla//show_bug.cgi?id=88059
Yes, I must admit the warning has quite some false positivies. In this case,
length is used both for allocation of dest argument (which is strlen of message + 1).
Thank you for the workaround.
Fixed in devel project. (In reply to Martin Liška from comment #3) > > > > strncpy works as intended here, this is a gcc bug > > https://gcc.gnu.org/bugzilla//show_bug.cgi?id=88059 > > Yes, I must admit the warning has quite some false positivies. In this case, > length is used both for allocation of dest argument (which is strlen of > message + 1). > Thank you for the workaround. s/strncpy/strcpy is a bad workaround, though. Removing -Werror should be enough. This is an autogenerated message for OBS integration: This bug (1181882) was mentioned in https://build.opensuse.org/request/show/870954 Factory / spirv-tools Patch backed out. The issue still remains, can you please take a look? This is an autogenerated message for OBS integration: This bug (1181882) was mentioned in https://build.opensuse.org/request/show/879908 Factory / spirv-tools Fixed in devel project again. |