This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

What's needed for sprintf?


Hi, all,

Very occasionally, a call to sprintf will go off into the weeds... The
culprit is memmove, which is being given some out-of-range pointers.  

As you can imagine, this can be quite difficult to debug, partly because
I have no interactive debugger, but mostly because I can sometimes leave
the system to run for literally days on end with no problems, but a
restart can sometimes leave me in a spot where the system just dies
after a few minutes.

I'm wondering if perhaps I've not defined everything I need to.  I have
a write_r() (which calls my own write()), open_r (which calls my open),
close_r (yada yada yada).  The rest of my functions like isatty are from
what was in the manual.

To the point: have I forgotten something that would cause fvwrite (which
is memmove's caller) to mistakenly decide to do something else with the
buffer that I otherwise wouldn't want?

I hope this is clear.  If it's not, I'd be happy to give some more
details.

Regards,

Matt Gessner


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