[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-22 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 51627344fc58 by Berker Peksag in branch '3.5':
Issue #27587: Move null pointer check earlier in _PyState_AddModule()
https://hg.python.org/cpython/rev/51627344fc58

New changeset 7d90bf4780ff by Berker Peksag in branch 'default':
Issue #27587: Merge from 3.5
https://hg.python.org/cpython/rev/7d90bf4780ff

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-18 Thread STINNER Victor

STINNER Victor added the comment:

issue27587_pystate_addmodule_v2.diff LGTM.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-18 Thread Berker Peksag

Berker Peksag added the comment:

Here is an updated patch.

--
Added file: 
http://bugs.python.org/file44141/issue27587_pystate_addmodule_v2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-14 Thread Stefan Krah

Stefan Krah added the comment:

Sorry, I missed issue27587_pystate_addmodule.diff: no new issue in the
updated analysis.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-14 Thread Stefan Krah

Stefan Krah added the comment:

Pavel did another analysis with the external packages removed. Thanks
for this!

  http://www.viva64.com/en/b/0418/


The new analysis found another glitch.  Also see my message to
python-committers.

--
nosy: +skrah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-24 Thread Berker Peksag

Berker Peksag added the comment:

I'm attaching Christian's patch at 
https://marc.info/?l=python-dev=146922730716425=2 as 
issue27587_pystate_addmodule.diff to make code reviewing easier.

--
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-24 Thread Berker Peksag

Changes by Berker Peksag :


--
keywords: +patch
Added file: http://bugs.python.org/file43870/issue27587_pystate_addmodule.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-23 Thread Chris Angelico

Changes by Chris Angelico :


--
nosy: +Rosuav

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-23 Thread Christian Heimes

Christian Heimes added the comment:

Hi Pavel,

The issues in ASN1_PRINTABLE_type() [N2], BN_mask_bits() [N4 bn_lib.c,
digest.c, evp_enc.c], dh_cms_set_peerkey() [N5, dh_ameth.c] and
cms_env_set_version() [N6, cms_env.c] are all OpenSSL issues and should
be reported to OpenSSL. The Windows build system also builds a static version 
of OpenSSL and a couple of other dependencies.

--
nosy: +christian.heimes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

Also on python-dev, Chris Angelico pointed out that the _elementtree.c case is 
a false positive. So that would leave the binascii one, which I think is worth 
simpifying, but is probably not very serious.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

Christian Heimes posted a patch for _PyState_AddModule() on Python-dev: 
https://marc.info/?l=python-dev=146922730716425=2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Berker Peksag

Berker Peksag added the comment:

> V547 Expression 's->sock_fd < 0' is always false. Unsigned type value is 
> never < 0. Modules/socketmodule.c:655
> V547 Expression 's->sock_fd < 0' is always false. Unsigned type value is 
> never < 0. Modules/_ssl.c:1702
> V547 Expression 'sock->sock_fd < 0' is always false. Unsigned type value is 
> never < 0. Modules/_ssl.c:2018

Victor fixed these issues in 6c11f52ab9db and 025281485318.

> V614 Potentially uninitialized pointer 'sigint_event' used. 
> Modules/_multiprocessing/semaphore.c:120

See issue 27591.

--
nosy: +berker.peksag
stage:  -> needs patch
versions: +Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Chris Rebert

Changes by Chris Rebert :


--
nosy: +cvrebert

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Martin Panter

Martin Panter added the comment:

Thanks for the report. You seem to have identified some code from Open SSL as 
being from Python (e.g. ASN1_PRINTABLE_type() function in a_print.c).

Here’s a quick copy of the details relevant to Python:

V547 Expression 's->sock_fd < 0' is always false. Unsigned type value is never 
< 0. Modules/socketmodule.c:655
V547 Expression 's->sock_fd < 0' is always false. Unsigned type value is never 
< 0. Modules/_ssl.c:1702
V547 Expression 'sock->sock_fd < 0' is always false. Unsigned type value is 
never < 0. Modules/_ssl.c:2018
Suggestion: compare with INVALID_SOCKET

V614 Potentially uninitialized pointer 'sigint_event' used. 
Modules/_multiprocessing/semaphore.c:120

V728 An excessive check can be simplified. The '||' operator is surrounded by 
opposite expressions 'quotetabs' and '!quotetabs'. Modules/binascii.c:1453

Null pointer check after use of “def” in _PyState_AddModule(), Python/pystate.c
V595 The 'self->extra' pointer was utilized before it was verified against 
nullptr. Check lines: 917, 923. Modules/_elementtree.c:917

The first two groups (sock_fd and sigint_event) look like Windows-specific 
code, and I suspect would be diagnosed with GCC (but building Python with GCC 
on Windows needs work).

--
components: +Windows
nosy: +martin.panter, paul.moore, steve.dower, tim.golden, zach.ware
type: enhancement -> compile error

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-22 Thread Pavel Belikov

New submission from Pavel Belikov:

To demonstrate the capabilities of our analyzer, we regularly perform analysis 
of open source projects. We had recently checked the CPython project.

Here is the link to the article about it: http://www.viva64.com/en/b/0414/
Official page of the analyzer: http://www.viva64.com/en/pvs-studio/

If you have any questions, or if you are interested in the evaluation of our 
static analyzer or in any other source code quality control services that our 
company provides, please contact us at supp...@viva64.com.

--
messages: 270974
nosy: pavel-belikov
priority: normal
severity: normal
status: open
title: Issues, reported by PVS-Studio static analyzer
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com