Issue36365
Created on 2019-03-19 14:57 by vstinner, last changed 2019-03-19 23:32 by vstinner. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12440 | merged | vstinner, 2019-03-19 14:58 | |
| PR 12451 | merged | vstinner, 2019-03-19 23:15 | |
| Messages (3) | |||
|---|---|---|---|
| msg338361 - (view) | Author: STINNER Victor (vstinner) * | Date: 2019-03-19 14:57 | |
Warning seen on Fedora 29 with GCC 8.3.1 20190223 (Red Hat 8.3.1-2): Objects/structseq.c: In function 'structseq_repr': Objects/structseq.c:187:5: warning: 'strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=] strncpy(pbuf, typ->tp_name, len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Objects/structseq.c:185:11: note: length computed here len = strlen(typ->tp_name) > TYPE_MAXSIZE ? TYPE_MAXSIZE : ^~~~~~~~~~~~~~~~~~~~ Attached PR rewrites structseq_repr() using _PyUnicodeWriter for better performance and remove the arbitrary limit of 512 bytes. |
|||
| msg338416 - (view) | Author: STINNER Victor (vstinner) * | Date: 2019-03-19 23:05 | |
New changeset c70ab02df2894c34da2223fc3798c0404b41fd79 by Victor Stinner in branch 'master': bpo-36365: Rewrite structseq_repr() using _PyUnicodeWriter (GH-12440) https://github.com/python/cpython/commit/c70ab02df2894c34da2223fc3798c0404b41fd79 |
|||
| msg338419 - (view) | Author: STINNER Victor (vstinner) * | Date: 2019-03-19 23:32 | |
New changeset ea3592d7ef6308bf9f6c7d86556f9b36f5ca0060 by Victor Stinner in branch '3.7': bpo-36365: Fix compiler warning in structseq.c (GH-12451) https://github.com/python/cpython/commit/ea3592d7ef6308bf9f6c7d86556f9b36f5ca0060 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2019-03-19 23:32:21 | vstinner | set | messages: + msg338419 |
| 2019-03-19 23:15:24 | vstinner | set | pull_requests: + pull_request12405 |
| 2019-03-19 23:06:20 | vstinner | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-03-19 23:05:55 | vstinner | set | messages: + msg338416 |
| 2019-03-19 14:58:53 | vstinner | set | keywords:
+ patch stage: patch review pull_requests: + pull_request12395 |
| 2019-03-19 14:57:37 | vstinner | create | |