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

fread()


I finally tracked down the errors in my sort algorithm. Turns out
that fread() does not mark the buffered as written to.

I could easily create a patch for a wrapper [my current solution
is to add "buffer[0] = 0;" before my fread()] but I want to
first know how mudflap is supposed to handle this. Does it use
any rules to decide which pointers passed to external functions
should be treated as being written to? A wrapper can go further
and verify that the whole buffer area (based on size*count) is
valid - but this is a separate point.

Maybe I should ask if there is any more doco I can read (for now
I am reading the sources). I think I now understand the basics of
mf since it looks very much like the debugging system I already
have in my software. I since learnt that mf keeps track of read/
write accesses - does it track anything else?


Anyway, after clearing a few more hurdles I am now seeing real
error reports. This is very good and I hope to use it on a regular
basis. I just need it to be multithread safe to be able to run my
full system through it.

I now use a perl script to decode the reports into proper
file:line which makes them drastically more usefull. I hope the
author will be ready to post it tomorrrow. This is a first
attempt, using gdb to get symbol info, and we may (time
permitting) look at a proper patch to generate a nicer traceback
in the first place.

--
Eyal Lebedinsky (eyal at eyal dot emu dot id dot au) <http://samba.org/eyal/>


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