| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
mechanism.
|
|
|
|
| |
account the used and lost data.
|
|
|
|
| |
in Transport Core API.
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
GNUNET_STRINGS_get_utf8_args
A modification of ulfvonbelow's patch in #7651 that also silences
warnings.
|
| |
| |
| |
| |
| |
| |
| | |
We cannot free const* here. Need to find another fix
if we want to make the sanitizer happy.
This reverts commit 0920196347790edf46539eab5ae411745552511e.
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| | |
This makes the sanitizers happy so we can find the bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| | |
Needs to be able to fit a null-terminator as well.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| | |
I think this misspelling would tend to distract the reader.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| | |
This allows us to use sanitizers to find bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| | |
This allows us to use sanitizers to find bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| | |
This allows us to use sanitizers to find bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| | |
This allows us to use sanitizers to find bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| | |
Not really a memory leak, but good to get the sanitizers off our back.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| | |
This allows us to use sanitizers to find bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| | |
This allows us to use sanitizers to find bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
This allows us to use sanitizers to find bugs that matter.
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
I don't know how this went either unnoticed or unchanged. Is it a
compatibility thing?
Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
|
| |
| |
| |
| | |
commands may notify or listen or unlisten with the result
|
| | |
|
|/ |
|
|\ |
|
| |
| |
| |
| | |
gnunet_mysql_compat.h is now generated on configure.
|
| | |
|
| |\ |
|