Issue 28480: Compile error on Modules/socketmodule.c (original) (raw)

Created on 2016-10-19 23:27 by masamoto, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
socketmodule-behind-label.patch masamoto,2016-10-19 23:27 review
Pull Requests
URL Status Linked Edit
PR 552 closed dstufft,2017-03-31 16:36
Messages (6)
msg279000 - (view) Author: Masayuki Yamamoto (masamoto) * Date: 2016-10-19 23:27
_socket module has failed to compile with --without-threads flag since 554fb699af8c, because Py_END_ALLOW_THREADS macro exists behind the done label ( Modules/socketmodule.c:666 ). If --without-threads flag goes on, Py_END_ALLOW_THREADS macro replaces to just right curly bracket. Therefore, between label and end of block have no statements. There needs meaningless statement (e.g. result = result;) to avoid compile error. I wrote a one line patch as a test.
msg279002 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-10-19 23:37
Thanks for the report and patch. I think an empty statement might be better than the dummy assignment. Let me know if the following would work and I will commit it: done: + ; /* necessary for --without-threads flag */ Py_END_ALLOW_THREADS
msg279003 - (view) Author: Masayuki Yamamoto (masamoto) * Date: 2016-10-19 23:44
Oh, that's enough to work, Martin. I confirmed too.
msg279010 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-10-20 03:57
New changeset 17629dee23ca by Martin Panter in branch '2.7': Issue #28480: Avoid label at end of compound statement --without-threads https://hg.python.org/cpython/rev/17629dee23ca
msg279015 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-10-20 05:31
New changeset 9316b4ebf3fa by Martin Panter in branch '3.6': Issue #28480: Avoid label at end of compound statement --without-threads https://hg.python.org/cpython/rev/9316b4ebf3fa New changeset 7cb86d404866 by Martin Panter in branch '3.6': Issue #28480: Adjust or skip tests if multithreading is disabled https://hg.python.org/cpython/rev/7cb86d404866 New changeset 948cf38793ce by Martin Panter in branch 'default': Issue #28480: Merge multithreading fixes from 3.6 https://hg.python.org/cpython/rev/948cf38793ce
msg279019 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-10-20 07:44
I also committed a similar but independent fix in Python 2.7 building Modules/_sqlite/connection.c, caused by revision 649937bb8f1c, and adjusted some tests to work when multithreading is disabled. For the record, I also opened Issue 28482, Issue 28484 and Issue 28485 about other test suite failures identified when multithreading is disabled.
History
Date User Action Args
2022-04-11 14:58:38 admin set github: 72666
2017-03-31 16:36:18 dstufft set pull_requests: + <pull%5Frequest921>
2016-10-20 07:44:03 martin.panter set status: open -> closedversions: + Python 2.7messages: + resolution: fixedstage: patch review -> resolved
2016-10-20 05:31:10 python-dev set messages: +
2016-10-20 03:57:48 python-dev set nosy: + python-devmessages: +
2016-10-19 23:44:24 masamoto set messages: +
2016-10-19 23:37:28 martin.panter set nosy: + martin.pantermessages: + stage: patch review
2016-10-19 23:27:58 masamoto create