- 06 Feb, 2021 1 commit
-
-
Nils Goroll authored
-
- 04 Feb, 2021 5 commits
-
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
(VRT_synth_page() still works, but is now deprecated.)
-
Poul-Henning Kamp authored
(While auditing for #2800)
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
-
- 03 Feb, 2021 1 commit
-
-
Poul-Henning Kamp authored
-
- 02 Feb, 2021 6 commits
-
-
Nils Goroll authored
In any good relationship, one should be clear about expectations. And VCL authors want to know what VCC wants to hear, so tell them. ;)
-
Nils Goroll authored
besides the incorrect bits we want to check for. Ref c4ec4712 Exposed by #3163
-
Nils Goroll authored
as requested by phk. I found no way to avoid having to escape the backslashes because python, even for uninterpolated ''' long strings, sees them as line continuations. The generated output is identical except for two comments (in the code and the code output by the code). --- ./lib/libvcc/vcc_fixed_token.o.c 2021-02-02 10:40:03.725244373 +0100 +++ ./lib/libvcc/vcc_fixed_token.c 2021-02-02 10:52:04.921259718 +0100 @@ -834,10 +834,7 @@ "uct vre **, const char *);\nvoid VPI_re_fini(struct vre *);\n" ); VSB_cat(sb, "\n"); - - /* ../include/vcc_assert.h */ - - VSB_cat(sb, "/* ---===### include/vcc_assert.h ###===--- */\n\n"); + VSB_cat(sb, "/* ---===### vgc asserts (generate.py) ###===--- */\n\n"); VSB_cat(sb, "#define assert(e)\t\t\t\t\t\t\t\\\ndo {\t\t\t\t" "\t\t\t\t\t\\\n\tif (!(e)) {\t\t\t\t\t\t\t\\\n\t\tVPI_Fail(__func" "__, __FILE__, __LINE__, #e);\t\t\\\n\t}\t\t\t\t\t\t\t\t\\\n"
-
Nils Goroll authored
to split the output formattings from emit_file() from reading the file The produced output lib/libvcc/vcc_fixed_token.c is identical before/after.
-
Poul-Henning Kamp authored
Fixes #3509
-
Poul-Henning Kamp authored
-
- 01 Feb, 2021 4 commits
-
-
Nils Goroll authored
We wrap VAS_Fail() as VPI_Fail() and add an assert() macro to the Varnish Generated C (VGC) code. This assert() definition is basically a copy of that in vas.h, but deliberately added to a source file which is only used by generate.py for VGC, such that this slightly different definition be only visible to VGC. I also pondered the option to include VCL source information in VPI_Fail: By using the information updated by VPI_count(), we could have that, but as the assert is, for now, intended only to ensure correctness of VCC and core VRT code, I decided against this complication. With assert() in place for VGC, we arm the assertions from 75acb5cc
-
Nils Goroll authored
It seems they do not parse attributes and how I read --macro-file-builtins they just define them to NIL.
-
Nils Goroll authored
How 16, you ask? Consider alignment...
-
Dridi Boukelmoune authored
One of the VCL 4.1 changes was to make the protocol read-only, which we've successfully done for all variables except resp.proto that kept the exact same definition for both 4.0 and 4.1 versions, despite having distinct definitions.
-
- 31 Jan, 2021 2 commits
-
-
Nils Goroll authored
-
Nils Goroll authored
How I added generation of the assertion code was motivated by how I wanted to lay out more changes in that area later, but generating parts of the function body before the header turned out to not help clarity. Ref 75acb5cc
-
- 30 Jan, 2021 2 commits
-
-
Nils Goroll authored
Bail out upon first error, as for the non-recursive case.
-
Nils Goroll authored
in the course of #3163 we want to add a preamble to VCL subs, which, ideally, would perform as many checks based on constants as possible. This is a first step towards such checks: We add a commented-out assert() on ctx->method for built-in subs only. To add the same for custom subs, we will need the okmask from #3163, for which I would first want to coordinate with phk. Also, I would want to coordinate with him on arming the assertion, as there might be a good reason why assert() is not yet defined for vgc (it is already used in unused macros, though). Having assertions would help humans, flexelint and compilers alike. Until armed, the assertion helps humans at least. The resulting vgc looks like this: void v_matchproto_(vcl_func_f) VGC_function_vcl_backend_error(VRT_CTX) { // assert(ctx->method == (VCL_MET_BACKEND_ERROR)); /* ... from ('Builtin' Line 165 Pos 23) */
-
- 29 Jan, 2021 3 commits
-
-
Poul-Henning Kamp authored
-
Poul-Henning Kamp authored
Add a VCL_BLOB for a connection preamble to struct vrt_backend (mortally offending FlexeLint in the process.)
-
Poul-Henning Kamp authored
-
- 28 Jan, 2021 3 commits
-
-
Nils Goroll authored
Quote more. Do not quote too much Ref da2409c3
-
Nils Goroll authored
We have now seen a second case after 184736fa, and a simple internal rename from bool to boolean does the job. Should have no user-visible impact.
-
Nils Goroll authored
In fee476ac VRB_Ignore(), VRB_Cache() and VRB_Free() were rightly out of vmods' sight. But VRB_Iterate() is legitemately required for vmods, and including it in the move seems to be an accident.
-
- 27 Jan, 2021 1 commit
-
-
Nils Goroll authored
Advise from shellcheck taken undogmatically. (I always forget: is $() for `..` posix-sh or not?)
-
- 26 Jan, 2021 2 commits
-
-
Poul-Henning Kamp authored
information to make them easier to clone.
-
Dridi Boukelmoune authored
Salvaged from #3503
-
- 25 Jan, 2021 6 commits
-
-
Dridi Boukelmoune authored
The rationale is that if we add another type of task in the future, for example probe tasks, we won't need to update the default mask for VMOD functions and object methods.
-
Dridi Boukelmoune authored
Refs #3498
-
Dridi Boukelmoune authored
With a default read mask based on the type of symbol. Starting with a default comprehensive mask should then help implement the $Restrict stanza from VIP4, simply by AND-ing the masks.
-
Nils Goroll authored
Simply take an ssize_t and return size_t asserting that the value is greater than or equal to zero. The name might still not be optimimal, as well as choice of *size_t. Addresses Coverity CID 1472401, CID 1472402
-
Dridi Boukelmoune authored
This way every failure can be tested again without selecting a specific subdirectory.
-
Nils Goroll authored
adds a variant of PAN_dump_struct() which does not start another indentation level on a new line.
-
- 23 Jan, 2021 4 commits
-
-
Nils Goroll authored
A copy-pasta in 55dffc35 prevented the top request from being dumped.
-
Nils Goroll authored
55dffc35 introduced a PAN_dump_struct() call, which implies printing '{' and VSB_indent(vsb, 2). Fix missing '}' and wrong indentation. Also remove redundant "priv" output, which now happens in PAN_dump_struct() Diff best viewed ignoring whitespace (-b option).
-
Nils Goroll authored
This test fails constantly now on vtest arm / Freebsd 13.0 for timeout. As vcl compilations are probably the most expensive operations of vtcs, we speed up this test by reducing the number of vcls loaded from 19 to 11. We do this by collapsing all of the client side failure tests into a single vcl. Being at it, we also reduce logexpect synchronization points. The number of vcl loads could be reduced further by also collapsing the backend side, but as this would reduce clarity more than for the client side alone, I first wanted to see if this first step brings down tuntime enough.
-
Nils Goroll authored
Do not overwrite an already latched errno. Note that it does not make any difference at the moment because we only ever use ENOMEM Ref #3502
-