This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/21387] memstream is incompatible with mcheck()


https://sourceware.org/bugzilla/show_bug.cgi?id=21387

--- Comment #2 from Paul Curtis <paul.curtis@casa-systems.com> ---
Thank you for your quick reply. 

My first attempt at a simple program is unable to reproduce the issue. I am
unfamiliar with linking issues so it may take a little while to provide the
information you need.

Thanks
Paul Curtis

-----Original Message-----
From: fweimer at redhat dot com [mailto:sourceware-bugzilla@sourceware.org] 
Sent: Friday, April 14, 2017 9:46 AM
To: Paul Curtis <paul.curtis@casa-systems.com>
Subject: [Bug stdio/21387] memstream is incompatible with mcheck()

https://sourceware.org/bugzilla/show_bug.cgi?id=21387

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2017-04-14
                 CC|                            |fweimer at redhat dot com
          Component|libc                        |stdio
     Ever confirmed|0                           |1
              Flags|                            |security-

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> --- (In reply to
Paul Curtis from comment #0)
> The open_memstream() function assigns the address of malloc and free 
> to the new_f->fp._sf._s._allocate_buffer and 
> new_f->fp._sf._s._free_buffer variables. This is the actual location 
> of malloc and free not the looked up by the dynamic linker address of 
> malloc and free. This means that memstream will not use the malloc 
> hook when allocating memory. This is not ideal but usually works.

Could you please provide a minimal example program and show how you link it?  I
don't see how this can happen with the upstream memstream implementation.

--
You are receiving this mail because:
You reported the bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]