Files
ToastyFS/src
Claude 43768781c8 Fix valgrind uninitialized memory errors
Fixed multiple uninitialized memory issues detected by valgrind:

1. SHA256 struct size mismatch: Changed from 64 bytes to 32 bytes to
   match the actual output of sha256() function (which produces 256
   bits = 32 bytes).

2. File tree chunk allocation: Fixed loop that wasn't initializing
   newly allocated chunks because num_chunks was updated before the
   initialization loop. Now saves old_num_chunks first.

3. Metadata server process_client_write: Initialized results[i].num_addrs
   to 0 before use to prevent reading uninitialized value.

4. Address struct initialization: Zero-initialize Address structs before
   setting fields to ensure the entire union is initialized (union
   contains either IPv4 or IPv6, leaving unused bytes uninitialized).

5. Fixed bug in IPv6 address creation: Changed incorrect is_ipv4=true
   to is_ipv4=false for IPv6 addresses.

6. Fixed all_chunk_servers_holding_chunk: Function was incrementing
   counter for all chunk servers instead of only those containing the
   hash, causing access to uninitialized array elements.

All valgrind errors resolved: ERROR SUMMARY: 0 errors from 0 contexts
2025-11-08 16:26:12 +00:00
..
2025-11-05 14:26:57 +01:00
2025-10-29 21:46:17 +01:00
2025-10-28 17:24:25 +01:00
2025-11-08 02:43:41 +01:00
2025-11-08 02:16:46 +01:00
2025-11-08 17:15:04 +01:00
2025-11-08 11:51:24 +01:00
2025-11-02 04:37:20 +01:00
2025-11-01 22:44:04 +01:00
2025-10-28 17:24:25 +01:00
2025-11-05 14:26:57 +01:00
2025-11-07 20:26:15 +01:00
2025-11-03 18:32:14 +01:00
2025-10-28 17:24:25 +01:00
2025-10-28 17:24:25 +01:00
2025-10-28 17:24:25 +01:00
2025-11-08 02:16:46 +01:00
2025-11-08 17:15:04 +01:00
2025-11-06 01:00:39 +01:00
2025-11-05 14:26:57 +01:00