[issue15106] Potential Bug in errors.c

2012-06-19 Thread Ken Cheung

New submission from Ken Cheung msrbugzi...@gmail.com:

I observed a code clone from the following files.

function : PyErr_Restore @ (file: Python-3.3.0a4/Python/errors.c, line: 27)~49
function : PyErr_SetExcInfo @ (file: Python-3.3.0a4/Python/errors.c, line: 
341)~353

The function PyErr_Restore performs some checking on traceback while 
PyErr_SetExcInfo does not. I wonder if this is necessary in the function 
PyErr_SetExcInfo. The source code is included in the attachment. Hope it helps.

--
components: None
files: errors_clone.txt
messages: 163181
nosy: Ken.Cheung
priority: normal
severity: normal
status: open
title: Potential Bug in errors.c
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file26049/errors_clone.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15106
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15107] Potential Bug in mpdecimal.c

2012-06-19 Thread Ken Cheung

New submission from Ken Cheung msrbugzi...@gmail.com:

I observed a code clone from the following files.

function : mpd_qexp @ (file: 
Python-3.3.0a4/Modules/_decimal/libmpdec/mpdecimal.c, line: 4092)~4165
function : mpd_qln @ (file: 
Python-3.3.0a4/Modules/_decimal/libmpdec/mpdecimal.c, line: 4525)~4612

In the first few lines of this clone, the function mpd_qexp only calls 
mpd_setspecial when mpd_isnegative is false while the function mpd_qln calls 
mpd_setspecial independent of the value of mpd_isnegative. I wonder the 
checking is necessary in the function mpd_qln. The source code is included in 
the attachment. Hope it helps.

--
components: Library (Lib)
files: mpdecimal_clone.txt
messages: 163185
nosy: Ken.Cheung
priority: normal
severity: normal
status: open
title: Potential Bug in mpdecimal.c
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file26051/mpdecimal_clone.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15107
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15057] Potential Bugs in mpd_qdivint and mpd_qrem

2012-06-13 Thread Ken Cheung

New submission from Ken Cheung msrbugzi...@gmail.com:

I observed a code clone from the following files.

function : mpd_qdivint @ (file: 
Python-3.3.0a2/Modules/_decimal/libmpdec/mpdecimal.c, line: 3727)~3763
function : mpd_qrem @ (file: 
Python-3.3.0a2/Modules/_decimal/libmpdec/mpdecimal.c, line: 6331)~6361

The function mpd_qdivint checks the condition mpd_isinfinite(a)  
mpd_isinfinite(b) while mpd_qrem does not. I wonder if this is necessary in 
mpd_qrem. The source code is included in the attachment. Hope it helps.

--
components: Library (Lib)
files: mpdecimal_clone.txt
messages: 162717
nosy: Ken.Cheung
priority: normal
severity: normal
status: open
title: Potential Bugs in mpd_qdivint and mpd_qrem
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file25949/mpdecimal_clone.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15057
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15057] Potential Bug in mpd_qdivint and mpd_qrem

2012-06-13 Thread Ken Cheung

Changes by Ken Cheung msrbugzi...@gmail.com:


--
title: Potential Bugs in mpd_qdivint and mpd_qrem - Potential Bug in 
mpd_qdivint and mpd_qrem

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15057
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15058] Potential Bugs in dlpvalloc and dlvalloc

2012-06-13 Thread Ken Cheung

New submission from Ken Cheung msrbugzi...@gmail.com:

I observed a code clone from the following files.

function : dlpvalloc @ (file: 
Python-3.3.0a2/Modules/_ctypes/libffi/src/dlmalloc.c, line: 4360)~4362
function : dlvalloc @ (file: 
Python-3.3.0a2/Modules/_ctypes/libffi/src/dlmalloc.c, line: 4353)~4355

The function dlpvalloc performs a bitwise operation at return while dlvalloc 
does not. I wonder if this is necessary in dlvalloc. The source code is 
included in the attachment. Hope it helps.

--
components: Library (Lib)
files: dlmalloc_clone.txt
messages: 162718
nosy: Ken.Cheung
priority: normal
severity: normal
status: open
title: Potential Bugs in dlpvalloc and dlvalloc
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file25950/dlmalloc_clone.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15058
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15058] Potential Bug in dlpvalloc and dlvalloc

2012-06-13 Thread Ken Cheung

Changes by Ken Cheung msrbugzi...@gmail.com:


--
title: Potential Bugs in dlpvalloc and dlvalloc - Potential Bug in dlpvalloc 
and dlvalloc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15058
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15059] Potential Bug in mpd_qresize and mpd_qresize_zero

2012-06-13 Thread Ken Cheung

New submission from Ken Cheung msrbugzi...@gmail.com:

I observed a code clone from the following files.

function : mpd_qresize @ (file: 
Python-3.3.0a2/Modules/_decimal/libmpdec/mpdecimal.c, line: 481)~493
function : mpd_qresize_zero @ (file: 
Python-3.3.0a2/Modules/_decimal/libmpdec/mpdecimal.c, line: 501)~517

The two functions perform different in the else if condition. I wonder this is 
due to functionality requirement or a bug. The source code is included in the 
attachment. Hope it helps.

--
components: Library (Lib)
files: mpdecimal_clone 2.txt
messages: 162719
nosy: Ken.Cheung
priority: normal
severity: normal
status: open
title: Potential Bug in mpd_qresize and mpd_qresize_zero
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file25951/mpdecimal_clone 2.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15059
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com