Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 707
    • Issues 707
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPyPyPy
  • pypypypy
  • Issues
  • #3864
Closed
Open
Issue created Dec 03, 2022 by Xinmeng Xia@xxm

incorrect recv in socket.socketpair leads to crashing

In the following code, (a,b) is obtained by socket.socketpair(). 'a' sends a message b'abcdefgh'. Then 'b' executes recv() crashing pypy. This program can work well on macOS and produces a crash on Ubuntu system.

test.py

import socket
(a, b) = socket.socketpair(socket.AF_UNIX, socket.SOCK_DGRAM)
a.send(b'abcdefgh')
result = b.recv(2, socket.MSG_TRUNC)
print(len(result), result)

Error message on Ubuntu

RPython traceback:
  File "rpython_rlib_1.c", line 6078, in RSocket_recv
  File "rpython_rtyper_lltypesystem.c", line 20109, in str_from_buffer
Fatal RPython error: AssertionError
Aborted (core dumped)

Output on macOS: 2 b'ab'

Environment: pypy3.9-v7.3.10rc3-linux64/bin/pypy3.9 Python 3.9.15 (27701b51ceb0, Nov 23 2022, 18:36:37) [PyPy 7.3.10-candidate3 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)] on linux

lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 18.04.6 LTS Release: 18.04 Codename: bionic

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking