| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Fix a crash caused when running out of memory creating a | ||
| :mod:`!_interpchannels` channel. Now a :exc:`MemoryError` is correctly raised. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -354,7 +354,7 @@ clear_module_state(module_state *state) | |
| #define ERR_CHANNEL_INTERP_CLOSED -4 | ||
| #define ERR_CHANNEL_EMPTY -5 | ||
| #define ERR_CHANNEL_NOT_EMPTY -6 | ||
| #define ERR_CHANNEL_MUTEX_INIT -7 | ||
| #define ERR_CHANNEL_MUTEX_INIT -7 // currently unused | ||
| #define ERR_CHANNELS_MUTEX_INIT -8 | ||
| #define ERR_NO_NEXT_CHANNEL_ID -9 | ||
| #define ERR_CHANNEL_CLOSED_WAITING -10 | ||
| Expand Down Expand Up | @@ -427,10 +427,6 @@ handle_channel_error(int err, PyObject *mod, int64_t cid) | |
| "if not empty (try force=True)", | ||
| cid); | ||
| } | ||
| else if (err == ERR_CHANNEL_MUTEX_INIT) { | ||
| PyErr_SetString(state->ChannelError, | ||
| "can't initialize mutex for new channel"); | ||
| } | ||
| else if (err == ERR_CHANNELS_MUTEX_INIT) { | ||
| PyErr_SetString(state->ChannelError, | ||
| "can't initialize mutex for channel management"); | ||
| Expand Down Expand Up | @@ -1744,7 +1740,8 @@ channel_create(_channels *channels, struct _channeldefaults defaults) | |
| { | ||
| PyThread_type_lock mutex = PyThread_allocate_lock(); | ||
| if (mutex == NULL) { | ||
| return ERR_CHANNEL_MUTEX_INIT; | ||
| PyErr_NoMemory(); | ||
| return -1; | ||
| } | ||
| _channel_state *chan = _channel_new(mutex, defaults); | ||
| if (chan == NULL) { | ||
| Expand Down Expand Up | @@ -2938,7 +2935,7 @@ channelsmod_create(PyObject *self, PyObject *args, PyObject *kwds) | |
|
|
||
| int64_t cid = channel_create(&_globals.channels, defaults); | ||
| if (cid < 0) { | ||
| (void)handle_channel_error(-1, self, cid); | ||
| (void)handle_channel_error(cid, self, cid); | ||
|
Comment thread
Copy link
Copy Markdown
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIt causes a warning when compiling CPython using MSVC on Windows x64.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI will fix it, thanks for the report!
Sorry, something went wrong.
All reactions
|
||
| return NULL; | ||
| } | ||
| module_state *state = get_module_state(self); | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.