Re: C++ std headers and malloc, realloc poisoning

2013-12-05 Thread Oleg Endo
On Thu, 2013-12-05 at 18:11 +0100, Jakub Jelinek wrote: > On Thu, Dec 05, 2013 at 12:05:23PM -0500, Jason Merrill wrote: > > On 12/05/2013 10:59 AM, Oleg Endo wrote: > > >On Thu, 2013-12-05 at 10:45 -0500, Jason Merrill wrote: > > >>A simple workaround would be to disable poisoning of malloc/reallo

Re: C++ std headers and malloc, realloc poisoning

2013-12-05 Thread Jakub Jelinek
On Thu, Dec 05, 2013 at 12:05:23PM -0500, Jason Merrill wrote: > On 12/05/2013 10:59 AM, Oleg Endo wrote: > >On Thu, 2013-12-05 at 10:45 -0500, Jason Merrill wrote: > >>A simple workaround would be to disable poisoning of malloc/realloc on > >>OS X (or when the build machine uses libc++, if that's

Re: C++ std headers and malloc, realloc poisoning

2013-12-05 Thread Jason Merrill
On 12/05/2013 10:59 AM, Oleg Endo wrote: On Thu, 2013-12-05 at 10:45 -0500, Jason Merrill wrote: A simple workaround would be to disable poisoning of malloc/realloc on OS X (or when the build machine uses libc++, if that's easy to detect). Whether libc++ uses malloc/realloc/free in some implem

Re: C++ std headers and malloc, realloc poisoning

2013-12-05 Thread Oleg Endo
On Thu, 2013-12-05 at 10:45 -0500, Jason Merrill wrote: > On 12/04/2013 04:03 PM, Jakub Jelinek wrote: > > I think the most important reason is that we want to handle out of mem > > cases consistently, so instead of malloc etc. we want users to use xmalloc > > etc. that guarantee non-NULL returned

Re: C++ std headers and malloc, realloc poisoning

2013-12-05 Thread Jason Merrill
On 12/04/2013 04:03 PM, Jakub Jelinek wrote: I think the most important reason is that we want to handle out of mem cases consistently, so instead of malloc etc. we want users to use xmalloc etc. that guarantee non-NULL returned value, or fatal error and never returning. For operator new that is

Re: C++ std headers and malloc, realloc poisoning

2013-12-04 Thread Jakub Jelinek
On Wed, Dec 04, 2013 at 03:57:43PM -0500, Jason Merrill wrote: > On 12/04/2013 03:21 PM, Oleg Endo wrote: > >Some days ago I've tried building an SH cross-GCC on OSX 10.9 with the > >latest XCode (clang) tools and its libc++ std lib. Some of the libc++ > >headers use malloc, realloc etc, which are

Re: C++ std headers and malloc, realloc poisoning

2013-12-04 Thread Jason Merrill
On 12/04/2013 03:21 PM, Oleg Endo wrote: Some days ago I've tried building an SH cross-GCC on OSX 10.9 with the latest XCode (clang) tools and its libc++ std lib. Some of the libc++ headers use malloc, realloc etc, which are poisoned in system.h. Well, presumably we are poisoning them because

C++ std headers and malloc, realloc poisoning

2013-12-04 Thread Oleg Endo
Hello, Earlier this the following was committed: 2013-06-20 Oleg Endo Jason Merrill * system.h: Include as well as . ... so that things like could be included after including system.h. Some days ago I've tried building an SH cross-GCC on OSX 10.9 with the latest XCode