[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 01/11] tools/libs/toollog: Provide a default logger



Andrew Cooper writes ("Re: [Xen-devel] [PATCH v2 01/11] tools/libs/toollog: 
Provide a default logger"):
> Although actually, you can't capture stderr in a variable like this at
> all.  freopen() at a later point will close the current FILE object and
> create a new one, after which this logger will use-after-free.

freopen(...,f) always returns NULL or f.  There's no way to change the
pointer value of stderr.  Indeed some libcs have
  #define stderr (&__stdiostreams[2])
or some such.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.