- 19 Jun, 2020 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 20 Feb, 2020 2 commits
-
-
Rusty Russell authored
To match the raw delval Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 19 Feb, 2020 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 17 Feb, 2020 1 commit
-
-
Rusty Russell authored
==10868== at 0x109A96: notify (tal.c:220) ==10868== by 0x109F7E: del_tree (tal.c:397) ==10868== by 0x10A31A: tal_free (tal.c:481) ==10868== by 0x10BE73: main (run-destructor.c:75) ==10868== Address 0x4a60bd8 is 8 bytes inside a block of size 32 free'd ==10868== at 0x483BA3F: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==10868== by 0x109D4F: del_notifier_property (tal.c:340) ==10868== by 0x10A610: tal_del_notifier_ (tal.c:564) ==10868== by 0x10A687: tal_del_destructor_ (tal.c:576) ==10868== by 0x10B653: remove_own_destructor (run-destructor.c:35) ==10868== by 0x109A67: notify (tal.c:235) ==10868== by 0x109F7E: del_tree (tal.c:397) ==10868== by 0x10A31A: tal_free (tal.c:481) ==10868== by 0x10BE73: main (run-destructor.c:75) ==10868== Block was alloc'd at ==10868== at 0x483A7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==10868== by 0x109AD5: allocate (tal.c:245) ==10868== by 0x109C3E: add_notifier_property (tal.c:300) ==10868== by 0x10A467: tal_add_destructor_ (tal.c:516) ==10868== by 0x10BDFE: main (run-destructor.c:74) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 11 Feb, 2020 1 commit
-
-
Rusty Russell authored
Instead of memmoving N structs, we were memmoving N bytes. But why did the test pass then? It was doing memmove(..., 1) instead of memmove(..., sizeof(struct opt_table)! Because the two structures were really similar; the main difference was the first entry, which points to the name. But they were allocated consecutively, and Intel being little-endian, the only difference was the first byte! Thus memmove(1) was enough to make it "work". Change two options in the test to be sufficiently different, and the bug shows up. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 04 Feb, 2020 4 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Sometimes we all make mistakes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Niklas Claesson authored
Since the probing binaries compiled by the configurator needs to run on the host machine we provide a variable CONFIGURATOR_WRAPPER that can be set to anything that you want to wrap the calls with. One example is `qemu-aarch64-static`.
-
- 22 Oct, 2019 1 commit
-
-
Kirill Smelkov authored
Currently bitmap type is defined via untagged struct which makes it impossible to forward declare it. Forward-declaring is useful since all bitmap functions only use bitmap* and in public user-visible headers/datastructures it is enough to indicate that a data field with bitmap pointer is there, whereas bitmap.h can be included only in implementation. Beside that some headers are included by both C and C++ parts of a project, and when ccan/bitmap.h is processed by C++ compiler it gives: ./3rdparty/ccan/ccan/bitmap/bitmap.h: In function ‘bitmap* bitmap_alloc(long unsigned int)’: ./3rdparty/ccan/ccan/bitmap/bitmap.h:201:15: error: invalid conversion from ‘void*’ to ‘bitmap*’ [-fpermissive] return malloc(bitmap_sizeof(nbits)); ~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ./3rdparty/ccan/ccan/bitmap/bitmap.h: In function ‘bitmap* bitmap_realloc0(bitmap*, long unsigned int, long unsigned int)’: ./3rdparty/ccan/ccan/bitmap/bitmap.h:227:18: error: invalid conversion from ‘void*’ to ‘bitmap*’ [-fpermissive] bitmap = realloc(bitmap, bitmap_sizeof(nbits)); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./3rdparty/ccan/ccan/bitmap/bitmap.h: In function ‘bitmap* bitmap_realloc1(bitmap*, long unsigned int, long unsigned int)’: ./3rdparty/ccan/ccan/bitmap/bitmap.h:238:18: error: invalid conversion from ‘void*’ to ‘bitmap*’ [-fpermissive] bitmap = realloc(bitmap, bitmap_sizeof(nbits)); -> Give to users ability not to force-include ccan/bitmap.h by forward-declaring bitmaps like this: typedef struct bitmap bitmap; ... struct MyStruct { bitmap *my_bitmap; }; Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Kirill Smelkov <kirr@nexedi.com> Message-Id: <20191021150903.25159-1-kirr@nexedi.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 10 Oct, 2019 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 04 Oct, 2019 1 commit
-
-
Rusty Russell authored
SEEK_SET == 0, so it's not hurting anyone now, but when I cut & paste it elsewhere... Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 14 Aug, 2019 1 commit
-
-
Rusty Russell authored
This is usually what you want; I didn't even add a flag to stop it. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 13 Aug, 2019 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 01 Aug, 2019 1 commit
-
-
Chirimen-Jako authored
-
- 31 Jul, 2019 1 commit
-
-
Rusty Russell authored
Discovered on bionic's Travis install, it failed at *runtime* when it couldn't find the shared library. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 11 Jul, 2019 1 commit
-
-
David Gibson authored
The bitmap_word type is an unsigned long. However in some places we assign it using -1ULL, a 64-bit value on many platforms. We sometimes get away with this because it masks correctly, but in other cases it breaks things. To clean this up define a new BITMAP_WORD_1 constant, indicating a bitmap_word with all bits set, and use that instead of explicit UL or ULL qualifiers. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-
- 11 Jun, 2019 4 commits
-
-
Rusty Russell authored
I copied them from the kernel, but obviously didn't find good test vectors. In particular, the CRC of all zeroes is not 0! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Note: the previous code in ccan/crc is wrong, so I started fresh with actual test vectors. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 23 May, 2019 1 commit
-
-
Rusty Russell authored
And fix escaping to work with addstr(), and assert in debug mode if they don't specify quotes. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 22 May, 2019 1 commit
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 21 May, 2019 2 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 02 Apr, 2019 1 commit
-
-
Rusty Russell authored
Final results of tools/speed/10000000 (10 runs) shows a slight slowdown in some tests, but it makes an empty htable smaller. -Initial delete all: 96-98(96.4+/-0.66) ns +Initial delete all: 97-99(98.2+/-0.75) ns -Initial re-inserting: 117-124(121.4+/-1.9) ns +Initial re-inserting: 124-131(126.4+/-2.4) ns -Adding (a different) half: 49-50(49.3+/-0.46) ns +Adding (a different) half: 50-52(51.2+/-0.75) ns Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 01 Apr, 2019 2 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 16 Mar, 2019 3 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Free the internal "always" array like we free "fds". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Suggested-by: Lisa Neigut <@niftynei> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 04 Mar, 2019 5 commits
-
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
malloc and free aren't for everyone. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
There are cases where we want to suppress all activity except for a single fd; we already have ugly io_flush_sync, but this is more useful and more general. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
- 28 Feb, 2019 3 commits
-
-
Rusty Russell authored
We could just make them -1, since we don't rely on the values. But simple negation doesn't make 0 invalid. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
Duplex io_conns can be in the always list twice, and it was a source of bugs, but I didn't want to add a second list_node. Since there are not many always at once, it's better (and more space-efficient) to use a simple pointer array. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-
Rusty Russell authored
io_conn contains two plans: by knowing what plan this is, it can be cast back into the io_conn. That helps for the next patch. We also remove the strange logic where io_duplex() would return a magic, invalid io_plan pointer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-