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.

What I am concerned about is making this fit for release. As this is not
a server application or a suid app, I am not sure I see how serious
those problems really are. The software actually works even though it's
coding is clunky and some edge cases will make it crash. But it is not a
security liability, so I think this should be downgraded to normal and
therefore unblock the release.

Or am I missing something?

A.

==3852== Memcheck, a memory error detector
==3852== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==3852== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==3852== Command: ./tty-clock
==3852== Parent PID: 31646
==3852== 
==3852== Syscall param rt_sigaction(act->sa_mask) points to uninitialised 
byte(s)
==3852==    at 0x52AC60E: __libc_sigaction (sigaction.c:65)
==3852==    by 0x401567: init (ttyclock.c:63)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852==  Address 0x7fefffdb8 is on thread 1's stack
==3852== 
==3852== Syscall param rt_sigaction(act->sa_mask) points to uninitialised 
byte(s)
==3852==    at 0x52AC60E: __libc_sigaction (sigaction.c:65)
==3852==    by 0x401580: init (ttyclock.c:64)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852==  Address 0x7fefffdb8 is on thread 1's stack
==3852== 
==3852== Syscall param rt_sigaction(act->sa_mask) points to uninitialised 
byte(s)
==3852==    at 0x52AC60E: __libc_sigaction (sigaction.c:65)
==3852==    by 0x401599: init (ttyclock.c:65)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852==  Address 0x7fefffdb8 is on thread 1's stack
==3852== 
==3852== Syscall param rt_sigaction(act->sa_mask) points to uninitialised 
byte(s)
==3852==    at 0x52AC60E: __libc_sigaction (sigaction.c:65)
==3852==    by 0x4015B2: init (ttyclock.c:66)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852==  Address 0x7fefffdb8 is on thread 1's stack
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x4015CC: init (ttyclock.c:70)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x4015E8: init (ttyclock.c:72)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x401604: init (ttyclock.c:74)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x401620: init (ttyclock.c:76)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x401643: init (ttyclock.c:78)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x53182DB: __tzfile_compute (tzfile.c:642)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x53182EC: __tzfile_compute (tzfile.c:672)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x5318319: __tzfile_compute (tzfile.c:715)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Use of uninitialised value of size 8
==3852==    at 0x5318516: __tzfile_compute (tzfile.c:718)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x531851A: __tzfile_compute (tzfile.c:718)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x5318524: __tzfile_compute (tzfile.c:720)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Use of uninitialised value of size 8
==3852==    at 0x531852A: __tzfile_compute (tzfile.c:720)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x531852E: __tzfile_compute (tzfile.c:720)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Use of uninitialised value of size 8
==3852==    at 0x531853D: __tzfile_compute (tzfile.c:723)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x5318544: __tzfile_compute (tzfile.c:723)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Use of uninitialised value of size 8
==3852==    at 0x531857E: __tzfile_compute (tzfile.c:757)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x53185BB: __tzfile_compute (tzfile.c:760)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Use of uninitialised value of size 8
==3852==    at 0x53185E9: __tzfile_compute (tzfile.c:763)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Use of uninitialised value of size 8
==3852==    at 0x5318363: __tzfile_compute (tzfile.c:778)
==3852==    by 0x5318036: __tz_convert (tzset.c:627)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x5315F8A: __offtime (offtime.c:41)
==3852==    by 0x5317FE8: __tz_convert (tzset.c:648)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x5315F9B: __offtime (offtime.c:41)
==3852==    by 0x5317FE8: __tz_convert (tzset.c:648)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x5315FA4: __offtime (offtime.c:46)
==3852==    by 0x5317FE8: __tz_convert (tzset.c:648)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x531605E: __offtime (offtime.c:57)
==3852==    by 0x5317FE8: __tz_convert (tzset.c:648)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x5316244: __offtime (offtime.c:64)
==3852==    by 0x5317FE8: __tz_convert (tzset.c:648)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x5316250: __offtime (offtime.c:64)
==3852==    by 0x5317FE8: __tz_convert (tzset.c:648)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x531625E: __offtime (offtime.c:64)
==3852==    by 0x5317FE8: __tz_convert (tzset.c:648)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x5316279: __offtime (offtime.c:76)
==3852==    by 0x5317FE8: __tz_convert (tzset.c:648)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x531629E: __offtime (offtime.c:83)
==3852==    by 0x5317FE8: __tz_convert (tzset.c:648)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x531630E: __offtime (offtime.c:84)
==3852==    by 0x5317FE8: __tz_convert (tzset.c:648)
==3852==    by 0x40167D: init (ttyclock.c:80)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x40197B: update_hour (ttyclock.c:149)
==3852==    by 0x4016A1: init (ttyclock.c:82)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x4019BD: update_hour (ttyclock.c:155)
==3852==    by 0x4016A1: init (ttyclock.c:82)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x4019DF: update_hour (ttyclock.c:156)
==3852==    by 0x4016A1: init (ttyclock.c:82)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x4016EB: init (ttyclock.c:89)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x4017D9: init (ttyclock.c:98)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x4023E1: set_center (ttyclock.c:314)
==3852==    by 0x401851: init (ttyclock.c:103)
==3852==    by 0x402C2C: main (ttyclock.c:520)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x402220: clock_rebound (ttyclock.c:276)
==3852==    by 0x402C33: main (ttyclock.c:524)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x40197B: update_hour (ttyclock.c:149)
==3852==    by 0x402C38: main (ttyclock.c:525)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x4019BD: update_hour (ttyclock.c:155)
==3852==    by 0x402C38: main (ttyclock.c:525)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x4019DF: update_hour (ttyclock.c:156)
==3852==    by 0x402C38: main (ttyclock.c:525)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x401DFC: draw_clock (ttyclock.c:222)
==3852==    by 0x402C3D: main (ttyclock.c:526)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x402900: key_event (ttyclock.c:417)
==3852==    by 0x402C42: main (ttyclock.c:527)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x402912: key_event (ttyclock.c:417)
==3852==    by 0x402C42: main (ttyclock.c:527)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x40213B: clock_move (ttyclock.c:261)
==3852==    by 0x402310: clock_rebound (ttyclock.c:288)
==3852==    by 0x402C33: main (ttyclock.c:524)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x402345: set_second (ttyclock.c:299)
==3852==    by 0x40285F: key_event (ttyclock.c:398)
==3852==    by 0x402C42: main (ttyclock.c:527)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x40213B: clock_move (ttyclock.c:261)
==3852==    by 0x4023AE: set_second (ttyclock.c:304)
==3852==    by 0x40285F: key_event (ttyclock.c:398)
==3852==    by 0x402C42: main (ttyclock.c:527)
==3852== 
==3852== Conditional jump or move depends on uninitialised value(s)
==3852==    at 0x4023E1: set_center (ttyclock.c:314)
==3852==    by 0x4023BF: set_second (ttyclock.c:306)
==3852==    by 0x40285F: key_event (ttyclock.c:398)
==3852==    by 0x402C42: main (ttyclock.c:527)
==3852== 
==3852== 
==3852== HEAP SUMMARY:
==3852==     in use at exit: 438,615 bytes in 474 blocks
==3852==   total heap usage: 558 allocs, 84 frees, 449,053 bytes allocated
==3852== 
==3852== LEAK SUMMARY:
==3852==    definitely lost: 0 bytes in 0 blocks
==3852==    indirectly lost: 0 bytes in 0 blocks
==3852==      possibly lost: 0 bytes in 0 blocks
==3852==    still reachable: 438,615 bytes in 474 blocks
==3852==         suppressed: 0 bytes in 0 blocks
==3852== Rerun with --leak-check=full to see details of leaked memory
==3852== 
==3852== For counts of detected and suppressed errors, rerun with: -v
==3852== Use --track-origins=yes to see where uninitialised values come from
==3852== ERROR SUMMARY: 375 errors from 50 contexts (suppressed: 4 from 4)

-- 
Antoine Beaupré +++ Réseau Koumbit Networks +++ +1.514.387.6262 #208
--------------------------------------------------------------------

Attachment: pgpb41xWgsu3x.pgp
Description: PGP signature

Reply via email to