glib apps using GSubprocess communicate might crash on g_subprocess_communicate_cancelled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glib2.0 (Ubuntu) |
Fix Released
|
Medium
|
Marco Trevisan (Treviño) | ||
Bionic |
Fix Released
|
Undecided
|
Iain Lane |
Bug Description
[ Impact ]
Glib apps using subprocess communicate and cancellable is cancelled crashes
[ Test case ]
Run the attached example with
gjs subprocess-
Should not crash, or running:
valgrind gjs subprocess-
should not return any read error (as the one mentioned below)
[ Regression potential ]
Really low, the only thing that could happen is that the subprocess isn't really cancelled.
---
Fixed upstream in https:/
#0 g_cancellable_
#1 0x00007ffff7ab8d1d in g_subprocess_
--
==25871== Memcheck, a memory error detector
==25871== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==25871== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==25871== Command: gjs /tmp/subprocess
==25871==
==25871== Warning: set address range perms: large range [0x377ee1e21000, 0x377f21e21000) (noaccess)
==25871== Invalid read of size 8
==25871== at 0x4EC5604: g_subprocess_
==25871== by 0x547A0F4: g_main_dispatch (gmain.c:3177)
==25871== by 0x547A0F4: g_main_
==25871== by 0x547A4BF: g_main_
==25871== by 0x547A54B: g_main_
==25871== by 0x6C4EDAD: ffi_call_unix64 (in /usr/lib/
==25871== by 0x6C4E71E: ffi_call (in /usr/lib/
==25871== by 0x5775607: ??? (in /usr/lib/
==25871== by 0x5776F53: ??? (in /usr/lib/
==25871== by 0x8A3FF6B: CallJSNative (jscntxtinlines
==25871== by 0x8A3FF6B: js::InternalCal
Related branches
- Ubuntu Desktop: Pending requested
-
Diff: 73 lines (+51/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/series (+1/-0)
debian/patches/subprocess-Fix-communicate_cancelled-signature.patch (+43/-0)
Added test case