Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 497535

Summary: memory leak within PR_Socket while using PR_OpenTCPSocket
Product: [Fedora] Fedora Reporter: Kamil Dudka <kdudka>
Component: nsprAssignee: Kai Engert (:kaie) (inactive account) <kengert>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: kengert
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-24 14:37:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
minimal example none

Description Kamil Dudka 2009-04-24 14:21:48 UTC
Created attachment 341177 [details]
minimal example

Version-Release number of selected component (if applicable):
nspr-4.7.3-2.fc10

How reproducible:
100%

Steps to Reproduce:
1. run the attached minimal example
  
Actual results:
[root@xen86 ~]# ./test.c
==4354== Memcheck, a memory error detector.
==4354== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==4354== Using LibVEX rev 1804, a library for dynamic binary translation.
==4354== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==4354== Using valgrind-3.3.0, a dynamic binary instrumentation framework.
==4354== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==4354== For more details, rerun with: -v
==4354==
==4354==
==4354== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 1)
==4354== malloc/free: in use at exit: 7,864 bytes in 80 blocks.
==4354== malloc/free: 83 allocs, 3 frees, 8,258 bytes allocated.
==4354== For counts of detected errors, rerun with: -v
==4354== searching for pointers to 80 not-freed blocks.
==4354== checked 121,232 bytes.
==4354==
==4354== 48 bytes in 1 blocks are possibly lost in loss record 8 of 19
==4354==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
==4354==    by 0x4C2C4A9: _PR_Getfd (prfdcach.c:141)
==4354==    by 0x4C44004: pt_SetMethods (ptio.c:3319)
==4354==    by 0x4C4527D: PR_Socket (ptio.c:3499)
==4354==    by 0x400634: main (in /root/a.out)
==4354==
==4354== LEAK SUMMARY:
==4354==    definitely lost: 0 bytes in 0 blocks.
==4354==      possibly lost: 48 bytes in 1 blocks.
==4354==    still reachable: 7,816 bytes in 79 blocks.
==4354==         suppressed: 0 bytes in 0 blocks.
==4354== Reachable blocks (those to which a pointer was found) are not shown.
==4354== To see them, rerun with: --leak-check=full --show-reachable=yes

Additional info:
encountered while investigating Bug 453612

Comment 1 Kamil Dudka 2009-04-24 14:37:54 UTC
Oops, looking once again I can see it's only "possible lost", closing NOTABUG...