On 2013-03-06 20:02:16, Antoine Beaupré wrote:
> So I ran the patched version under valgrind, which I am not familiar
> with at all so YMMV.
> 
> I attach the output.
> 
> Basically, what I see is one of those:
> 
> ==3852== Conditional jump or move depends on uninitialised value(s)
> ==3852== Use of uninitialised value of size 8
> ==3852== Syscall param rt_sigaction(act->sa_mask) points to uninitialised 
> byte(s)
> 
> This seems consistent with the original report of problems with the
> signal handler, in general, but I haven't dug much deeper yet.

Those valgrind warnings can be fixed quite easily. valgrind is
complaining because some members of ttyclock malloc'd in main and
sigaction in init are read before they were initialized. For example, in
line 70 it is checked if ttyclock->geo.x is zero, but ttyclock->geo.x
has no well defined value at this point.

To silence the warnings it should be enough to just run memset over the
allocated memory: once for ttyclock after the first malloc in main and
once for sig in init.

Regards
-- 
Sebastian Ramacher

Attachment: signature.asc
Description: Digital signature

Reply via email to