1. 03 Nov, 2021 2 commits
    • Nils Goroll's avatar
      Fix (struct vpi_ii).p type · 9a20cdfd
      Nils Goroll authored
      It needs to be a generic pointer pointer, because it is initialized as
      a pointer to a pointer to an arbitrary struct, yet (void **) is can not
      be dereferenced.
      
      Right now, the instance info is not used, but this might change.
      9a20cdfd
    • Poul-Henning Kamp's avatar
      FlexeLinting. · 415ed78f
      Poul-Henning Kamp authored
      415ed78f
  2. 01 Nov, 2021 2 commits
  3. 29 Oct, 2021 3 commits
  4. 27 Oct, 2021 5 commits
  5. 26 Oct, 2021 9 commits
    • Poul-Henning Kamp's avatar
    • Poul-Henning Kamp's avatar
    • Poul-Henning Kamp's avatar
      Change the VJSN API to work on OSX · c1ad57b1
      Poul-Henning Kamp authored
      When VJSN is both in libvarnish and libvarnishapi, as in varnishtest,
      you would think one of them took precedence, but not so on OSX.
      
      In the shlib (libvarnishapi) text (code) symbols come from the version
      in the main binary (varnishtest) which got it from libvarnish, whereas
      the data symbols come from the version in libvarnishapi, so we now
      hide the data symbols behind code.
      c1ad57b1
    • Nils Goroll's avatar
      gc stray declaration · 85c04cb9
      Nils Goroll authored
      Ref 611baec6
      85c04cb9
    • Nils Goroll's avatar
      Assert that if a connection is closed before being used, it is so for a reason · 0577bac0
      Nils Goroll authored
      ... but we can not make any assumption as to why
      
      Fixes #3664
      0577bac0
    • Nils Goroll's avatar
      Add std.strftime() · f970f175
      Nils Goroll authored
      add a vmod function for strftime() formatting in UTC.
      f970f175
    • Nils Goroll's avatar
      vcc: minor VSB polish · 12be3d38
      Nils Goroll authored
      12be3d38
    • Nils Goroll's avatar
      vcc: Fix dynamic calls to built-in SUBs and properly check evaluation context · f653000e
      Nils Goroll authored
      As a follow-up issue from #3719, it was noticed that dynamic calls to
      built-in SUBs did not work.
      
      This issue was caused by more (struct symbol) members missing
      initialization in VCC_New().
      
      In turn, it became apparent that the evaluation context check in
      vcc_expr5() as tested in v00020.vtc only worked by accident, and only
      for built-in subs because (struct symbol).eval was NULL for built-in
      subs.
      
      We fix SUB type expression evaluation with a type specific evaluation
      function which allows expression evaluation from explicit SUB contexts
      only.
      
      Fixes #3720
      f653000e
    • Nils Goroll's avatar
      vcc: do not overwrite SUB symbol properties when call'ing · 006618c0
      Nils Goroll authored
      vcc_act_call() implements use-before-define semantics. To do so, it
      needs to instantiate SUB symbols if they do not exist.
      
      However, it wrongly called VCC_GlobalSymbol() also for existing
      symbols, overwriting symbol properties.
      
      In the case of the built-in subs, the symbol's lname (historically)
      still is the unescaped literal name, while user defined subs have
      their name escaped via VCC_GlobalSymbol() -> VCC_PrintCName().
      
      This made the wrong call to VCC_GlobalSymbol() apparent when a
      built-in sub was called with an explicit "call" action.
      
      Besides fixing the VCC_GlobalSymbol() call, we also need to set the
      lname and rname attributes for built-in SUB symbols initialized in
      VCC_New().
      
      Alternatively, we could also have used VCC_GlobalSymbol() there, but
      that would have affected other places where we (still) rely on the
      known name scheme of built-in subs, e.h. EmitStruct(). While the name
      unifaction was nice in general, I found the necessary changes (look up
      SUB symbols) not worth the benefit.
      
      Fixes #3719
      006618c0
  6. 25 Oct, 2021 2 commits
  7. 13 Oct, 2021 3 commits
  8. 12 Oct, 2021 7 commits
  9. 11 Oct, 2021 3 commits
  10. 05 Oct, 2021 1 commit
  11. 04 Oct, 2021 3 commits
    • Nils Goroll's avatar
      flexelinting · 4fba40ba
      Nils Goroll authored
      Info 776 (Possible truncation of addition): I found no better way than
      using an additional size_t argument. This triggered a subsequent
      warning about an out-of-bounds access, which could be silenced with
      additional assertions on nac to be large anough such that av[ac] was
      not out of bounds.
      
      Warning 429: Custodial pointer 'av' (line 60) has not been freed or
      returned:
      
      In other cases, the argument vector comes from VAV_Parse() which
      flexelint apparently can't follow along, yet memory for a VAV is also
      allocated and never freed (see also bottom of STV_Config()).
      
      In this case I found no better way than to silence flexelint.
      4fba40ba
    • Nils Goroll's avatar
      sync flexelent with b2d840cf · 64aa9275
      Nils Goroll authored
      64aa9275
    • Martin Blix Grydeland's avatar