Commit Graph
82 Commits
Author SHA1 Message Date
cozis 753aba9e63 Progress 2025-11-09 17:39:53 +01:00
cozis 3d1368938b Progress 2025-11-09 16:20:50 +01:00
cozis d2140bdb13 Progress 2025-11-09 14:12:19 +01:00
cozis 739d6a7aee Progress 2025-11-09 12:08:22 +01:00
cozis 88735d1595 Progress 2025-11-08 23:44:37 +01:00
Claude 9367202dbc Fix assertion failures in tinydfs_test
Fixed two critical bugs in the TinyDFS client code:

1. Added bounds checking in alloc_operation() to prevent buffer overflow
   when searching for a free operation slot. The while loop could go past
   the end of the operations array, causing undefined behavior.

2. Fixed all tinydfs_submit_* functions to return the operation index
   (opidx) instead of 0 on success. This was causing all operations to
   be tracked with index 0, leading to type mismatches between operation
   types and result types, which triggered the assertion:
   "Assertion `pending.type == PENDING_OPERATION_DELETE' failed"

The test now runs successfully past the original assertion point.
2025-11-08 21:28:27 +00:00
cozis c2cb833e50 Progress 2025-11-08 22:16:55 +01:00
cozis e5039d1774 Progress 2025-11-08 17:15:04 +01:00
cozis 7f3aa901f1 Progress 2025-11-08 13:25:17 +01:00
cozis 7846607651 Progress 2025-11-08 11:51:24 +01:00
cozis 279777fc8b Progress 2025-11-08 02:43:41 +01:00
cozis 463b1b4ba9 Progress 2025-11-08 02:16:46 +01:00
cozis 66eb81c9b9 Progress 2025-11-07 23:57:12 +01:00
cozis be2479b2be Progress 2025-11-07 22:45:40 +01:00
cozis 8ab426770f Progress 2025-11-07 22:18:05 +01:00
cozis d7cf946431 Progress 2025-11-07 20:26:15 +01:00
cozis 44fb1c4f36 Progress 2025-11-07 00:30:28 +01:00
cozis 407afffeb5 Progress 2025-11-06 21:39:22 +01:00
cozis 896bc0a23b Progress 2025-11-06 13:15:05 +01:00
cozis 0e27528d1d Progress 2025-11-06 01:23:24 +01:00
cozis e7455cc4ed Progress 2025-11-06 01:00:39 +01:00
cozis d192209c58 Progress 2025-11-05 23:14:24 +01:00
cozis 70a1914d8e Progress 2025-11-05 19:21:51 +01:00
cozis 18f1224c91 Progress 2025-11-05 17:09:38 +01:00
cozis e124952fe2 Progress 2025-11-05 14:26:57 +01:00
cozis 31a4b2cc32 Bug fixes 2025-11-03 18:32:14 +01:00
Claude 5adf1337cf Move chunk server RequestQueue initialization to connection time
The RequestQueue for chunk servers should be initialized when the
connection is actually established in get_chunk_server_connection(),
not ahead of time during tinydfs_init().

The metadata server RequestQueue initialization remains in tinydfs_init()
since the metadata server connection is established during initialization.

Changes:
- Removed premature RequestQueue initialization for chunk servers
- Added clarifying comments about initialization timing
- RequestQueue is initialized in get_chunk_server_connection() (line 227)
2025-11-02 13:33:39 +00:00
Claude 3ae2f13610 Fix all Valgrind errors: uninitialized values and memory leak
This commit resolves all Valgrind errors reported in the test run:

1. Fixed uninitialized 'removed' array in tcp_translate_events (tcp.c:179)
   - Added memset to initialize the array to zero before use

2. Fixed uninitialized RequestQueue in client initialization (client.c)
   - Added initialization of metadata_server.reqs and chunk_servers[].reqs
   - Added forward declaration of request_queue_init function

3. Fixed uninitialized descriptor generation field (system.c:324)
   - Initialize generation to 0 when creating process descriptors
   - Prevents uninitialized value errors in handle_to_desc

4. Fixed 34-byte memory leak in tcp_context_free (tcp.c:91-103)
   - Added cleanup of connection byte queues when freeing TCP context
   - Frees both input and output ByteQueues for all connections

All Valgrind errors have been resolved:
- ERROR SUMMARY: 0 errors from 0 contexts
- All heap blocks freed - no leaks possible
2025-11-02 13:24:18 +00:00
cozis eb93541c84 Test framework cleanup 2025-11-01 22:44:04 +01:00
cozis 174f37c6c0 Continue work on DST framework 2025-10-29 21:46:17 +01:00
cozis fb8ac1d5c9 Fix compiler errors 2025-10-28 17:33:52 +01:00
cozis c5a21608d7 Split project over multiple files 2025-10-28 17:24:25 +01:00