Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7ce35a18
Commit
7ce35a18
authored
May 11, 2013
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Plain Diff
Issue #17237: Fix crash in the ASCII decoder on m68k.
parents
3f5228d4
8b0e9842
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
Misc/NEWS
Misc/NEWS
+2
-0
Objects/unicodeobject.c
Objects/unicodeobject.c
+9
-0
No files found.
Misc/NEWS
View file @
7ce35a18
...
...
@@ -10,6 +10,8 @@ What's New in Python 3.4.0 Alpha 1?
Core and Builtins
-----------------
- Issue #17237: Fix crash in the ASCII decoder on m68k.
- Issue #17927: Frame objects kept arguments alive if they had been
copied into a cell, even if the cell was cleared.
...
...
Objects/unicodeobject.c
View file @
7ce35a18
...
...
@@ -4647,6 +4647,14 @@ ascii_decode(const char *start, const char *end, Py_UCS1 *dest)
const
char
*
p
=
start
;
const
char
*
aligned_end
=
(
const
char
*
)
_Py_ALIGN_DOWN
(
end
,
SIZEOF_LONG
);
/*
* Issue #17237: m68k is a bit different from most architectures in
* that objects do not use "natural alignment" - for example, int and
* long are only aligned at 2-byte boundaries. Therefore the assert()
* won't work; also, tests have shown that skipping the "optimised
* version" will even speed up m68k.
*/
#if !defined(__m68k__)
#if SIZEOF_LONG <= SIZEOF_VOID_P
assert
(
_Py_IS_ALIGNED
(
dest
,
SIZEOF_LONG
));
if
(
_Py_IS_ALIGNED
(
p
,
SIZEOF_LONG
))
{
...
...
@@ -4671,6 +4679,7 @@ ascii_decode(const char *start, const char *end, Py_UCS1 *dest)
}
return
p
-
start
;
}
#endif
#endif
while
(
p
<
end
)
{
/* Fast path, see in STRINGLIB(utf8_decode) in stringlib/codecs.h
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment