aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* TNG: Added performance test case.t3sserakt2023-02-08
|
* TNG: Removed debug log statements not controlled by the global logging ↵t3sserakt2023-02-08
| | | | mechanism.
* TNG: Fixed bug of not sending the changed window size, which takes into ↵t3sserakt2023-02-08
| | | | account the used and lost data.
* TNG: Fixed bug about missing synchronisation between client and service queuet3sserakt2023-02-08
| | | | in Transport Core API.
* TNG: Fixed bug of QueueEntry deleted too early.t3sserakt2023-02-07
|
* Merge branch 'master' of ssh://git.gnunet.org/gnunett3sserakt2023-02-07
|\
| * -remove dead variable, obsoleted by patch for #7617Christian Grothoff2023-02-06
| |
| * UTIL: use dedicated marker in ready queue.ulfvonbelow2023-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This inserts a dedicated dummy marker task at the end of the ready queue at the start of a pass. Because this marker task isn't visible to users of the scheduler, it can't be canceled while the pass is being run. Additionally, switching which ready queue is being run partway through by scheduling a higher-priority task to immediately run also places this dummy marker. This resolves both erroneous cases by which a pass can accidentally run an unbounded number of tasks. This also modifies GNUNET_SCHEDULER_get_load to not be misled by this extra dummy task, and adds the now-passing test cases to the test suite. Signed-off-by: Christian Grothoff <christian@grothoff.org>
| * UTIL: add test demonstrating scheduler bug, don't run it by default.ulfvonbelow2023-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These demonstrate a bug in the scheduler by which a task can prevent any other task from running for an arbitrarily long time despite regularly yielding to the scheduler. It is caused by a faulty check in GNUNET_SCHEDULER_do_work that assumes that the task that was the last in the queue when the pass began will still be in the same relative position when the pass ends, and uses this assumption to detect the end of the current pass. This assumption fails when the last task of the current pass is canceled after the pass has started. It also fails when we schedule a higher-priority task to run immediately, causing work_priority to immediately switch such that we now process a queue that doesn't contain the pass-ending task we're looking for. These tests are built, but not run by 'make check' yet, since they currently fail. You can manually verify that they do currently fail. Signed-off-by: Christian Grothoff <christian@grothoff.org>
| * DHT: Fix warnings when freeing allocated strings from ↵Martin Schanzenbach2023-02-06
| | | | | | | | | | | | | | GNUNET_STRINGS_get_utf8_args A modification of ulfvonbelow's patch in #7651 that also silences warnings.
| * Revert "DHT: remove "memory leak" in gnunet-dht-{get,put}."Martin Schanzenbach2023-02-06
| | | | | | | | | | | | | | We cannot free const* here. Need to find another fix if we want to make the sanitizer happy. This reverts commit 0920196347790edf46539eab5ae411745552511e.
| * SETU: don't leak Operation.{message_control_flow,inquiries_sent}.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * SETU: prevent misaligned access to StrataEstimatorMessage.set_size.ulfvonbelow2023-02-06
| | | | | | | | | | | | | | | | Gnunet's messages aren't guaranteed to be 8-byte-aligned. The ones delivered via MST are (at least, whenever it matters), but not the ones delivered by GNUNET_MQ_inject_message, such as is done by CADET. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * -SECRETSHARING: don't leak my_share in test.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * SETU: avoid 64-bit shift on 64-bit value.ulfvonbelow2023-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | Shifting a 64-bit value by any more than 63 bits is undefined behavior, apparently - at least, the sanitizers complain about it. The intuitive, obvious result, of course, is for the result to be 0. In this case, when s == 0, x << (64 - s) should result in 0, and (x >> s) should result in x, and the bitwise-or of those two should be x. Which x already was. Perhaps it should be investigated whether (x >> (64 - s)) should actually be (x >> (63 - s)), since 0 <= s < 64. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * REST: don't leak basic_auth_file.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * REVOCATION: don't leak signature purpose memory.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * TESTBED: don't leak helper_argv when SSH can't be executed.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * -RECLAIM: fix memory leaks in tests.ulfvonbelow2023-02-06
| | | | | | | | | | | | This makes the sanitizers happy so we can find the bugs that matter. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * RECLAIM: don't leak the elements of attr_list.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * RECLAIM: fix 1-byte overflow in DID_did_to_pkey.ulfvonbelow2023-02-06
| | | | | | | | | | | | Needs to be able to fit a null-terminator as well. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * RECLAIM: rename G_D_key_covert_... to G_D_key_convert_...ulfvonbelow2023-02-06
| | | | | | | | | | | | I think this misspelling would tend to distract the reader. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * PEERSTORE: fix write-after-free in handle_{iterate_end,watch_record}ulfvonbelow2023-02-06
| | | | | | | | | | | | | | | | One of the tests - I forget which one, didn't write it down at the time - actually does cause h to be freed in its callback. If this isn't supposed to be allowed, we should find and fix that test. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * NAMESTORE: avoid use-after-free in handle_record_result.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * NAMESTORE: fix overread in handle_record_store.ulfvonbelow2023-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A RecordStoreMessage looks like this: | header | key | recordset | A StoreActivity's rs field is supposed to point to the record set. handle_record_store tries to make a copy of this record set, but it does it by allocating enough memory for both key and recordset, then copying sizeof(key) + sizeof(recordset) bytes into it *starting from recordset*. This causes memcpy to read past the end of recordset by sizeof(key) bytes. There's still enough room in the allocated region for it, though, so it's only an overread. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * NAMESTORE: fix memory leak in parse_recordline.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * -NAMESTORE: fix memory leaks in tests.ulfvonbelow2023-02-06
| | | | | | | | | | | | This allows us to use sanitizers to find bugs that matter. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * JSON: fix memory leaks in test.ulfvonbelow2023-02-06
| | | | | | | | | | | | This allows us to use sanitizers to find bugs that matter. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * HELLO: fix memory leak in GNUNET_HELLO_extract_address.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * -HELLO: fix memory leaks in tests.ulfvonbelow2023-02-06
| | | | | | | | | | | | This allows us to use sanitizers to find bugs that matter. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * GNSRECORD: fix memory leaks in tests.ulfvonbelow2023-02-06
| | | | | | | | | | | | This allows us to use sanitizers to find bugs that matter. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * -GNS: use proper config file name in test_proxy.sh.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * FS: fix memory leak in GNUNET_FS_search_stop.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * DHT: remove "memory leak" in gnunet-dht-{get,put}.ulfvonbelow2023-02-06
| | | | | | | | | | | | Not really a memory leak, but good to get the sanitizers off our back. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * -DATACACHE: fix memory leaks in tests.ulfvonbelow2023-02-06
| | | | | | | | | | | | This allows us to use sanitizers to find bugs that matter. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * -CORE: fix memory leak in test.ulfvonbelow2023-02-06
| | | | | | | | | | | | This allows us to use sanitizers to find bugs that matter. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * -Miscellaneous mostly-comment typo fixes.ulfvonbelow2023-02-06
| | | | | | | | | | | | | | The message in src/testbed/testbed_api_hosts.c was phrased a little strangely, so I changed that too. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * NAT: don't leak AddrEntries when unregistering.ulfvonbelow2023-02-06
| | | | | | | | Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * REVOCATION: add shutdown task earlier.ulfvonbelow2023-02-06
| | | | | | | | | | | | | | | | | | | | There are many things that can go wrong and require cleanup before the shutdown task is currently added. In these cases, GNUNET_SCHEDULER_shutdown is run and run() is returned from. At present, the only harm in running shutdown_task earlier would be it unconditionally destroying revocation_map, so we can add it as soon as that exists. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * UTIL: fix memory leak in test.ulfvonbelow2023-02-06
| | | | | | | | | | | | This allows us to use sanitizers to find bugs that matter. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * UTIL: fix one-byte buffer over-reads.ulfvonbelow2023-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | GNUNET_CRYPTO_hash_from_string2 uses enclen as the length of its buffer that it passes to GNUNET_STRINGS_utf8_toupper, but GNUNET_STRINGS_utf8_toupper adds a null terminator, so it should be enclen+1. GNUNET_CRYPTO_crc16_step reads 1 byte past the end of the buffer passed to it. It masks out that byte in computing the result, but it's still technically an overread and could in extremely-rare circumstances cause a segmentation or access fault. It also upsets sanitizers, preventing other bugs from being found. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * UTIL: fix memory leaks in several places.ulfvonbelow2023-02-06
| | | | | | | | | | | | | | | | | | | | Namely, in: - GNUNET_CRYPTO_eddsa_private_key_derive - GNUNET_CRYPTO_hash_file_cancel - GNUNET_CRYPTO_hash_file - checkvec and check_vectors in gnunet-crypto-tvg Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * INCLUDE: change Mulit --> Multi in G_C_MulitHashMapIteratorCallback.ulfvonbelow2023-02-06
| | | | | | | | | | | | | | I don't know how this went either unnoticed or unchanged. Is it a compatibility thing? Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
| * PG: do not return NOTIFY prefix in GNUNET_PG_get_event_notify_channel, ↵Christian Grothoff2023-02-05
| | | | | | | | commands may notify or listen or unlisten with the result
| * PQ: remove duplicated comments, and send stderr from psql to /dev/nullChristian Grothoff2023-02-05
| |
* | Fixed #7630: Memory leak in (?) finish_test in testing_api_loop.ct3sserakt2023-02-07
|/
* Merge branch 'master' of ssh://git.gnunet.org/gnunett3sserakt2023-02-05
|\
| * MYSQL: Expose detected mysql boolean in gnunet_mysql_compat.hMartin Schanzenbach2023-02-05
| | | | | | | | gnunet_mysql_compat.h is now generated on configure.
| * -better indentationChristian Grothoff2023-02-01
| |
| * Merge remote-tracking branch 'origin/master'Martin Schanzenbach2023-02-01
| |\