search for: buf1

Displaying 20 results from an estimated 42 matches for "buf1".

Did you mean: buf
2006 Sep 12
1
openssh (OpenBSD) , bsdauth and tis authsrv
nuqneH, I've tried using TIS authsrv authentication via bsd auth and found it quite limited. The most important restriction it does not log ip and fqdn of the remote peer, nor the application name, to the authentication server. It does not matter much for TIS authsrv, but since other applications do provide such information, our authsrv version uses it for extra authentication restrictions.
2016 Feb 09
2
Question about __builtin_object_size
...ter that. For this case LLVM as result generates 0 or -1 depends of second argument of __builtin_object_size function. Is this correct behaviour or it should work as gcc (gcc calculates correct value for this case) ? Example for this issue: include <assert.h> int main() { struct V { char buf1[10]; int b; char buf2[10]; } var; char *p = &var.buf1[1], *q = &var.b; assert (__builtin_object_size (p, 0) == sizeof (var) - 1); return 0; } Thanks, Strahinja
2016 Feb 09
2
Question about __builtin_object_size
...second argument >> of __builtin_object_size function. Is this correct behaviour or it should >> work as gcc (gcc calculates correct value for this case) ? >> >> Example for this issue: >> >> include <assert.h> >> int main() { >> struct V { char buf1[10]; >> int b; >> char buf2[10]; >> } var; >> >> char *p = &var.buf1[1], *q = &var.b; >> assert (__builtin_object_size (p, 0) == sizeof (var) - 1); >> return 0; >> } >> >&g...
2017 Aug 20
2
RFC: Resolving TBAA issues
...s is that > > there are many ways to prove no-alias, and TBAA is one of them. > > The reason i stare at dump files and debug info is precisely to > > separate the TBAA portion from the rest. > > Makes sense to me. However, for a translation unit like this: > > struct BUF1 { ... }; > struct BUF2 { ... }; > > int foo(int n, struct BUF1* p, struct BUF2* q) { > for (int i = 0; i < n; i++) > p->b1 += q->b2; > return 0; > } > > I think we can be sure there are no ways for the compiler to know that > these two...
2012 May 03
1
[nut-commits] svn commit r3554 - branches/windows_port/common
...) > +++ branches/windows_port/common/wincompat.c ? ?Thu May ?3 08:31:38 2012 ? ? ? ?(r3554) > @@ -212,7 +212,7 @@ > ? ?of chars containing the message to display (no terminal 0 required here) */ > ?void syslog(int priority, const char *fmt, ...) > ?{ > - ? ? ? char buf1[LARGEBUF]; > + ? ? ? char buf1[LARGEBUF+sizeof(DWORD)]; > ? ? ? ?char buf2[LARGEBUF]; > ? ? ? ?va_list ap; > ? ? ? ?HANDLE pipe; > > _______________________________________________ > nut-commits mailing list > nut-commits at lists.alioth.debian.org > http://lists....
2017 Oct 02
3
[PATCH 0/2] builder: Choose better weights in the planner.
It started out as "this'll be just a simple fix ..." and turned into something a bit over-engineered in the end. Here it is anyway. Rich.
2017 Aug 20
2
RFC: Resolving TBAA issues
On Sun, Aug 20, 2017 at 2:47 AM, Ivan A. Kosarev via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hello Daniel, > > >>>> the type of (*x) is not compatible with the type of (*b) or, > >>>> recursively, type of b->i. Similarly, the type of (*b) is > >>>> not compatible with (*x) or, recursively, x->i. > >> ... >
2019 Aug 10
1
Re: [PATCH libnbd 2/9] generator: Generalize OFlags.
...7;tests/test_410_pwrite.ml > @@ -33,7 +33,8 @@ let () = > let nbd = NBD.create () in > NBD.connect_command nbd ["nbdkit"; "-s"; "--exit-with-parent"; "-v"; > "file"; datafile]; > - NBD.pwrite nbd buf1 0_L ~flags:[NBD.cmd_flag_fua]; > + let flags = let open NBD.CMD_FLAG in [FUA] in > + NBD.pwrite nbd buf1 0_L ~flags; ...but not here. It doesn't affect the code, but the consistency may be worth it. This and patch 1 look fine to me. -- Eric Blake, Principal Software Engineer Red Hat...
2017 Aug 20
3
RFC: Resolving TBAA issues
...ny ways to prove no-alias, and TBAA is one of them. > > The reason i stare at dump files and debug info is precisely to > > separate the TBAA portion from the rest. > > Makes sense to me. However, for a translation unit like this: > > struct BUF1 { ... }; > struct BUF2 { ... }; > > int foo(int n, struct BUF1* p, struct BUF2* q) { > for (int i = 0; i < n; i++) > p->b1 += q->b2; > return 0; > } > > I think we can be sure there...
2019 Aug 10
0
[PATCH libnbd 2/9] generator: Generalize OFlags.
...ite.ml +++ b/ocaml/tests/test_410_pwrite.ml @@ -33,7 +33,8 @@ let () = let nbd = NBD.create () in NBD.connect_command nbd ["nbdkit"; "-s"; "--exit-with-parent"; "-v"; "file"; datafile]; - NBD.pwrite nbd buf1 0_L ~flags:[NBD.cmd_flag_fua]; + let flags = let open NBD.CMD_FLAG in [FUA] in + NBD.pwrite nbd buf1 0_L ~flags; let buf2 = Bytes.create 512 in NBD.pread nbd buf2 0_L; diff --git a/ocaml/tests/test_460_block_status.ml b/ocaml/tests/test_460_block_status.ml index df...
2019 Aug 10
0
[PATCH libnbd 1/5] python: Change aio_buffer into nbd.Buffer class.
.....71aa9ba 100644 --- a/python/t/510-aio-pwrite.py +++ b/python/t/510-aio-pwrite.py @@ -33,17 +33,17 @@ h = nbd.NBD () h.connect_command (["nbdkit", "-s", "--exit-with-parent", "-v", "file", datafile]) -buf1 = nbd.aio_buffer_from_bytearray (buf) +buf1 = nbd.Buffer.from_bytearray (buf) cookie = h.aio_pwrite (buf1, 0, nbd.CMD_FLAG_FUA) while not (h.aio_command_completed (cookie)): h.poll (-1) -buf2 = nbd.aio_buffer (512) +buf2 = nbd.Buffer (512) cookie = h.aio_pread (buf2, 0) while not (h.aio_...
2019 Aug 10
7
[PATCH libnbd 0/5] WIP: python: Add test for doing asynch copy.
This doesn't yet work. However it does make me more convinced than ever that we really need to sort out persistent buffer lifetimes in the library (similar to what we did for closures). Rich.
2006 Mar 24
2
[PATCH] qemu pcnet emulation fixes
...0x8000)) { return 0; } - return sizeof(s->buffer)-16; + return sizeof(s->rx_buffer)-16; } #define MIN_BUF_SIZE 60 @@ -389,7 +366,7 @@ static void pcnet_receive(void *opaque, { PCNetState *s = opaque; int is_padr = 0, is_bcast = 0, is_ladr = 0; - uint8_t buf1[60]; + int pad; if (CSR_DRX(s) || CSR_STOP(s) || CSR_SPND(s) || !size) return; @@ -399,12 +376,10 @@ static void pcnet_receive(void *opaque, #endif /* if too small buffer, then expand it */ - if (size < MIN_BUF_SIZE) { - memcpy(buf1, buf, size); -...
2017 Aug 19
4
RFC: Resolving TBAA issues
On Sat, Aug 19, 2017 at 1:04 PM, Ivan A. Kosarev via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Daniel, > > >> the type of (*x) is not compatible with the type of (*b) or, > >> recursively, type of b->i. Similarly, the type of (*b) is not > >> compatible with (*x) or, recursively, x->i. > ... > > I think these are interesting
2019 May 28
2
[PATCH] api: Add a special type for the flags argument.
This applies on top of patches 1 & 2 here (instead of patch 3): https://www.redhat.com/archives/libguestfs/2019-May/msg00206.html https://www.redhat.com/archives/libguestfs/2019-May/msg00207.html Rich.
2019 May 28
0
[PATCH] api: Add a special type for the flags argument.
...a2..811f233 100644 --- a/python/t/410-pwrite.py +++ b/python/t/410-pwrite.py @@ -33,7 +33,7 @@ h = nbd.NBD () h.connect_command (["nbdkit", "-s", "--exit-with-parent", "-v", "file", datafile]) h.pwrite (buf1, 0, nbd.CMD_FLAG_FUA) -buf2 = h.pread (512, 0, 0) +buf2 = h.pread (512, 0) assert buf1 == buf2 diff --git a/python/t/460-block-status.py b/python/t/460-block-status.py index f511091..eeaa7b2 100644 --- a/python/t/460-block-status.py +++ b/python/t...
2009 Feb 06
0
[LLVMdev] First class function pointers
On Feb 5, 2009, at 3:42 PM, Jon Harrop wrote: > > Unless I am mistaken, LLVM barfs if I try to pass an LLVM function > to another > function as an argument because functions are second class. Huh? can you give an example as llvm IR? You can certainly pass functions by-value as a function pointer. -Chris
2009 Feb 05
2
[LLVMdev] First class function pointers
Unless I am mistaken, LLVM barfs if I try to pass an LLVM function to another function as an argument because functions are second class. However, if I const bitcast the LLVM function to a function pointer when it is defined then I can use that as a first-class function pointer. In particular, I can invoke it directly by emitting a "call" without having to cast it back beforehand.
2020 Apr 14
0
[nbdkit PATCH v2 3/3] server: More tests of stdin/out handling
...# The sh plugin sets up pipes to handle stdin/out per each run of the +# script, but this is not incompatible with using -s for the client +nbdsh -c ' +h.connect_command (["nbdkit", "-s", "sh", "single-sh.script"]) +assert h.get_size() == 1024 * 1024 +buf1 = h.pread (512, 0) +buf2 = bytearray (512) +assert buf1 == buf2 +' + +exit $fail diff --git a/tests/test-stdio.sh b/tests/test-stdio.sh new file mode 100755 index 00000000..43913d66 --- /dev/null +++ b/tests/test-stdio.sh @@ -0,0 +1,95 @@ +#!/usr/bin/...
2009 Feb 06
1
[LLVMdev] First class function pointers
...d, i32 %3) ; <i32> [#uses=1] ret i32 %4 } declare i32 @printf(i8*, ...) define i32 @eval() { entry: %0 = call fastcc i32 @even(i32 (i32)* @odd, i32 0) ; <i32> [#uses=0] %1 = call i32 (i8*, ...)* @printf(i8* getelementptr ([3 x i8]* @buf1, i32 0, i32 0)) ; <i32> [#uses=0] %2 = call i32 (i8*, ...)* @printf(i8* getelementptr ([2 x i8]* @buf2, i32 0, i32 0)) ; <i32> [#uses=0] ret i32 0 } Note that the branch location that "even" jumps to is dynamic, being passed in as an a...