Bug 489676 - vgdb handle EINTR and EAGAIN more consistently
Summary: vgdb handle EINTR and EAGAIN more consistently
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Mark Wielaard
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-03 13:50 UTC by Mark Wielaard
Modified: 2024-07-05 09:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
vgdb: Handle EINTR and EAGAIN more consistently (11.62 KB, text/plain)
2024-07-03 13:55 UTC, Mark Wielaard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2024-07-03 13:50:38 UTC
vgdb doesn't handle EINTR and EAGAIN very consistently. Sometimes when a signal arrives at the wrong time vgdb just errors out instead of retrying to read or write a package.
Comment 1 Mark Wielaard 2024-07-03 13:55:39 UTC
Created attachment 171330 [details]
vgdb: Handle EINTR and EAGAIN more consistently

vgdb: Handle EINTR and EAGAIN more consistently

Always handle EINTR or EAGAIN when calling read or write. Also be
consistent in the use of size_t and ssize_t for arguments and return
values.

This should make vgdb more robust against receiving signals or a
blocked pipe at the wrong time.
Comment 2 Mark Wielaard 2024-07-05 09:48:35 UTC
commit 646978d9adc5e334c10ad691f89421eb5c90541a
Author: Mark Wielaard <mark@klomp.org>
Date:   Wed Jul 3 15:51:06 2024 +0200

    vgdb: Handle EINTR and EAGAIN more consistently
    
    Always handle EINTR or EAGAIN when calling read or write. Also be
    consistent in the use of size_t and ssize_t for arguments and return
    values.
    
    This should make vgdb more robust against receiving signals or a
    blocked pipe at the wrong time.
    
    https://bugs.kde.org/show_bug.cgi?id=489676