evilsong / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Avoid calling sscanf() in ProcMapsIterator not to allocate memory #479

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Proposing a change to avoid calling sscanf() in ProcMapsIterator.

I'm preparing changes that use ProcMapsIterator in allocation-sensitive 
sections.  sscanf() usually uses alloca() internally, but it sometimes uses 
malloc().  This patch avoids malloc() calls in ProcMapsIterator.

It's a back-porting patch from Chromium's local changes.
http://crrev.com/147441

Original issue reported on code.google.com by dmikurube@chromium.org on 30 Oct 2012 at 10:56

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by chapp...@gmail.com on 3 Nov 2012 at 3:02

GoogleCodeExporter commented 9 years ago
Issue 428 has been merged into this issue.

Original comment by chapp...@gmail.com on 3 Nov 2012 at 3:04

GoogleCodeExporter commented 9 years ago
Thank you very much for taking the time to back-port this patch. I was actually 
just going to start work on a fix for this today!

Original comment by chapp...@gmail.com on 3 Nov 2012 at 3:14

GoogleCodeExporter commented 9 years ago
r168 | chappedm@gmail.com | 2012-11-03 11:27:58 -0400 (Sat, 03 Nov 2012) | 1 
line

issue-479: Replaced sscanf usage while iterating proc maps entries to fix a 
deadlock introduced by glibc-2.15.

Original comment by chapp...@gmail.com on 3 Nov 2012 at 3:28

GoogleCodeExporter commented 9 years ago
Issue 487 has been merged into this issue.

Original comment by chapp...@gmail.com on 22 Dec 2012 at 5:51

GoogleCodeExporter commented 9 years ago
Issue 423 has been merged into this issue.

Original comment by chapp...@gmail.com on 22 Dec 2012 at 5:54