Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 88056 - double free() from iofclose() on libio/tst-fopenloc
double free() from iofclose() on libio/tst-fopenloc
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-04-04 17:44 EST by John Reiser
Modified: 2016-11-24 10:20 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-04-09 15:21:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:136 high SHIPPED_LIVE glibc bugfix errata 2003-04-09 00:00:00 EDT
Red Hat Product Errata RHSA-2003:089 high SHIPPED_LIVE : Updated glibc packages fix vulnerabilities in RPC XDR decoder 2003-04-10 00:00:00 EDT

  None (edit)
Description John Reiser 2003-04-04 17:44:10 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Description of problem:
A malloc()ed block is free()d twice when running the testcase libio/tst-fopenloc.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Run testcase libio/tst-fopenloc with breakpoints at __gconv_release_cache,
__gconv_release_step, and __gconv_lookup_cache+289 (just after the call to
malloc() at line 360).
2. At each breakpoint, print $eax, which contains the pointer of interest.

Actual Results:   Note that the first block allocated [the call to malloc() in
__gconv_lookup_cache] is freed once from __gconv_release_cache and once from

Expected Results:  No block is referenced after it is free()d.

Additional info:

Here is the error report from a commercial tool.  valgrind ought to report

[gconv_db.c:199] (Thread 0) **READ_DANGLING**
>>   if (--step->__counter == 0)

  Reading from a dangling pointer.

  Pointer : 0x0804ae98
  In block: 0x0804ae90 thru 0x0804af07 (120 bytes)
                  block allocated at gconv_cache.c, 360
            __gconv_lookup_cache()  gconv_cache.c, 360
          __gconv_find_transform()  gconv_db.c, 689
                 __wcsmbs_getfct()  wcsmbsload.c, 92
             __wcsmbs_named_conv()  wcsmbsload.c, 244
              _IO_new_file_fopen()  fileops.c, 53
                __fopen_internal()  iofopen.c, 92
                   _IO_new_fopen()  iofopen.c, 106
                            main()  tst-fopenloc.c, 42

stack trace where memory was freed:
           __gconv_release_cache()  gconv_cache.c, 447
              _IO_new_file_fopen()  fileops.c, 403
                __fopen_internal()  iofopen.c, 92
                   _IO_new_fopen()  iofopen.c, 106
                            main()  tst-fopenloc.c, 42

  Stack trace where the error occurred:
            __gconv_release_step()  gconv_db.c, 199
                  _IO_new_fclose()  iofclose.c, 76
                            main()  tst-fopenloc.c, 59
Comment 1 Jakub Jelinek 2003-04-09 15:21:38 EDT
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.