Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lax error-checking in new-in-2.4 marshal stuff #41847

Closed
mwhudson opened this issue Apr 11, 2005 · 4 comments
Closed

lax error-checking in new-in-2.4 marshal stuff #41847

mwhudson opened this issue Apr 11, 2005 · 4 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@mwhudson
Copy link

BPO 1180997
Nosy @mwhudson, @loewis

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/mwhudson'
closed_at = <Date 2005-06-13.18:29:42.000>
created_at = <Date 2005-04-11.19:53:23.000>
labels = ['interpreter-core']
title = 'lax error-checking in new-in-2.4 marshal stuff'
updated_at = <Date 2005-06-13.18:29:42.000>
user = 'https://github.com/mwhudson'

bugs.python.org fields:

activity = <Date 2005-06-13.18:29:42.000>
actor = 'mwh'
assignee = 'mwh'
closed = True
closed_date = None
closer = None
components = ['Interpreter Core']
creation = <Date 2005-04-11.19:53:23.000>
creator = 'mwh'
dependencies = []
files = []
hgrepos = []
issue_num = 1180997
keywords = []
message_count = 4.0
messages = ['24999', '25000', '25001', '25002']
nosy_count = 2.0
nosy_names = ['mwh', 'loewis']
pr_nums = []
priority = 'high'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1180997'
versions = ['Python 2.4']

@mwhudson
Copy link
Author

I realise one of the points of the TYPE_STRINGREF and so on stuff
was efficiency, but:

>>> marshal.loads('R') # TYPE_STRINGREF == 'R'
Segmentation fault

@mwhudson mwhudson self-assigned this Apr 11, 2005
@mwhudson mwhudson added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Apr 11, 2005
@mwhudson mwhudson self-assigned this Apr 11, 2005
@mwhudson mwhudson added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Apr 11, 2005
@loewis
Copy link
Mannequin

loewis mannequin commented Apr 11, 2005

Logged In: YES
user_id=21627

I agree, and will try to work on a patch before 2.4.2.

@mwhudson
Copy link
Author

Logged In: YES
user_id=6656

While I have your attention:

>>> marshal.loads("", 1)
Segmentation fault

This is the guilty line:

	if (!PyArg_ParseTuple(args, "s#|i:loads", &s, &n))

there's no pointer corresponding to the optional integer argument.

I'd just fix this, but I have too many local changes to make it easy :(

@mwhudson
Copy link
Author

Logged In: YES
user_id=6656

This turned out to be easier to fix than I expected, so I fixed it.

Python/marshal.c revision 1.86
Lib/test/test_marshal.py revision 1.12

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

No branches or pull requests

1 participant