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

Re: Possible bug in fscanf() (?)




> I've all the initalization code, and now fopen, fgets, open, and read seems
> work fine. But when I try to use fscanf() I get the following error :
> 
> lmm_alloc.c:42: Failed assetion '((oskit_addr_t)node & ALIGN_MASK)==0'
> Backtrace: fp=1fec38
> 
> Can anyone help me?

With that little information, it's doubtful that anyone can help you.
Bug reports (as this appears to be, looking at the subject) of this nature
ought to include:

o sample code.
  At the very least we need to see the call to fscanf.
  In this case though, it';s possible that you're not initialising the
  lmm (memory manager) so we need to see the initialisation code.

  Sometimes you consider your code to be "private" because of intellectual
  property considerations or because you don't like sending unfinished
  code to what is effectively a public forum (because our mailing list
  archive is on the web).  In that case, you should arrange to send it
  directly to one of us here at Utah with a request to keep it 
  confidential.

o values of significant variables (ie the arguments to fscanf and the
  value of node (since it is mentioned in the error message).
  If any of these are pointers (eg char*'s) they should include both the
  value of the pointer and the value of the thing being pointed to.

o stack traces

  The program oskit/unsupported/scripts/sym-trace is useful for 
  turning an incomprehensible pile of numbers into a symbolic dump
  of who called what.

  You'll need to tweak it a little to use the right version of
  "nm" since it has the path(s) to our local copies hardwired
  into it.

o version numbers
  If I wanted to try tracing this and I had your code, I'd have to look
  back through a week or two's mail to see if you'd mentioned the version
  of oskit in your first message.

-- 
Alastair Reid        reid@cs.utah.edu        http://www2.cs.utah.edu/~reid/

Follow-Ups: References: