This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kmille
Recipients kmille
Date 2019-06-10.20:03:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1560197039.5.0.767955558559.issue37217@roundup.psfhosted.org>
In-reply-to
Content
Hey,

chs@gw-sss-nb8:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial
chs@gw-sss-nb8:~$ python3 --version
Python 3.5.2
chs@gw-sss-nb8:~$ cat segfault.py 
import ssl
import socket

hostname = "www.xn--b.buchhandlunggründen.de"

ctx = ssl.create_default_context()
s = ctx.wrap_socket(socket.socket(), server_hostname=hostname)
s.check_hostname = True
try:
    s.connect((hostname, 443))
except UnicodeError as incorrect_punycode:
    pass

chs@gw-sss-nb8:~$ python3 segfault.py 
Segmentation fault

The problem does not occur if I remove the ü in www.xn--b.buchhandlunggründen.de

On my Arch the DNS fails (above the name doesn't resolve too but I seems like it doesn't matter):
kmille@linbox timetracking master % python3 omg.py 
Traceback (most recent call last):
  File "omg.py", line 10, in <module>
    s.connect((hostname, 443))
  File "/usr/lib/python3.7/ssl.py", line 1150, in connect
    self._real_connect(addr, False)
  File "/usr/lib/python3.7/ssl.py", line 1137, in _real_connect
    super().connect(addr)
socket.gaierror: [Errno -2] Name or service not known
kmille@linbox timetracking master % python3 --version
Python 3.7.3

If you need further help please ask.

Thank you for python <3

kmille
History
Date User Action Args
2019-06-10 20:03:59kmillesetrecipients: + kmille
2019-06-10 20:03:59kmillesetmessageid: <1560197039.5.0.767955558559.issue37217@roundup.psfhosted.org>
2019-06-10 20:03:59kmillelinkissue37217 messages
2019-06-10 20:03:58kmillecreate