[CONC-672] my_auth.c:153:5: error: 'strncpy' output may be truncated copying Created: 2023-10-17 Updated: 2023-10-26 Resolved: 2023-10-20 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | Build |
| Affects Version/s: | 3.1, 3.3 |
| Fix Version/s: | 3.1.23, 3.3.8 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Roel Van de Paar | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | compilation | ||
| Description |
|
When building optimized ASAN builds, using GCC 11.4:
May be present in other versions too. |
| Comments |
| Comment by Roel Van de Paar [ 2023-10-17 ] | ||||||||||||||||||||||||||||||
|
Debugging done so far:
| ||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2023-10-19 ] | ||||||||||||||||||||||||||||||
|
georg I had a similar warning/error in 3.1 with gcc 13.2.1_p20230826:
so if you want to disable stringop-truncation or -Werror, please, do it in 3.1 and merge up. | ||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2023-10-26 ] | ||||||||||||||||||||||||||||||
|
Was the -Werror actually removed? There still are build failures on SLES 12 s390x. Check the latest 10.6, example 1 and example 2:
For other files, no -Werror will be set, and the bogus warnings will be ignored just fine:
I don’t think that there is any code bug to fix here; the old compiler is issuing a bogus warning because for some reason it does not recognize the /* fall through */ comments. | ||||||||||||||||||||||||||||||