This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug malloc/22830] New: malloc_stats doesn't restore cancellation state on stderr
- From: "zackw at panix dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 10 Feb 2018 20:33:52 +0000
- Subject: [Bug malloc/22830] New: malloc_stats doesn't restore cancellation state on stderr
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=22830
Bug ID: 22830
Summary: malloc_stats doesn't restore cancellation state on
stderr
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: malloc
Assignee: unassigned at sourceware dot org
Reporter: zackw at panix dot com
Target Milestone: ---
Created attachment 10803
--> https://sourceware.org/bugzilla/attachment.cgi?id=10803&action=edit
test program
malloc_stats intends to disable cancellation on stderr while it's writing to
it, and then re-enable it again afterward, but due to a one-character typo,
what it actually does is disable cancellation on stderr permanently.
The attached test program (needs -(l)pthread) demonstrates the problem:
$ ./a.out; echo $?
FAIL: thread was not cancelled
FAIL: fputs produced output
--- output from thread below ---
Arena 0:
system bytes = 135168
in use bytes = 3488
Arena 1:
system bytes = 135168
in use bytes = 11632
Total (incl. mmap):
system bytes = 270336
in use bytes = 15120
max mmap regions = 0
max mmap bytes = 0
should be cancelled at this point
1
Expected behavior is no output, successful exit.
--
You are receiving this mail because:
You are on the CC list for the bug.