Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-40334: Improvements to error-handling code in the PEG parser#20003

New issue

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
pablogsal merged 5 commits intopython:masterfromlysnikolaou:error-improvements
May 17, 2020

Conversation

lysnikolaou
Copy link
Member

@lysnikolaoulysnikolaou commentedMay 8, 2020
edited by bedevere-bot
Loading

Following improvements are implemented in this PR:

  • p->error_indicator is set, in case malloc or realloc fail
  • Avoid memory leaks in the case that realloc fails
  • CallPyErr_NoMemory() instead ofPyErr_Format(), because it
    requires no memory

https://bugs.python.org/issue40334

Following improvements are implemented in this PR:- `p->error_indicator` is set, in case malloc or realloc fail- Avoid memory leaks in the case that realloc fails- Call `PyErr_NoMemory()` instead of `PyErr_Format()`, because it  requires no memory.
@lysnikolaou
Copy link
MemberAuthor

Note to self: This partially conflicts with#19987, so will probably need to merge master after that's landed.

@lysnikolaoulysnikolaou requested review frompablogsal andgvanrossum and removed request forgvanrossum andpablogsalMay 11, 2020 15:22
@pablogsal
Copy link
Member

pablogsal commentedMay 11, 2020
edited
Loading

  • p->error_indicator is set, in case malloc or realloc fail

Do we need to do this? As soon as the rule returns it will go immediately to a if (_res == NULL && PyErr_Occurred()) block, no?

@lysnikolaou
Copy link
MemberAuthor

  • p->error_indicator is set, in case malloc or realloc fail

Do we need to do this? As soon as the rule returns it will go immediately to a if (_res == NULL && PyErr_Occurred()) block, no?

I can't really see this, how exactly is this?

@pablogsal
Copy link
Member

I can't really see this, how exactly is this?

I have checked again and this only happens when the rule does not returnNULL, so forget what I said :(

lysnikolaou reacted with thumbs up emoji

@lysnikolaou
Copy link
MemberAuthor

lysnikolaou commentedMay 17, 2020
edited by bedevere-bot
Loading

Resolved the conflicts so that we can hopefully merge this and closebpo-40334.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
@pablogsal
Copy link
Member

@lysnikolaou You need to regenerate the parser 😉

@lysnikolaou
Copy link
MemberAuthor

lysnikolaou commentedMay 17, 2020
edited
Loading

@lysnikolaou You need to regenerate the parser 😉

Done! Sorry, it's getting late..

@pablogsal
Copy link
Member

Done! Sorry, it's getting late..

No problem. I want to land this and the other PR so they both make it to beta 1 which is next Monday :)

@pablogsalpablogsal merged commit2c8cd06 intopython:masterMay 17, 2020
arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull requestMay 24, 2020
…honGH-20003)The following improvements are implemented in this commit:- `p->error_indicator` is set, in case malloc or realloc fail.- Avoid memory leaks in the case that realloc fails.- Call `PyErr_NoMemory()` instead of `PyErr_Format()`, because it requires no memory.Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
@lysnikolaoulysnikolaou deleted the error-improvements branchMay 27, 2020 00:28
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@pablogsalpablogsalpablogsal left review comments

@gvanrossumgvanrossumAwaiting requested review from gvanrossum

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@lysnikolaou@pablogsal@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp