chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Flow-analysis enhancement for assigned var


From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] [PATCH] Flow-analysis enhancement for assigned variables
Date: 30 Jan 2012 13:22:29 +0100

On Jan 30 2012, Felix wrote:

If they're not tracked, could this cause the scrutinizer to make
invalid type inferences and code replacements?

May I expand: Felix, assuming you have at least seen the results
of some mistaken type tag, what would be the resulting effect
to the running chicken program?

I don't understand completely: do you mean an incorrect specialization
done by the compiler? In that case necessary type checks may be
omitted, resulting in incorrect data references (and thus crashes,
most likely).

Exactly.  My bet was that at some point some incorrect specialization
would have crashed some of your code.

I guess something damages a type tag, subsequently having
the gc scan and fail on arbitrary addresses.
However I lack a theory how that would be possible.

The type-tag is in the header, the first word of a data object. Off-by-one errors or modifying data beyond its true size may certainly damage the header of the object following the former object in memory.

I know; just after the fact, that is sitting on the core dump,
*I* have no idea how to find out what kind of object it was
collecting and what whould be the object just before.

This knowledge should help me to track the crash down.
Just I'm missing either the tool or the knowledge how to apply
and which tool.

((So far I did one thing: there are only so many spots, where
my code would use C to write some memory.  Those are now
(a) double checked, (b) I added temporary intentional corruption
there like writing off-by-one; while this is no proof, the
core dump always came up elswhere.))

/Jörg





reply via email to

[Prev in Thread] Current Thread [Next in Thread]